Stop receiving callbacks from "cTrader FIX API Trade"

Created at 30 Oct 2023, 11:19
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TR

TradeND

Joined 02.08.2023

Stop receiving callbacks from "cTrader FIX API Trade"
30 Oct 2023, 11:19


Hi all,

I face one technical issue regrading to «cTrader FIX API Trade» connection.

I start my trading system on python on linux server automatically every Sunday 5 minutes before trading hours start at 21:00 UTC (market hours start at 21:05 UTC).

I receive callbacks (from cTrader Open API, cTrader FIX API Trade, cTrader FIX API Quote) that system was successfully connected.

During the night from Sunday till Monday I constantly stop receiving callbacks from «cTrader FIX API Trade» on several accounts and brokers without loosing the connection, so basically «cTrader FIX API Trade» connection is alive and I am not receiving any disconnection messages or error messages. My system send the orders to «cTrader FIX API Trade» based on tick data received from «cTrader FIX API Quote» and orders are filed without any problems (so «cTrader FIX API Quote» is working good), but I don’t receive any callback messages from those realised trades, so my system is stuck and waiting for the callback.

I created a loop function that is asking for the open trades every 5 seconds in case I don’t receive any callbacks from «cTrader FIX API Trade», but it didn’t help. I can see that my system is asking for the open trades, but I don’t receive any callback messages.

In case on Monday morning I restart my system manually, everything is working smoothly and I receive all the callbacks till end of trading hours on Friday.

On Friday I save the trading logs, stop my bot by closing the connection to all of API’s and after that reboot the server to avoid possible troubles in future.

Unfortunately, I was not able to find any solution on the internet or official cTrader documentation.

Do you have any experience with that and do you think you could help me?
Many thanks!


@TradeND
Replies

Spotware
31 Oct 2023, 08:22

Dear trader,

Thank you for reporting this issue to us. Please provide us with the following information

  1. Examples of messages with timestamp for which you have not received any responses
  2. The hostname you are using

Best regards,

cTrader Team


@Spotware

TradeND
13 Nov 2023, 10:32 ( Updated at: 13 Nov 2023, 14:22 )

RE: Stop receiving callbacks from "cTrader FIX API Trade"

Spotware said: 

Dear trader,

Thank you for reporting this issue to us. Please provide us with the following information

  1. Examples of messages with timestamp for which you have not received any responses
  2. The hostname you are using

Best regards,

cTrader Team

 

Hi, I collected some logs and I can see in case I start my trading system 5-10 minutes before market trading hours, everything is going smoothly until market is open. On market open I receive those messages (please note I use New York server time because of winter/summer time change so I don't need to change it manually every half year. 16:59 New York = 21:59 UTC time):

 

1st account:

2023-11-12 16:59:49,967 - root - INFO - RECEIVED fix api trade: 8=FIX.4.4|9=100|35=1|34=13|49=cServer|50=TRADE|52=20231112-21:59:49.959|56=demo.icmarkets.8846164|57=TRADE|112=TEST|10=148|

2023-11-12 16:59:51,968 - root - INFO - SENT fix api trade: 8=FIX.4.49=9535=049=demo.icmarkets.884616456=cServer57=TRADE50=TRADE34=752=20231112-21:59:51112=TEST10=103

2023-11-12 16:59:59,967 - root - INFO - RECEIVED fix api trade: 8=FIX.4.4|9=108|35=5|34=14|49=cServer|50=TRADE|52=20231112-21:59:59.959|56=demo.icmarkets.8846164|57=TRADE|58=Session reset|10=098|

 

2nd account:

2023-11-12 16:59:52,967 - root - INFO - RECEIVED fix api trade: 8=FIX.4.4|9=100|35=1|34=13|49=cServer|50=TRADE|52=20231112-21:59:52.959|56=demo.icmarkets.8859078|57=TRADE|112=TEST|10=150|

2023-11-12 16:59:54,968 - root - INFO - SENT fix api trade: 8=FIX.4.49=9535=049=demo.icmarkets.885907856=cServer57=TRADE50=TRADE34=752=20231112-21:59:54112=TEST10=114

2023-11-12 16:59:59,967 - root - INFO - RECEIVED fix api trade: 8=FIX.4.4|9=108|35=5|34=14|49=cServer|50=TRADE|52=20231112-21:59:59.959|56=demo.icmarkets.8859078|57=TRADE|58=Session reset|10=106|


After “58=Session reset” message I am not receiving any callbacks from Fix Trade API. In case of trading system restart I start receiving callbacks again.
Any advice how can I reconnect back to Fix Trade API without restarting the system so I will not lose first 15-20 seconds of trading hours?

I also made an experiment and one of my bot started exactly at the first minute of trading hours and there are no any problems with callbacks, however I lost first 15-20 second of trading, because my system needs some tome to connect to all the APIs, but I don't want to skip first 15-20 second of trading, because there are big moves on Forex market within first few seconds when market is open.

Many thanks for advice!


@TradeND