Support Board
Date/Time: Wed, 30 Apr 2025 07:29:51 +0000
DTC Protocol Integration Issue - Historical Data Requests Not Being Processed
View Count: 208
[2025-04-16 00:58:14] |
colin0021 - Posts: 30 |
Hello John, I'm working on integrating Sierra Chart with a custom trading application using the DTC protocol. While I can successfully establish the initial connection to the DTC server and subscribe to real-time data, I'm experiencing issues with historical data requests. My setup details: Sierra Chart version: 2732 (64-bit) DTC Protocol version: 8 Protocol Settings: Using JSON encoding (Type 0) Data service: SC Data Primary Connection: Port 11099 Historical Data Port: 11098 Issue Description: When my application makes historical data requests through the DTC protocol, the requests time out without receiving any data. Looking at the Sierra Chart logs, I found these errors: DTC client #50. 127.0.0.1 | Received unknown message type from client. Type = 0 HD Server | Received unknown message type from client. Ending the thread. Type: 0 DTC client #50. 127.0.0.1 | No heartbeat received after 10s. Closing network socket. I've verified that: The initial connection is successful The logon process appears to complete Real-time subscriptions work initially The Historical Data Service is enabled My questions: Is there a specific message format required for historical data requests that differs from the standard DTC JSON format? Are there any specific settings I need to configure in Sierra Chart for historical data requests to work properly? Do you have any example code or logs showing a successful historical data request that I could compare with my implementation? I'd greatly appreciate any guidance on resolving this issue. I can provide additional information or logs if needed. Thank you, |
[2025-04-16 17:16:47] |
John - SC Support - Posts: 39559 |
Due to exchange rules, you cannot get data through the DTC Protocol.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2025-04-16 17:34:18] |
colin0021 - Posts: 30 |
Hi John, Thanks very much for the quick response. I understand the exchange data rules regarding external access via DTC protocol. However, I wanted to clarify that in my specific scenario, I'm only using the DTC protocol entirely within the same local computer. To clarify further: Both Sierra Chart and my custom software run exclusively on the same physical machine. There's no external or remote access involved whatsoever. I only intend to access historical data locally through Sierra Chart’s own internal DTC protocol server running on localhost. Given this clarification, is local historical data access via the DTC protocol still prohibited by the exchange rules? Thanks again for your assistance, |
[2025-04-16 18:34:40] |
John - SC Support - Posts: 39559 |
Your clarification does not change the situation. You are not allowed to have access to the real-time data outside of Sierra Chart. Therefore, the DTC Protocol does not allow data to be accessed in any way.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2025-04-17 21:11:52] |
Sierra_Chart Engineering - Posts: 19383 |
Regarding post #1, you should not be getting those messages due to market data restrictions. There is some other problem, with how you are encoding the data being sent to the DTC server. This requires troubleshooting. Nevertheless, the data will not be accessible anyway. However, tell us one particular symbol you are trying to access data for? 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 |
[2025-04-20 20:15:52] |
colin0021 - Posts: 30 |
Hi, I'm just trying to get Sierra Chart communicate with a software I have create through DTC protocol. So you say I can't access historical data. That is fine. But I do like my software to be able to initiate trades to sierra chart via DTC protocol. I've been trying python with binary/json for a week but no luck. This weekend I try C++. But with C++ + binary I keep getting my username backward. Below is the message from sierra chart and beside username, you see "niloc" which is my name spelled backward. Please scroll down below to see my questions. 2025-04-20 16:01:24.365 | HD Server Manager | Incoming connection from IP: 127.0.0.1 2025-04-20 16:01:24.366 | HD Server Manager | Started new historical data server. Count=1 2025-04-20 16:01:24.372 | HD Server | Thread:46316 (2) | Creating socket. 2025-04-20 16:01:24.372 | HD Server | Thread:46316 (2) | New receive buffer size: 262144 2025-04-20 16:01:24.372 | HD Server | Thread:46316 (2) | Allocated send buffers: 32 of 4096 bytes. 2025-04-20 16:01:24.372 | HD Server | Unexpected DTC encoding request: 826496068 | Thread:46316 2025-04-20 16:01:24.495 | HD Server | Received login. Requesting authorization. | Username: niloc. | Thread:46316 2025-04-20 16:01:24.495 | HD Server | Login rejected: Logon rejected due to invalid username or password.. | Username: niloc. | Thread:46316 2025-04-20 16:01:24.573 | HD Server | Thread:46316 (2) | Close event error. Windows error code 10053: An established connection was aborted by the software in your host machine. * 2025-04-20 16:01:24.573 | HD Server | Thread:46316 (2) | Socket gracefully closed by remote side. 2025-04-20 16:01:24.573 | HD Server | Thread:46316 (2) | CloseSocket call. 2025-04-20 16:01:24.574 | HD Server | Thread:46316 (2) | Graceful close received or receive error. Shutdown complete. Closing socket now. 2025-04-20 16:01:24.574 | HD Server | Thread:46316 (2) | Closed. 2025-04-20 16:01:24.574 | HD Server | Thread:46316 (0) | CloseSocket call. | Number times message added: 1 2025-04-20 16:01:24.721 | HD Server | Server thread ending. Closing socket. | Username: niloc. | Thread:46316 2025-04-20 16:01:24.721 | HD Server Manager | Current server count=0 I'm implementing a DTC protocol client to connect to Sierra Chart, and I've identified and fixed an issue with the username byte order/endianness, but I'm still having authentication problems. I'm hoping you can provide guidance on the correct authentication setup. Technical Details: I've identified that Sierra Chart reads usernames in reverse byte order. For example, when I send "colin", Sierra Chart sees "niloc". I've implemented a fix in my client that reverses the username before sending: cpp// Create a reversed copy of the username std::string reversed_username = username; std::reverse(reversed_username.begin(), reversed_username.end()); // Copy the reversed string into the request strncpy(request.Username, reversed_username.c_str(), sizeof(request.Username) - 1); My client successfully connects to Sierra Chart, and I can see in the Sierra Chart logs that it's correctly receiving the reversed username: 2025-04-20 16:01:24.495 | HD Server | Received login. Requesting authorization. | Username: niloc. | Thread:46316 2025-04-20 16:01:24.495 | HD Server | Login rejected: Logon rejected due to invalid username or password. | Username: niloc. | Thread:46316 Despite Sierra Chart correctly receiving the reversed username, authentication is still failing with "invalid username or password". Configuration: DTC Protocol Server is enabled (Yes) Listening Port: 11099 (for market data) Historical Data Port: 11098 (for historical data) Require Authentication: Yes Encoding: Binary Questions: Where in Sierra Chart can I set up or view the usernames and passwords for DTC Protocol connections? Are there any default credentials I should be using for testing? Is there anything else needed for DTC authentication beyond username and password? Do you have any example code or specific format requirements for the authentication process? Any assistance you can provide would be greatly appreciated. I've gotten past the technical hurdle of the string reversal issue, but I need guidance on the correct authentication credentials to use. Thank you for your help, [Your Name] This message explains your technical progress, clearly identifies the remaining issue, and asks specific questions that their support team should be able to answer directly.RetryClaude can make mistakes. Please double-check responses.Tip: Long chats cause you to reach your usage limits faster. |
![]() ![]() |
[2025-04-21 03:44:19] |
colin0021 - Posts: 30 |
so john, you are saying both real time data and historical data are not allowed outside of sierra chart? - even though we paid for it. quote "You are not allowed to have access to the real-time data outside of Sierra Chart. Therefore, the DTC Protocol does not allow data to be accessed in any way." |
[2025-04-22 07:55:08] |
Sierra_Chart Engineering - Posts: 19383 |
No this is definitely not the case. Something is going wrong on your side: I've identified that Sierra Chart reads usernames in reverse byte order. For example, when I send "colin", Sierra Chart sees "niloc". You definitively do not have to reverse the string. This does not even make any sense. If you are reversing the string, that is not making any sense. Where in Sierra Chart can I set up or view the usernames and passwords for DTC Protocol connections? Are there any default credentials I should be using for testing? 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 Date Time Of Last Edit: 2025-04-22 07:56:00
|
[2025-04-22 15:52:34] |
colin0021 - Posts: 30 |
thanks for the reply. However, John says above, "You are not allowed to have access to the real-time data outside of Sierra Chart. Therefore, the DTC Protocol does not allow data to be accessed in any way." - this might explain why my connection with SC keeps being blocked. Regarding your authentication suggestion, I've confirmed I've tried "enabled" and "disabling" require Authentication in the DTC protocol server settings and are using my own Sierra Chart username and password credentials. Whatever the issue is I've already tried over a week trying to connect my software with SC via DTC but no luck. Now I'm exploring the ACS alternative, and it seems to be working. I hope SC doesn't change it. Date Time Of Last Edit: 2025-04-22 16:05:52
|
[2025-04-23 19:33:30] |
Sierra_Chart Engineering - Posts: 19383 |
OK but having to reverse the string does not make sense. There should never be an issue like this and we have never heard about a problem like this and we have never seen this. So we just want to focus on that one issue and solving that likely will solve any other problems you are having with the DTC protocol server.
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 Date Time Of Last Edit: 2025-04-23 19:33:43
|
To post a message in this thread, you need to log in with your Sierra Chart account: