Login Page - Create Account

Support Board


Date/Time: Tue, 23 Apr 2024 18:42:35 +0000



[Programming Help] - DTC Historical server keeps sending Heartbeat

View Count: 708

[2019-07-11 08:10:09]
User726340 - Posts: 30
Hi, I am using HeartbeatIntervalInSeconds = 0 , for logon request to historical server, so it doesnt send any heartbeat. But, I notice the server sends heartbeat continuously (no delay between). If I set HeartbeatIntervalInSeconds = 5, i get a heartbeat after 5 secs from server.

How can i disable heartbeat from server, so i can safely use the compressed data?
[2019-07-11 09:26:49]
Sierra Chart Engineering - Posts: 104368
Minimum heartbeat is 1 second. There is no way to disable.

No heartbeat will be sent during send of compressed data.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-07-11 15:55:07]
User726340 - Posts: 30
If the server sends heartbeat following compressed data, how can the DTC client tell the end of compressed data? I do not see any size-of-compressed-data field.

Currently I just read until EOF, but this method doesn't work as server keeps connection alive by sending heartbeat after compressed data.
[2019-07-11 20:29:29]
Sierra Chart Engineering - Posts: 104368
Compressed data is only used for historical data.

The ZLib compression protocol is very well-established on how to know the end of the compressed stream. Review the documentation for that.

We do see how a heartbeat could follow the compressed data but this is of no consequence. But we will suppress that.

The reason the server is keeping a connection open is because you as the client are not closing the connection once you have finished receiving the compressed data. Once that is done, close the connection. You are finished.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-07-11 20:30:58
[2019-07-12 05:26:27]
User726340 - Posts: 30
Thank you, it works now. I was able to let zlib decompression handle until last response (which has isFinalRecord set, i then issue socket close from dtc client).

I notice DTC historical server is only sending 1 record for intraday for lower intervals (eg: 1min, or 1 sec.) for some stocks. The intraday chart displays OK in sierrachart, not sure why i only get "1 record served". I deleted and tried again, and see same behavior. Only happens for some stocks (eg: NFLX), works OK for others (eg: IBM). Daily works for all stocks, it is just the lower intervals on some stocks.
[2019-07-12 18:13:36]
Sierra Chart Engineering - Posts: 104368
I notice DTC historical server is only sending 1 record for intraday for lower intervals (eg: 1min, or 1 sec.) for some stocks.

What are fields of the request message set to?
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-07-12 18:13:44
[2019-07-12 20:46:35]
User726340 - Posts: 30
I guess this is due to off-market time, and depending on stock the returned records could vary ? I thought NFLX and IBM would be similar, considering they are big stocks. Market hours seem to work ok, thanks.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account