Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 17:21:17 +0000



Post From: DTC Server Market Depth Message Model Semantics

[2019-01-07 17:02:58]
User12089 - Posts: 350
I have two key questions regarding the implementation of custom DTC Server and when the Client of such DTC Server is Sierra Chart.

1. How is Market Depth Update supposed to work for the following book events Order Submit, Order Cancel and Order Update - specifically in relation to the "NumOrder" field of the MARKET_DEPTH_UPDATE_LEVEL DTC Market Data Message

Market Data Messages: MARKET_DEPTH_UPDATE_LEVEL [s_MarketDepthUpdateLevel structure] Server >> Client

For example if the Event is Order Cancel and the event was about 34 lots being Cancelled, then is the NumOrder supposed to contain -34 (minus 34)?

Then when there is a modification of previous Order for 57 lots to 12 lots what is the value of NumOrder supposed to be ?

Then when there is a modification of previous Order for 57 lots to 92 lots what is the value of NumOrder supposed to be ?


When MarketDepthUpdateTypeEnum = MARKET_DEPTH_DELETE_LEVEL, it seems that it wipes out the whole Price Level clean and hence is NOT applicable to the above scenarios, correct?

2. DTC Server Multithreading Model

The DTC Protocol Spec seems to imply that each client uses only ONE/Single DTC TCP/IP Connection and hence Server Thread to receive the market data messages for ALL subscribed Symbols/Instruments. Is that correct? (here by "connection / market data messages / thread" I mean connection/messages of the same type e.g. Real-Time Market Data is one such type, historical market data is a separate type etc)

When SC is the DTC Client, does it behave as specified above ie each SC Instance uses only a single TCP/IP Connection and hence DTC Server Thread for ALL subscribed symbols/instruments?

And finally, when there is e.g. a second SC Instance which connects to the same DTC Server, it will open a separate TCP/IP Connection to the same DTC Server TCP/IP Port and hence the DTC Server will create and launch a separate Thread to serve this new TCP / IP connection. But the general rule remains the same - one TCP/IP connection per SC Instance client for all subscribed symbols - correct?