Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 14:17:22 +0000



Post From: [DTC] Subscribing to market data correctly

[2019-03-19 10:58:53]
taffer - Posts: 3
My problem is that the steps in the specification (https://dtcprotocol.org/index.php?page=doc/DTCMessageDocumentation.php#MarketData) simply do not work as described. Though I managed to find out some workaround, I am still unable to control the SymbolID sent by the server in various messages.

Issue 1: MARKET_DATA_REQUEST handling
• By default the server does not respond to MARKET_DATA_REQUEST at all! Not even a reject. I have to open an intraday chart in the Sierra GUI first for the selected symbol.
• If I opened an intraday chart for the symbol at least once, the server responds to my subscription request; however, the SymbolID in the response is an arbitrarily chosen value and does not equal to the one I sent in my request! Even worse, this ID can vary for a symbol if I shut down and restart Sierra. After a while I get a SECURITY_DEFINITION_RESPONSE from which I can sync the IDs as its RequestID seems to be the same as the SymbolID in the market data messages. This is not described so in the specs, though.

Issue 2: Security Definition handling
• If I already opened intraday charts for some symbols when I connect to Sierra, I will get the SECURITY_DEFINITION_RESPONSE messages automatically (regardless whether I checked Auto Send Security Definition For New Symbols in the GUI). Now I use this for initializing symbols in advance.
• However, if I want to subscribe to a new symbol I bump into the first issue. I tried to overcome this by sending a SECURITY_DEFINITION_FOR_SYMBOL_REQUEST first but the server simply ignores this request! Again, if I open an intraday chart and then I send a MARKET_DATA_REQUEST, then I will start to get market data with a random SymbolID, and after a while I will get also the SECURITY_DEFINITION_RESPONSE with an arbitrary RequestID, which is different from the ones I used in the SECURITY_DEFINITION_FOR_SYMBOL_REQUEST and MARKET_DATA_REQUEST messages but after all I can sync the ID. The market data messages recieved between my MARKET_DATA_REQUEST and the lately received SECURITY_DEFINITION_RESPONSE will be either lost (if I don't recognize the ID) or misinterpreted (if I associated the ID with another symbol).

Questions:
1. Can I get market data purely by DTC, without the need of clicking in the Sierra GUI?
2. Is it possible to get the same SymbolID I sent in the request? I would prefer a reject message in case of conflict rather than no response at all.
3. If the answer for question 2. is no, then would it be possible to negotiate the SymbolID in advance? Eg. by getting a response for a security definition request as it is expected based on the specs? Again, without clicking in the GUI I will not get any SECURITY_DEFINITION_RESPONSE even if I request it; I get it automatically later containing an arbitrary ID.

And please, could you update the documentation accordingly?
Date Time Of Last Edit: 2019-03-19 11:04:02