developers:websocket:quotes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developers:websocket:quotes [2025/03/15 14:27] chaddevelopers:websocket:quotes [2025/03/17 16:51] (current) chad
Line 80: Line 80:
   * **MarketDefinition** – Sent once per market, unless already received via another feed.   * **MarketDefinition** – Sent once per market, unless already received via another feed.
   * **MarketSnapshot** – Provides a full market state on initial subscription.   * **MarketSnapshot** – Provides a full market state on initial subscription.
-  * **MarketDepthUpdate** – Sends incremental changes to depth.+  * **MarketDepth** – Sends incremental changes to depth.
  
 Example MBP message handling: Example MBP message handling:
Line 97: Line 97:
             break;             break;
  
-        case ServerMessage.PayloadOneofCase.MarketDepthUpdate+        case ServerMessage.PayloadOneofCase.MarketDepth
-            ProcessMarketDepthUpdate(serverMessage.MarketDepthUpdate);+            ProcessMarketDepth(serverMessage.MarketDepth);
             break;             break;
  
Line 111: Line 111:
 ===== Market by Order (MBO) ===== ===== Market by Order (MBO) =====
  
-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 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: MBO data includes:
  
-  * **Full Order Book Snapshot** – Sent when first subscribing+  * **MarketByOrderSnapshot** – Full snapshot of the current order book state
-  * **Incremental Updates** – Sent in real-time as new orders enter or exit the book.+  * **MarketByOrderUpdate** – Incremental updates to the order book. 
  
 ==== MBO Subscription Example ==== ==== MBO Subscription Example ====
  
-Example **MarketDepthSubscribe** message for MBO:+To receive MBO data, clients send a **MarketByOrderSubscribe** message.
  
 <code> <code>
-MarketDepthSubscribe +MarketByOrderSubscribe 
-   MarketId = "XCME_C ES (M25)", +   exchange_id = "CME", 
-   SubscriptionType MarketDepthSubscriptionType.ByOrder+   contract_id = "ESM25", 
 +   market_id = "XCME_C ES (M25)", 
 +   subscribe true
 } }
 </code> </code>
Line 131: Line 134:
 ==== Unsubscribing ==== ==== Unsubscribing ====
  
-Example **MarketDepthUnsubscribe** message:+To stop receiving MBO data, clients send a **MarketByOrderSubscribe** message.
  
 <code> <code>
-MarketDepthUnsubscribe +MarketByOrderSubscribe 
-   MarketId = "XCME_C ES (M25)"+   exchange_id = "CME", 
 +   contract_id = "ESM25", 
 +   market_id = "XCME_C ES (M25)"
 +   subscribe = false
 } }
 </code> </code>
 +
  
 ==== MBO Message Handling ==== ==== MBO Message Handling ====
Line 149: Line 156:
 Example MBO message handling: Example MBO message handling:
  
-<code>+<code c#>
 private void HandleMBOMessage(ServerMessage serverMessage) private void HandleMBOMessage(ServerMessage serverMessage)
 { {
     switch (serverMessage.PayloadCase)     switch (serverMessage.PayloadCase)
     {     {
 +        case ServerMessage.PayloadOneofCase.MarketByOrderSubscribeReject:
 +            ProcessMarketByOrderSubscribeReject(serverMessage.MarketByOrderSubscribeReject);
 +            break;
 +            
         case ServerMessage.PayloadOneofCase.MarketDefinition:         case ServerMessage.PayloadOneofCase.MarketDefinition:
             ProcessMarketDefinition(serverMessage.MarketDefinition);             ProcessMarketDefinition(serverMessage.MarketDefinition);
-            _logger.LogInformation("Received market definition: {MarketId}", serverMessage.MarketDefinition.MarketId); 
             break;             break;
  
         case ServerMessage.PayloadOneofCase.MarketSnapshot:         case ServerMessage.PayloadOneofCase.MarketSnapshot:
             ProcessMarketSnapshot(serverMessage.MarketSnapshot);             ProcessMarketSnapshot(serverMessage.MarketSnapshot);
-            _logger.LogInformation("Received MBO snapshot: {MarketId}", serverMessage.MarketSnapshot.MarketId); 
             break;             break;
  
         case ServerMessage.PayloadOneofCase.MarketOrderUpdate:         case ServerMessage.PayloadOneofCase.MarketOrderUpdate:
             ProcessMarketOrderUpdate(serverMessage.MarketOrderUpdate);             ProcessMarketOrderUpdate(serverMessage.MarketOrderUpdate);
-            _logger.LogInformation("Received MBO order update: {MarketId}", serverMessage.MarketOrderUpdate.MarketId); 
             break;             break;
  
Line 175: Line 183:
 } }
 </code> </code>
 +
  
 ===== Delayed vs. Non-Delayed Data ===== ===== Delayed vs. Non-Delayed Data =====
Line 181: Line 190:
  
   * They have an expired simulator account.   * They have an expired simulator account.
-  * Their market data entitlements do not allow real-time access.+  * Their market data setup only permits delayed data.
  
 A **flag on the messages** indicates whether the data is delayed. Clients should check this flag before displaying market data. A **flag on the messages** indicates whether the data is delayed. Clients should check this flag before displaying market data.
- 
-Example **MarketDefinition** field: 
  
 ^ **Field** ^ **Description** ^ ^ **Field** ^ **Description** ^
-IsDelayed | `true` if the market data is delayed, `false` if real-time. |+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. If delayed data is received, clients should notify users that the feed is not real-time.
 +
 +
 +<bootnote>
 +T4 does not support delayed MBO data at this time.
 +</bootnote>
 +
 +
 +===== Secondary Market Data =====
 +
 +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. |
 +
 +
 +
 +
 +
  • developers/websocket/quotes.1742048862.txt.gz
  • Last modified: 2025/03/15 14:27
  • by chad