Login Page - Create Account

Support Board


Date/Time: Thu, 21 Nov 2024 17:27:28 +0000



Post From: Unable to logon to DTC Server Historical Data Port

[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
imagesierra_chart_dtc_server_settings.png / V - Attached On 2024-11-19 14:47:57 UTC - Size: 255.81 KB - 10 views
Attachment Deleted.