Cannot Request For Positions
Cannot Request For Positions
31 Jul 2020, 06:25
I'm working with FIX API and get a problem with current open positions.
After sending the RequestForPositions message, I received ResendRequest back.
The OrderMassStatusRequest still works perfectly. I don't know why. Could you please help me with this?
sending message Logon:
8=FIX.4.4|9=126|35=A|34=1|49=ctrader.99999999|57=TRADE|52=20200731-03:07:04.009|56=CSERVER|50=QUOTE|141=Y|553=99999999|554=PASSWORD|98=0|108=5|10=188|
received message Logon
8=FIX.4.4|9=100|35=A|34=1|49=CSERVER|50=TRADE|52=20200731-03:07:07.409|56=ctrader.99999999|57=QUOTE|98=0|108=5|141=Y|10=008|
sending message RequestForPositions
8=FIX.4.4|9=85|35=AN|34=2|49=ctrader.99999999|57=TRADE|52=20200731-03:07:04.617|56=CSERVER|50=QUOTE|710=34242434|10=080|
received message ResendRequest
8=FIX.4.4|9=92|35=2|34=2|49=CSERVER|50=TRADE|52=20200731-03:07:12.462|56=ctrader.99999999|57=QUOTE|7=2|16=0|10=051|
received message Heartbeat
8=FIX.4.4|9=83|35=0|34=3|49=CSERVER|50=TRADE|52=20200731-03:07:17.462|56=ctrader.99999999|57=QUOTE|10=187|
Note: I modified account/pass to ctrader.99999999/PASSWORD and 710=34242434(PosReqID) is just a random number
Replies
namth0712
01 Aug 2020, 06:16
Thank Panagiotis,
I've found the problem, It's come from the library, Body length and checksum is not correct. I don't notice this problem because other requests still work perfectly. When I try to re-order fields like the example, I found a problem in the calculation process. So I should write my base on that. Thank you again.
@namth0712
jeanmarc.cds
09 Sep 2020, 14:13
Open positions ..
Hi Panagiotis,
Reading this post It seems that
it is possible to get open positions infos. I didnt find anything about that in your documentation. Please can you provide me with the link to that function, as well as getting the balance and equity of the account.
THANKS
@jeanmarc.cds
PanagiotisCharalampous
09 Sep 2020, 15:50
Hi namth0712,
You can find all the available FIX Messages here. Balance and equity are not available via FIX.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
31 Jul 2020, 10:15
Hi namth0712,
Try reordering the fields to match our documentation example as below and let me know if this resolves the issue.
8=FIX.4.4|9=100|35=AN|49=theBroker.12345|56=CSERVER|34=99|52=20170117- 10:09:54|50=any_string|57=TRADE|710=876316401|10=103|
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous