Support Board
Date/Time: Thu, 21 Nov 2024 17:29:57 +0000
Unable to logon to DTC Server Historical Data Port
View Count: 72
[2024-11-19 14:58:02] |
User926595 - Posts: 3 |
Hi, I am using a Python Client to connect to Sierra Chart DTC Server using websockets. For the past 2 weeks I have tried several times to logon and download historical price data from the DTC Server's Historical Data Port. I am using port 11098 as the Historical Data Port and port 11099 as the listening port (See attached screenshort). I can successfully logon to port 11099 and receive "MARKET_DATA_SNAPSHOT" and "MARKET_DATA_UPDATE_BID_ASK" realtime data as shown below on the "Python Client Log for Market Data" section. However, I am unable to logon to Historical Data Port 11098 as shown below on the "Python Client Log for Historical Data" and "Sierra Chart - Message Log sections". It seems port 11098 is blocked or restricted on Sierra Chart because the python client is interpreting the historical port as "closed" whilst the Sierra Chart DTC Server is waiting for the LOGON_REQUEST message and then "Timing out". The LOGON_REQUEST message is sent but is not being accepted or received. Sierra Chart version number - 2695 Service Package - Base Advanced For DTC Server settings please see attached screenshot. I am using JSON Compact Encoding for Websocket Clients Any assistance will be greatly appreciated. ******************** Python Client Log for LOGON_REQUEST and MARKET_DATA_REQUEST on port 11099 ********************* 2024-11-19 11:56:56,138 - DTC_Client - INFO - Connecting to ws://localhost:11099 start_listening -> on_open.... 2024-11-19 11:56:56,751 - DTC_Client - INFO - On open DTCClient --> send --> message.to_JSON(): {"ClientName": "DTC Client", "HeartbeatIntervalInSeconds": 60, "Password": "XXXXXXXXX", "ProtocolVersion": 8, "TradeMode": 3, "Type": 1, "Username": "XXXXXXXXXX"} example_client_1 --> ix: 0 symbol: {'name': 'EURUSD', 'ID': 2274118876} DTCClient --> send --> message.to_JSON(): {"RequestAction": 1, "Symbol": "EURUSD", "SymbolID": 2274118876, "Type": 101} MarketDataSnapshot -> BidPrice: 1.0562200546264648 MarketDataUpdateBidAskCompact -> BidPrice: 1.0562299489974976 MarketDataUpdateBidAskCompact -> BidPrice: 1.0562299489974976 ******************* Python Client Log for LOGON_REQUEST and HISTORICAL_PRICE_DATA_REQUEST on port 11098 **************** 024-11-19 12:20:36,292 - DTC_Client - INFO - Connecting to ws://localhost:11098 2024-11-19 12:20:36,313 - DTC_Client - INFO - On open_history DTCClient --> send --> message.to_JSON(): {"ClientName": "DTC Client", "HeartbeatIntervalInSeconds": 60, "Password": "XXXXXXXXX", "ProtocolVersion": 8, "TradeMode": 3, "Type": 1, "Username": "XXXXXXXXX"} 2024-11-19 12:20:47,359 - DTC_Client - ERROR - Error historyConnection is already closed. 2024-11-19 12:20:47,359 - DTC_Client - INFO - On close_history 2024-11-19 12:20:47,359 - DTC_Client - ERROR - Connection ws://localhost:11098 stopped. Restarting... 2024-11-19 12:20:52,375 - DTC_Client - INFO - Connecting to ws://localhost:11098 2024-11-19 12:20:52,390 - DTC_Client - INFO - On open_history DTCClient --> send --> message.to_JSON(): {"ClientName": "DTC Client", "HeartbeatIntervalInSeconds": 60, "Password": "XXXXXXXXX", "ProtocolVersion": 8, "TradeMode": 3, "Type": 1, "Username": "XXXXXXXXX"} 2024-11-19 12:21:03,421 - DTC_Client - ERROR - Error historyConnection is already closed. ************************* Sierra Chart - Message Log for Historical Data Logon on port 11098 ************************** 2024-11-19 12:20:36.313 | HD Server Manager | Incoming connection from IP: 127.0.0.1 2024-11-19 12:20:36.315 | HD Server Manager | Started new historical data server. Count=1 2024-11-19 12:20:36.322 | HD Server | Thread:5684 (3) | Creating socket. 2024-11-19 12:20:36.322 | HD Server | Thread:5684 (3) | New receive buffer size: 262144 2024-11-19 12:20:36.322 | HD Server | Thread:5684 (3) | Allocated send buffers: 32 of 4096 bytes. 2024-11-19 12:20:36.322 | WSServer | HD Server | Thread:5684 (3) | Start Server 2024-11-19 12:20:36.323 | WSServer | HD Server | Thread:5684 (3) | Switch to HANDSHAKE 2024-11-19 12:20:36.323 | WSServer | HD Server | Thread:5684 (3) | Switch to READY_DATA 2024-11-19 12:20:36.323 | WSServer | HD Server | Thread:5684 (3) | Response HANDSHAKE with status code 101 2024-11-19 12:20:47.360 | HD Server | Timed out waiting for logon request. | Thread:5684 2024-11-19 12:20:47.360 | HD Server | Thread:5684 (3) | CloseSocket call. 2024-11-19 12:20:47.361 | HD Server | Thread:5684 (3) | Shutdown started. Waiting for graceful close. 2024-11-19 12:20:47.361 | HD Server | Thread:5684 (0) | CloseSocket call. 2024-11-19 12:20:47.362 | HD Server | Thread:5684 (3) | Socket gracefully closed by remote side. 2024-11-19 12:20:47.362 | HD Server | Thread:5684 (3) | Closed. 2024-11-19 12:20:47.422 | HD Server | Server thread ending. Closing socket. | Thread:5684 2024-11-19 12:20:47.423 | HD Server Manager | Current server count=0 2024-11-19 12:20:52.384 | HD Server Manager | Incoming connection from IP: 127.0.0.1 2024-11-19 12:20:52.385 | HD Server Manager | Started new historical data server. Count=1 2024-11-19 12:20:52.391 | HD Server | Thread:5664 (3) | Creating socket. 2024-11-19 12:20:52.391 | HD Server | Thread:5664 (3) | New receive buffer size: 262144 2024-11-19 12:20:52.391 | HD Server | Thread:5664 (3) | Allocated send buffers: 32 of 4096 bytes. 2024-11-19 12:20:52.392 | WSServer | HD Server | Thread:5664 (3) | Start Server 2024-11-19 12:20:52.392 | WSServer | HD Server | Thread:5664 (3) | Switch to HANDSHAKE 2024-11-19 12:20:52.392 | WSServer | HD Server | Thread:5664 (3) | Switch to READY_DATA 2024-11-19 12:20:52.392 | WSServer | HD Server | Thread:5664 (3) | Response HANDSHAKE with status code 101 2024-11-19 12:21:03.422 | HD Server | Timed out waiting for logon request. | Thread:5664 2024-11-19 12:21:03.422 | HD Server | Thread:5664 (3) | CloseSocket call. 2024-11-19 12:21:03.423 | HD Server | Thread:5664 (3) | Shutdown started. Waiting for graceful close. 2024-11-19 12:21:03.423 | HD Server | Thread:5664 (0) | CloseSocket call. 2024-11-19 12:21:03.425 | HD Server | Thread:5664 (3) | Socket gracefully closed by remote side. 2024-11-19 12:21:03.425 | HD Server | Thread:5664 (3) | Closed. 2024-11-19 12:21:03.453 | HD Server | Server thread ending. Closing socket. | Thread:5664 2024-11-19 12:21:03.453 | HD Server Manager | Current server count=0 2024-11-19 12:21:08.426 | HD Server Manager | Incoming connection from IP: 127.0.0.1 2024-11-19 12:21:08.427 | HD Server Manager | Started new historical data server. Count=1 2024-11-19 12:21:08.434 | HD Server | Thread:4188 (3) | Creating socket. 2024-11-19 12:21:08.434 | HD Server | Thread:4188 (3) | New receive buffer size: 262144 2024-11-19 12:21:08.434 | HD Server | Thread:4188 (3) | Allocated send buffers: 32 of 4096 bytes. 2024-11-19 12:21:08.434 | WSServer | HD Server | Thread:4188 (3) | Start Server 2024-11-19 12:21:08.434 | WSServer | HD Server | Thread:4188 (3) | Switch to HANDSHAKE 2024-11-19 12:21:08.434 | WSServer | HD Server | Thread:4188 (3) | Switch to READY_DATA 2024-11-19 12:21:08.434 | WSServer | HD Server | Thread:4188 (3) | Response HANDSHAKE with status code 101 2024-11-19 12:21:19.452 | HD Server | Timed out waiting for logon request. | Thread:4188 2024-11-19 12:21:19.452 | HD Server | Thread:4188 (3) | CloseSocket call. 2024-11-19 12:21:19.453 | HD Server | Thread:4188 (3) | Shutdown started. Waiting for graceful close. 2024-11-19 12:21:19.453 | HD Server | Thread:4188 (0) | CloseSocket call. 2024-11-19 12:21:19.454 | HD Server | Thread:4188 (3) | Socket gracefully closed by remote side. 2024-11-19 12:21:19.454 | HD Server | Thread:4188 (3) | Closed. 2024-11-19 12:21:19.480 | HD Server | Server thread ending. Closing socket. | Thread:4188 2024-11-19 12:21:19.480 | HD Server Manager | Current server count=0 |
sierra_chart_dtc_server_settings.png / V - Attached On 2024-11-19 14:47:57 UTC - Size: 255.81 KB - 10 views Attachment Deleted. |
[2024-11-19 17:17:17] |
John - SC Support - Posts: 36189 |
You can not access Market Data using DTC. This changed a few years ago due to exchange rules.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2024-11-19 20:23:10] |
User926595 - Posts: 3 |
By "Market Data" I guess you mean only Historical Price Data because I am getting realtime Market Data using the listening port. So this means I can only get Historical Price Data via ".scid" files and custom studies. I think the documentation needs updating to reflect this because time will be wasted if someone is not aware of this and then tries to follow the steps shown here: DTC Messages and Procedures: Historical Price Data Also the Historical Data Port and related settings should be disabled in the "DTC Protocol Server" settings section or may be display text/comment to reflect the changes. Thanks for the reply and clarification. |
[2024-11-19 20:32:51] |
Sierra_Chart Engineering - Posts: 17136 |
You should still be able to connect. Send an encoding request at the beginning of the connection before any other message, must be sent in binary, specifying the encoding that you want to use: DTC Messages and Procedures: Encoding Request Sequence 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, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2024-11-20 11:23:48] |
User926595 - Posts: 3 |
I will try the Encoding Request Sequence and Binary Encoding to see if I can connect to the historical data port. I think going forward I will use other ways such as SCID files and custom studies to get historical price data. Thanks for the info. |
To post a message in this thread, you need to log in with your Sierra Chart account: