DTC Protocol Discussion Forum
- DTC Protocol Discussion Forum |
- Search Board |
- Control Panel |
- View My Posts / Threads |
- Direct Messages
Date/Time: Fri, 29 Nov 2024 15:42:34 +0000
[Locked] - Mismatch in size of struct received over network to whats expected
View Count: 2420
[2021-03-08 14:13:20] |
User369349 - Posts: 4 |
Hi, I am developing a DTC C++ client with binary encoding. Here is the sequence I have. I send LOGON_REQUEST, get LOGON_RESPONSE back. I send MARKET_DATA_REQUESTrequest and gotMARKET_DATA_SNAPSHOT response. After this I expect trade and bid/ask updates and have coded the support for these structures in the client. These are the issues I have, can you please help? 1. I am not getting any MARKET_DATA_UPDATE_TRADE type from server. 2. I do receive the type MARKET_DATA_UPDATE_TRADE_WITH_UNBUNDLED_INDICATOR_2 struct, but size coming from network is 27, where as the size for the struct defined in DTCProtocol.h is 40. I am reading the first 2 bytes for size and next 2 for type and then the data based on size. Integer_1 is set to 0x80000 in logon request. 3. Basically I need trade updates with milliseconds timestamp after I subscribe to a symbol. Thank you |
[2021-03-22 15:18:32] |
DTC Engineering - Posts: 320 |
1. If you are receiving this message: MARKET_DATA_UPDATE_TRADE_WITH_UNBUNDLED_INDICATOR_2, then you would not receive MARKET_DATA_UPDATE_TRADE 2. We looked into this. 27 bytes is correct: DTC::s_MarketDataUpdateTradeWithUnbundledIndicator2 size: 27 3. Yes you have this. This structure supports a microsecond timestamp: DTC::s_MarketDataUpdateTradeWithUnbundledIndicator2 Date Time Of Last Edit: 2021-03-22 15:18:47
|
[2021-03-26 11:48:11] |
User369349 - Posts: 4 |
Thanks for the reply. I am interested in getting quote and trade updates. In that case setting the Integer_1 to the following value will be sufficient? Please confirm. Thank you. logonRequest.Integer_1 = 0x8 | 0x100000; |
[2021-04-21 08:57:44] |
DTC Engineering - Posts: 320 |
For the most up-to-date market data messages, set Integer1 in the Logon Request message with the following flags using a bitwise or operator:
DTC_LOGON_REQUEST_INTEGER_1_SUPPORT_UNBUNDLED_TRADES = 0x4 DTC_LOGON_REQUEST_INTEGER_1_USE_MARKET_DEPTH_UPDATE_FLOAT_WITH_MS_MESSAGES = 0x80 DTC_LOGON_REQUEST_INTEGER_1_SUPPORT_MARKET_DEPTH_SNAPSHOT_LEVEL_FLOAT = 0x800 DTC_LOGON_REQUEST_INTEGER_1_SUPPORT_MARKET_DATA_UPDATE_TRADE_WITH_UNBUNDLED_INDICATOR_2 = 0x80000 DTC_LOGON_REQUEST_INTEGER_1_SUPPORT_MARKET_DATA_UPDATE_BIDASK_MICROSECOND_MESSAGE = 0x100000 |
To post a message in this thread, you need to log in with your Sierra Chart account: