DTC Protocol Discussion Forum
- DTC Protocol Discussion Forum |
- Search Board |
- Control Panel |
- View My Posts / Threads |
- Direct Messages
Date/Time: Fri, 29 Nov 2024 12:41:06 +0000
DTC message responses issues
View Count: 2421
[2020-11-20 10:42:45] |
RobinhoodFR - Posts: 13 |
Hi guys! I am using the DTC protocol and it is working fine. However I have some issues: 1. Fields missing in some message responses from the dtc server For instance, when making a "SymbolsForExchangeRequest": https://www.dtcprotocol.org/index.php?page=doc/DTCMessages_SymbolDiscoverySecurityDefinitionsMessages.php#Messages-SECURITY_DEFINITION_RESPONSE The DTC client do not receive a complete response, that is to say, for all the fields names listed in the link above. I give you an example, with the symbol AAPL: {"Type":507,"RequestID":3,"SecurityType":2,"MinPriceIncrement":0.009999999776482582,"PriceDisplayFormat":2,"CurrencyValuePerIncrement":0.009999999776482582,"IsFinalMessage":1,"HasMarketDepthData":0,"Symbol":"AAPL","ExchangeSymbol":"AAPL","Currency":""} As you can see, field such as "exchange" are missing. 2. Incoherent response from the dtc server For instance, when making an "ExchangeListRequest": https://www.dtcprotocol.org/index.php?page=doc/DTCMessages_SymbolDiscoverySecurityDefinitionsMessages.php#Messages-EXCHANGE_LIST_REQUEST The dtc client receive a list of exchange that I have not subscribed to, in my case, it returns: CBOT-CME-EUREX-MS_FOREX-COMEX-NYMEX (maybe delayed data included by defaut in the sc all data package?) whereas it should at least return: NYSE-NASDAQ-AMEX-BATS-CBOE 3. Incomplete message from the dtc server I sometime receive binary messages which sometimes are not "complete". There is 2 cases. The first when I receive a part of the message that is not terminated. The second when I receive a part of the message that is not started. So encoding the message from binary to string does not lead to a full message started and terminated by "{" and "}" respectively. For example I may receive: {"Type":507,"RequestID":1,"MinPriceIncrement":0.00009999999747378752,"PriceDisplayFormat":5," And just after: ""CurrencyValuePerIncrement":0.00009999999747378752,"IsFinalMessage":0,"Symbol":"GBPCAD","Description":"British Pound / Canadian Dollar","ExchangeSymbol":"GBPCAD","Currency":"CAD"}" Of course I can deal with that. But I want to be sure that in that case, the 2 (or maybe more?) partial successives messages are part of the same message. Could you confirm? Thanks for your time and your answer! |
[2020-12-06 21:41:18] |
DTC Engineering - Posts: 320 |
We apologize for the delay with the response. 1. Not all fields are going to be set if they are not available for the symbol in Sierra Chart. It depends upon the the Symbol Settings for the symbol and other reasons. If a field is not available it will just simply not be provided in order to make the response more compact. 2. Regarding exchanges, this is provided based upon the Exchange field for the symbol in the Symbol Settings. In many cases the exchange field is not set. This is the reason why the list of exchanges is not complete. Also, it is not dependent upon what exchanges you are subscribed to with an external data feed. There is no relationship to that. 3. This is very basic and you are not handling the network socket data properly. This is not specific to how Sierra Chart is transmitting the data but how the underlying network is handling it. You need to continue to read data from the socket buffer and buffer it on your side, until you get a null terminated JSON message. Date Time Of Last Edit: 2020-12-06 21:41:48
|
To post a message in this thread, you need to log in with your Sierra Chart account: