Support Board
Date/Time: Fri, 29 Nov 2024 19:46:43 +0000
Post From: DTC Protocol - JSON heartbeat (ping client->server) - bug?
[2023-01-25 12:17:06] |
User230940 - Posts: 121 |
Hello, my heartbeat fails always. I send: Actual DateTime in Miliseconds: 1674647806
My Connection request is as follows: Which works {"Type":1,"HeartbeatIntervalInSeconds":18,"ClientName":"DTC4FMA"}\0
[b]Heartbeat as JSON Compact[/b]
{"Type":3,"F":"[0,1674647806]"}\0 WSServer | DTC client #9. 192.168.17.201 (1) | Response HANDSHAKE with status code 101 | 2023-01-25 12:52:54.122
JSON data: {"Type":1,"HeartbeatIntervalInSeconds":18,"ClientName":"DTC4FMA"} | 2023-01-25 12:52:54.154 DTC client #9. 192.168.17.201 | Requested heartbeat interval: 18 | 2023-01-25 12:52:54.158 DTC client #9. DTC4FMA. 192.168.17.201 | Received logon request. | 2023-01-25 12:52:54.158 DTC client #9. 192.168.17.201 (1) | Send: {"Type":2,"ProtocolVersion":8,"Result":1,"Integer_1":0,"MarketDepthUpdatesBestBidAndAsk":0,"TradingIsSupported":1,"OCOOrdersSupported":1,"OrderCancelReplaceSupported":1,"SecurityDefinitionsSupported":1,"HistoricalPriceDataSupported":0,"ResubscribeWhenMarketDataFeedAvailable":0,"MarketDepthIsSupported":1,"OneHistoricalPriceDataRequestPerConnection":0,"BracketOrdersSupported":1,"UsesMultiplePositionsPerSymbolAndTradeAccount":0,"MarketDataSupported":1,"ResultText":"Connected to SC DTC Protocol server. Service=cqg|SymbolSettings=cqg","ReconnectAddress":"","ServerName":"SC DTC Server. Build=44247","SymbolExchangeDelimiter":""} | 2023-01-25 12:52:54.158 DTC client #9. DTC4FMA. 192.168.17.201 | Sent successful Logon response message to client. Username: . Result text: Connected to SC DTC Protocol server. Service=cqg|SymbolSettings=cqg | 2023-01-25 12:52:54.158 JSON data: {"Type":3","F":[0,1674647578]} | 2023-01-25 12:52:59.190 JSON data: {"Type":3","F":[0,1674647583]} | 2023-01-25 12:53:04.266 JSON data: {"Type":3","F":[0,1674647588]} | 2023-01-25 12:53:09.262 DTC client #9. 192.168.17.201 (1) | Send: {"Type":3,"F":[0,1674647592,3,0,0,0,1674647592363376,0,762,0,0,3232239923]} | 2023-01-25 12:53:12.363 JSON data: {"Type":3","F":[0,1674647593]} | 2023-01-25 12:53:14.135 JSON data: {"Type":3","F":[0,1674647598]} | 2023-01-25 12:53:19.168 JSON data: {"Type":3","F":[0,1674647603]} | 2023-01-25 12:53:24.161 JSON data: {"Type":3","F":[0,1674647608]} | 2023-01-25 12:53:29.156 DTC client #9. 192.168.17.201 (1) | Send: {"Type":3,"F":[0,1674647610,1,0,0,0,1674647610473615,0,845,0,0,3232239923]} | 2023-01-25 12:53:30.473 JSON data: {"Type":3","F":[0,1674647613]} | 2023-01-25 12:53:34.154 WSServer | DTC client #9. 192.168.17.201 (1) | Timeout waiting for ping message from client. | 2023-01-25 12:53:34.459 or [b]Heartbeat as JSON[/b]
{"Type":3,"NumDroppedMessages":0,"CurrentDateTime":1674647806}\0 WSServer | DTC client #10. 192.168.17.201 (1) | Response HANDSHAKE with status code 101 | 2023-01-25 12:56:26.599
JSON data: {"Type":1,"HeartbeatIntervalInSeconds":18,"ClientName":"DTC4FMA"} | 2023-01-25 12:56:26.610 DTC client #10. 192.168.17.201 | Requested heartbeat interval: 18 | 2023-01-25 12:56:26.613 DTC client #10. DTC4FMA. 192.168.17.201 | Received logon request. | 2023-01-25 12:56:26.613 DTC client #10. 192.168.17.201 (1) | Send: {"Type":2,"ProtocolVersion":8,"Result":1,"Integer_1":0,"MarketDepthUpdatesBestBidAndAsk":0,"TradingIsSupported":1,"OCOOrdersSupported":1,"OrderCancelReplaceSupported":1,"SecurityDefinitionsSupported":1,"HistoricalPriceDataSupported":0,"ResubscribeWhenMarketDataFeedAvailable":0,"MarketDepthIsSupported":1,"OneHistoricalPriceDataRequestPerConnection":0,"BracketOrdersSupported":1,"UsesMultiplePositionsPerSymbolAndTradeAccount":0,"MarketDataSupported":1,"ResultText":"Connected to SC DTC Protocol server. Service=cqg|SymbolSettings=cqg","ReconnectAddress":"","ServerName":"SC DTC Server. Build=44247","SymbolExchangeDelimiter":""} | 2023-01-25 12:56:26.613 DTC client #10. DTC4FMA. 192.168.17.201 | Sent successful Logon response message to client. Username: . Result text: Connected to SC DTC Protocol server. Service=cqg|SymbolSettings=cqg | 2023-01-25 12:56:26.613 JSON data: {"Type":3,"NumDroppedMessages":0,"CurrentDateTime":1674647791} | 2023-01-25 12:56:31.614 JSON data: {"Type":3,"NumDroppedMessages":0,"CurrentDateTime":1674647796} | 2023-01-25 12:56:36.623 JSON data: {"Type":3,"NumDroppedMessages":0,"CurrentDateTime":1674647801} | 2023-01-25 12:56:41.613 DTC client #10. 192.168.17.201 (1) | Send: {"Type":3,"F":[0,1674647805,3,0,0,0,1674647805120806,0,762,0,0,3232239923]} | 2023-01-25 12:56:45.120 JSON data: {"Type":3,"NumDroppedMessages":0,"CurrentDateTime":1674647806} | 2023-01-25 12:56:46.634 JSON data: {"Type":3,"NumDroppedMessages":0,"CurrentDateTime":1674647811} | 2023-01-25 12:56:51.744 JSON data: {"Type":3,"NumDroppedMessages":0,"CurrentDateTime":1674647816} | 2023-01-25 12:56:56.630 JSON data: {"Type":3,"NumDroppedMessages":0,"CurrentDateTime":1674647821} | 2023-01-25 12:57:01.626 DTC client #10. 192.168.17.201 (1) | Send: {"Type":3,"F":[0,1674647823,1,0,0,0,1674647823078658,0,845,0,0,3232239923]} | 2023-01-25 12:57:03.078 JSON data: {"Type":3,"NumDroppedMessages":0,"CurrentDateTime":1674647826} | 2023-01-25 12:57:06.634 WSServer | DTC client #10. 192.168.17.201 (1) | Timeout waiting for ping message from client. | 2023-01-25 12:57:07.277 WSServer | DTC client #10. 192.168.17.201 (1) | Delay close connection now | 2023-01-25 12:57:07.664 All without any change, the connection will be closed because of missing heartbeat. Can you please tell me what I have to send to send a valid heartbeat? Do I have to answer on the Heartbeat send by the server? Or can I send the heartbeart regularly, like I did up to now? thanks in advance regards |