The Quote Feed provides real-time market data in two formats: Market by Price (MBP) and Market by Order (MBO).
The available depth and data type depend on the subscription request and the user’s market data setup.
MBP provides an aggregated view of the market. It groups orders at each price level, showing either:
A MBP subscription is configured with DepthBuffer and DepthLevel options.
Value | Description |
---|---|
NoSubscription | Used to unsubscribe the market quote feed. |
Slow | A buffered feed that provides a reduced rate of updates. |
SlowTrade | Same as Slow, but will deliver every trade. |
Smart | A minimally buffered feed that is guaranteed to provide every change to best bid/offer. |
SmartTrade | Same as Smart, but will deliver every trade. |
Note: *Smart* is typically what a trading client front end would use.
Note: The “Trade” buffers are needed when displaying a trade ticker or Time and Sales display, or updating a chart.
Value | Description |
---|---|
Undefined | Used during unsubscription. |
BestOnly | Only the best bid and offer will be provided. (Also called Top of Book, TOB.) |
Normal | The full depth (as provided by the exchange) will be provided (typically top 10 bids and offers.) |
To receive MBP data, clients send a MarketDepthSubscribe message.
MarketDepthSubscribe { ExchangeId = "CME", ContractId = "ESM25", MarketId = "XCME_C ES (M25)", Buffer = DepthBuffer.Smart, DepthLevels = DepthLevels.Normal }
To stop receiving MBP data, clients send a MarketDepthSubscribe message.
MarketDepthSubscribe { ExchangeId = "CME", ContractId = "ESM25", MarketId = "XCME_C ES (M25)", Buffer = DepthBuffer.NoSubscription, DepthLevels = DepthLevels.Undefined }
After subscribing, the following messages are received:
Example MBP message handling:
private void HandleMarketMessage(ServerMessage serverMessage) { switch (serverMessage.PayloadCase) { case ServerMessage.PayloadOneofCase.MarketDefinition: ProcessMarketDefinition(serverMessage.MarketDefinition); break; case ServerMessage.PayloadOneofCase.MarketSnapshot: ProcessMarketSnapshot(serverMessage.MarketSnapshot); break; case ServerMessage.PayloadOneofCase.MarketDepth: ProcessMarketDepth(serverMessage.MarketDepth); break; default: _logger.LogWarning("Unhandled Market Message: {PayloadCase}", serverMessage.PayloadCase); break; } }
MBO provides a detailed view of the market by reporting every individual order in the book. Unlike MBP, which aggregates orders at price levels, MBO allows clients to track order-level movements. MBO also allows clients to determine their position in queue in the market.
MBO data includes:
To receive MBO data, clients send a MarketByOrderSubscribe message.
MarketByOrderSubscribe { exchange_id = "CME", contract_id = "ESM25", market_id = "XCME_C ES (M25)", subscribe = true }
To stop receiving MBO data, clients send a MarketByOrderSubscribe message.
MarketByOrderSubscribe { exchange_id = "CME", contract_id = "ESM25", market_id = "XCME_C ES (M25)", subscribe = false }
After subscribing, the following messages are received:
Example MBO message handling:
private void HandleMBOMessage(ServerMessage serverMessage) { switch (serverMessage.PayloadCase) { case ServerMessage.PayloadOneofCase.MarketByOrderSubscribeReject: ProcessMarketByOrderSubscribeReject(serverMessage.MarketByOrderSubscribeReject); break; case ServerMessage.PayloadOneofCase.MarketDefinition: ProcessMarketDefinition(serverMessage.MarketDefinition); break; case ServerMessage.PayloadOneofCase.MarketSnapshot: ProcessMarketSnapshot(serverMessage.MarketSnapshot); break; case ServerMessage.PayloadOneofCase.MarketOrderUpdate: ProcessMarketOrderUpdate(serverMessage.MarketOrderUpdate); break; default: _logger.LogWarning("Unhandled MBO Message: {PayloadCase}", serverMessage.PayloadCase); break; } }
Clients may receive delayed market data if:
A flag on the messages indicates whether the data is delayed. Clients should check this flag before displaying market data.
Field | Description |
---|---|
Delayed | `true` if the market data is delayed, `false` if real-time. |
If delayed data is received, clients should notify users that the feed is not real-time.
Note: T4 does not support delayed MBO data at this time.
In addition to quotes, a market data feed subscription will include secondary market data:
Message | Description |
---|---|
MarketDepthTrade | If a `Trade` feed is subscribed, the trade ticker is sent as a feed of MarketDepthTrade messages. |
MarketHighLow | Publishes updates to the high and low prices reached by the market. |
MarketPriceLimits | Publishes the price limits (bands or collars) set by the exchange for the market. |
MarketSettlement | Contains the latest market settlement, held settlment, open interest, cleared volume and VWAP information as published by the exchange. |