Topics
Replies
swapd0
23 Feb 2023, 01:50
RE: macOS version
bishbashbosh said:
that's interesting - what's the stack? and it seems like quite a task to take on - are you planning to market it?
for cTrader themselves, now that .net MAUI is out, they could presumably rework their (WPF?) codebase into that and achieve native macOS support.
The network & data management code it's in C++, user interface in Objective-C, bot scripts (very simple) in Lua.
Right now I'm using FIX protocol for price quote but It doesn't have access to historical data, so I'm using other API for that. I'm having some issues with the constraints. I want to release a free version as soon as I fix that. By the way, right now, you can't place orders (I haven't looked that part) and you can only draw trend lines.
@swapd0
swapd0
15 Jul 2022, 01:04
( Updated at: 21 Dec 2023, 09:22 )
Still a lot of things to do but getting better...
I'm using FIX protocol, and sometimes some symbols don't get subscribed (EURUSD, EURGBP, EURAUD...). Also, I'm using some external services for the historical data (FIX implementation doesn't support historical data) and it's a nightmare because I can only send a few queries per minute.
@swapd0
swapd0
27 May 2022, 19:33
RE: RE:
amusleh said:
Hi,
Most probably something is wrong with your own app, either message checksums are not valid or something else is not correct with the messages you sent.
Thanks for the tip, If you look into my messages you can see that sometimes the message length field(9) is wrong.
Same message, but with very different sizes, I was storing the message into a vector but then I was looking for a null-terminated string to calculate the length. What a stupid mistake, now it registers to any symbol with a single message.
OUT: 8=FIX.4.4|9=144|35=V|34=5|49=live.icmarkets.****|50=******|52=20220520-19:21:27.018|57=QUOTE|56=cServer|262=reqId1|263=1|264=1|267=2|269=0|269=1|146=1|55=1|10=149|
OUT: 8=FIX.4.4|9=410|35=V|34=7|49=live.icmarkets.*****50=******|52=20220520-19:21:53.622|57=QUOTE|56=cServer|262=reqId5|263=1|264=1|267=2|269=0|269=1|146=1|55=14|10=203|
@swapd0
swapd0
26 May 2022, 10:13
OS-X, I've coded my own (small) FIX library.
I've seen what it's happening. Sometimes the messages that I send look like they don't reach the server, I send the login or the security list message and I don't get a message back, with that messages I can resend it without any problem until I get a response.
I've done a test, if I subscribe to a symbol but I don't get the quotes in about 5 seconds, I send the subscribe message again. After some seconds I get quotes from all symbols, but also I can get a lot of "SYMBOL ALREADY SUBSCRIBED" messages.
The problem is that for any message that I send, I don't get any confirmation message, and looks like some messages are lost or the server discards them without any error message.
@swapd0
swapd0
20 May 2022, 20:35
( Updated at: 20 May 2022, 20:52 )
After reading this post I've changed my multi-register routine to send several subscribe messages, each one for each symbol but I only get quotes from the first one.
By the way, I'm using different values for MDReqID on each request (reqId1, reqId5, reqId7...), not sure if this is right.
What I'm doing wrong?
Edited: Using the same value for MDReqID I get quotes from two symbols, although I've subscribed for 24...
Here are my request messages
OUT: 8=FIX.4.4|9=144|35=V|34=5|49=live.icmarkets.****|50=******|52=20220520-19:21:27.018|57=QUOTE|56=cServer|262=reqId1|263=1|264=1|267=2|269=0|269=1|146=1|55=1|10=149|
OUT: 8=FIX.4.4|9=410|35=V|34=7|49=live.icmarkets.*****50=******|52=20220520-19:21:53.622|57=QUOTE|56=cServer|262=reqId5|263=1|264=1|267=2|269=0|269=1|146=1|55=14|10=203|
OUT: 8=FIX.4.4|9=152|35=V|34=9|49=live.icmarkets.*****50=******|52=20220520-19:21:53.788|57=QUOTE|56=cServer|262=reqId7|263=1|264=1|267=2|269=0|269=1|146=1|55=17|10=226|
And here are the quotes, I only got from EURUSD(1)
IN:8=FIX.4.4|9=141|35=W|34=301|49=cServer|50=QUOTE|52=20220520-17:24:51.269|56=live.icmarkets.****|57=****|55=1|268=2|269=0|270=1.05502|269=1|270=1.05502|10=064|
IN:8=FIX.4.4|9=141|35=W|34=302|49=cServer|50=QUOTE|52=20220520-17:24:51.804|56=live.icmarkets.****|57=****|55=1|268=2|269=0|270=1.05503|269=1|270=1.05503|10=062|
IN:8=FIX.4.4|9=141|35=W|34=303|49=cServer|50=QUOTE|52=20220520-17:24:52.774|56=live.icmarkets.****|57=****|55=1|268=2|269=0|270=1.05502|269=1|270=1.05502|10=068|
IN:8=FIX.4.4|9=137|35=W|34=304|49=cServer|50=QUOTE|52=20220520-17:24:52.974|56=live.icmarkets.****|57=****|55=1|268=2|269=0|270=1.055|269=1|270=1.055|10=136|
IN:8=FIX.4.4|9=141|35=W|34=305|49=cServer|50=QUOTE|52=20220520-17:24:53.182|56=live.icmarkets.****|57=****|55=1|268=2|269=0|270=1.05499|269=1|270=1.05499|10=094|
IN:8=FIX.4.4|9=141|35=W|34=306|49=cServer|50=QUOTE|52=20220520-17:24:53.410|56=live.icmarkets.****|57=****|55=1|268=2|269=0|270=1.05498|269=1|270=1.05498|10=087|
IN:8=FIX.4.4|9=141|35=W|34=307|49=cServer|50=QUOTE|52=20220520-17:24:54.457|56=live.icmarkets.****|57=*****|55=1|268=2|269=0|270=1.05497|269=1|270=1.05497|10=098|
@swapd0
swapd0
03 Nov 2021, 10:14
( Updated at: 03 Nov 2021, 10:23 )
RE:
amusleh said:
Hi,
Field 108 is for heart beat interval and its required, here is a valid logon message that I just tested:
8=FIX.4.4|9=195|35=A|49=demo.ctrader.***|34=1|56=cServer|57=TRADE|50=TRADE|52=20211103-06:04:54.485|98=0|108=30|141=Y|553=***|554=***|10=026|
Are you sure you are connected to Trade end point? please check the host and port, maybe you are using Quotes port instead of Trade port.
This!
Thanks Amusleh
Although now I have this error. Is weird because I generate the timestamp with the same function and it works for a quote session.
Error: Invalid Logon message: SendingTime accuracy problem, field=52
Edited:
Ok, I'm sending messages with the time 7:15:xxx, the server responds with time 8:15:xx, although I've 9:15:xx on my computer.
@swapd0
swapd0
03 Nov 2021, 09:42
RE:
PanagiotisCharalampous said:
Hi swapd0,
Can you check if you can reproduce this problem using FIX API Sample? If you can connect using the sample, then compare the messages to find what is different.
Best Regards,
Panagiotis
I can't test it with FIX API Sample because I have a Mac.
@swapd0
swapd0
05 Aug 2021, 11:35
RE:
PanagiotisCharalampous said:
Hi swapd0,
I cannot see such gaps on my IC Markets accounts. In any case, price feeds are a responsibility of the broker. You should contact your broker and ask them to check this.
Best Regards,
Panagiotis
I think that the bug is in cTrader, sometimes the "cached" bars miss some data because I've closed the window, log in again and the gaps are gone.
@swapd0
swapd0
26 May 2021, 18:06
( Updated at: 26 May 2021, 18:08 )
I'm going to try this.
https://ctrader.com/forum/fix-api/23354
And it works!!!
Thanks PanagiotisCharalampous for your time
@swapd0
swapd0
26 May 2021, 17:21
Not sure if you need more resolution with the timestamp but I'm coding in C++ using FIX API in C# as a reference, so everything is done from scratch and using boost library.
Send
[2021-May-26 14:18:18]8=FIX.4.4|9=122|35=A|49=live.icmarkets.1051433|56=CSERVER|57=QUOTE|34=1|52=20210526-14:18:18|98=0|108=30|141=Y|553=1051433|554=*****|10=040|
Received
[2021-May-26 14:18:18]8=FIX.4.4|9=101|35=5|34=1|49=CSERVER|50=QUOTE|52=20210526-14:18:18.608|56=live.icmarkets.1051433|58=RET_INVALID_DATA|10=250|
@swapd0
swapd0
26 May 2021, 16:39
RE:
PanagiotisCharalampous said:
Hi swapd0,
Not sure what you mean about the proxy, I think that I've nothing configurated there. Sorry, but networks are not my field.
I mean the host you use to send the FIX messages too. Based on your screenshot, it should be h60.p.ctrader.com. Can you confirm? Also I need the timestamps of the messages.
Best Regards,
Panagiotis
Nope, h10, this is my connection query. For now, I'm using port 5201, no SSL just plain text.
boost::asio::ip::tcp::resolver::query query("h10.p.ctrader.com", "5201", boost::asio::ip::tcp::resolver::query::numeric_service);
@swapd0
swapd0
09 Mar 2023, 23:41
First beta version
https://mega.nz/file/IUlHSK5A#cMDhrZVYkQYufKCuKy56shAIi4O56wNvPytxHp2V1Ns
Join to discord group if you are a mac user
https://discord.gg/G3RT9vYezm
PD: sorry for the "spam"
@swapd0