Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
developers:websocket:quotes [2025/03/15 14:27] – chad | developers: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: |
- | | + | |
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 | + | To receive MBO data, clients send a **MarketByOrderSubscribe** message. |
< | < | ||
- | MarketDepthSubscribe | + | MarketByOrderSubscribe |
- | MarketId | + | exchange_id = " |
- | SubscriptionType | + | |
+ | | ||
+ | subscribe | ||
} | } | ||
</ | </ | ||
Line 131: | Line 134: | ||
==== Unsubscribing ==== | ==== Unsubscribing ==== | ||
- | Example | + | To stop receiving MBO data, clients send a **MarketByOrderSubscribe** message. |
< | < | ||
- | MarketDepthUnsubscribe | + | MarketByOrderSubscribe |
- | MarketId | + | exchange_id = " |
+ | | ||
+ | | ||
+ | | ||
} | } | ||
</ | </ | ||
+ | |||
==== MBO Message Handling ==== | ==== MBO Message Handling ==== | ||
Line 149: | Line 156: | ||
Example MBO message handling: | Example MBO message handling: | ||
- | < | + | < |
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(" | ||
break; | break; | ||
case ServerMessage.PayloadOneofCase.MarketSnapshot: | case ServerMessage.PayloadOneofCase.MarketSnapshot: | ||
ProcessMarketSnapshot(serverMessage.MarketSnapshot); | ProcessMarketSnapshot(serverMessage.MarketSnapshot); | ||
- | _logger.LogInformation(" | ||
break; | break; | ||
case ServerMessage.PayloadOneofCase.MarketOrderUpdate: | case ServerMessage.PayloadOneofCase.MarketOrderUpdate: | ||
ProcessMarketOrderUpdate(serverMessage.MarketOrderUpdate); | ProcessMarketOrderUpdate(serverMessage.MarketOrderUpdate); | ||
- | _logger.LogInformation(" | ||
break; | break; | ||
Line 175: | Line 183: | ||
} | } | ||
</ | </ | ||
+ | |||
===== 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 | + | | Delayed |
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. | ||
+ | |||
+ | |||
+ | < | ||
+ | T4 does not support delayed MBO data at this time. | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== 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. | | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ |