Market Data
After connecting to the FIX server and establishing a live quoting session, the client can send a Market Data Request to subscribe to quote updates streamed by xPro.
On successful subscription, the FIX server sends an initial Market Data — Snapshot/Full Refresh and then continues to push Market Data — Incremental Refresh messages for the duration of the session.
If a subscription request cannot be executed (for example, the symbol is not found), the FIX server responds with a Market Data Request Reject message.
To terminate a subscription, send a Market Data Request with <263> SubscriptionRequestType = 2 (Unsubscribe). Logout closes the session and terminates all active subscriptions.
Market Data Request
Section titled “Market Data Request”Sent by the client to start receiving quoting data for a specified ticker symbol.
| Tag | Name | Req’d | Datatype | Description |
|---|---|---|---|---|
| — | Standard Header | Y | MsgType = V | |
| 262 | MDReqID | Y | String | Unique request identifier. If SubscriptionRequestType = 2, this is the ID of the previous request to discard. |
| 263 | SubscriptionRequestType | Y | int | 1 — Subscribe. 2 — Unsubscribe. |
| 264 | MarketDepth | Y | int | 0 — Full order book. 1 — Top-of-book only. |
| 265 | MDUpdateType | Y | int | Must always be 1 (incremental updates for changed price levels only). |
| 267 | NoMDEntryTypes | Y | int | Number of <269> MDEntryTypes requested. |
| → 269 | MDEntryType | Y | int | Side: 0 — Bid, 1 — Ask. |
| 146 | NoRelatedSym | Y | int | Number of symbols in this subscription. Must always be 1. |
| → 55 | Symbol | Y | String | Market identifier: {marketType}.{baseAssetId}_{quoteAssetId}. Example: cfd.eth_eur. |
| — | Standard Trailer | Y |
Example
Section titled “Example”8=FIX.4.4^9=136^35=V^34=7^52=20231220-08:11:50.000^49=sender_xpro_quoting^56=target_xpro_quoting^262=1235^263=1^264=0^265=1^267=1^269=1^146=1^55=spot.btc_usdt^10=241^Market Data — Snapshot/Full Refresh
Section titled “Market Data — Snapshot/Full Refresh”Sent by the FIX server after the client subscribes to a symbol. Subsequent messages will be Incremental Refreshes containing only changes since the snapshot.
| Tag | Name | Req’d | Datatype | Description |
|---|---|---|---|---|
| — | Standard Header | Y | MsgType = W | |
| 55 | Symbol | Y | String | Market identifier: {marketType}.{baseAssetId}_{quoteAssetId}. |
| 262 | MDReqID | Y | String | Identifier of the originating Market Data Request. |
| 268 | NoMDEntries | Y | int | Number of market data entries following. 0 if order book is empty. |
| → 269 | MDEntryType | C | int | Side: 0 — Bid, 1 — Ask. Required if NoMDEntries != 0. |
| → 270 | MDEntryPx | C | Price | Price of the market data entry. Required if NoMDEntries != 0. |
| → 271 | MDEntrySize | C | Qty | Tradable volume. Required if NoMDEntries != 0. |
| → 278 | MDEntryID | C | String | Unique market data entry identifier. Required if NoMDEntries != 0. |
| — | Standard Trailer | Y |
Example
Section titled “Example”8=FIX.4.4^9=502^35=W^34=48^49=cServer^50=QUOTE^52=20231222-14:40:39.983^56=demo.xpro.5010634^57=QUOTE^55=spot.btc_usdt^268=9^269=1^270=1.10338^271=3000000^278=4441516524^269=1^270=1.10337^271=1000000^278=4441516521^269=0^270=1.10333^271=500000^278=4441516520^10=036^Market Data — Incremental Refresh
Section titled “Market Data — Incremental Refresh”Continuously sent by the FIX server after the initial Snapshot. Each message contains only the changes since the previous update.
| Tag | Name | Req’d | Datatype | Description |
|---|---|---|---|---|
| — | Standard Header | Y | MsgType = X | |
| 55 | Symbol | Y | String | Market identifier: {marketType}.{baseAssetId}_{quoteAssetId}. |
| 262 | MDReqID | Y | String | Identifier of the originating Market Data Request. |
| 268 | NoMDEntries | Y | int | Number of market data entries. 0 if order book is empty. |
| → 269 | MDEntryType | C | int | Side: 0 — Bid, 1 — Ask. Required if NoMDEntries != 0. |
| → 270 | MDEntryPx | C | Price | Price of the market data entry. Required if NoMDEntries != 0. |
| → 271 | MDEntrySize | C | Qty | Tradable volume. Required if NoMDEntries != 0. |
| → 278 | MDEntryID | C | String | Unique entry ID. Must be unique if MDUpdateAction = 0 (New). Must match the previous ID if = 1 (Change) or = 2 (Delete). |
| → 279 | MDUpdateAction | C | int | 0 — New, 1 — Update, 2 — Delete. Required if NoMDEntries != 0. |
| 58 | Text | N | String | Additional information, if applicable. |
| — | Standard Trailer | Y |
Market Data Request Reject
Section titled “Market Data Request Reject”Sent by the FIX server to reject a Market Data Request due to business or technical reasons.
| Tag | Name | Req’d | Datatype | Description |
|---|---|---|---|---|
| — | Standard Header | Y | MsgType = Y | |
| 262 | MDReqID | Y | String | Identifier of the rejected Market Data Request. |
| 281 | MDReqRejReason | N | int | Reason the request was rejected. See Reject reasons. |
| 58 | Text | N | String | Detailed information about the rejection reason. |
| — | Standard Trailer | Y |
Example
Section titled “Example”8=FIX.4.4^9=124^35=Y^34=3^49=target_xpro_quoting^52=20231221-10:25:11.849^56=sender_xpro_quoting^262=1234^58=symbol 'btcusd' is not supported^10=109^Reject reasons
Section titled “Reject reasons”| Code | Meaning |
|---|---|
| 0 | Symbol not recognized |
| 1 | Duplicate <262> MDReqID |
| 2 | Insufficient bandwidth |
| 3 | Insufficient permissions |
| 4 | SubscriptionRequestType not supported |
| 5 | MarketDepth not supported |
| 6 | MDUpdateType not supported |
| 8 | MDEntryType not supported |
Business Reject
Section titled “Business Reject”Sent by the FIX server for a business-level rejection not addressed by the standard Market Data Request Reject.
| Tag | Name | Req’d | Datatype | Description |
|---|---|---|---|---|
| — | Standard Header | Y | MsgType = j | |
| 45 | RefSeqNum | Y | int | Sequence number of the rejected message (<34> MsgSeqNum). |
| 372 | RefMsgType | N | int | Type of the rejected message (<35> MsgType). |
| 380 | BusinessRejectReason | Y | int | Reason the request was rejected. See Reject reasons. |
| 58 | Text | N | String | Detailed information about the rejection reason. |
| — | Standard Trailer | Y |
Example
Section titled “Example”8=FIX.4.4^9=100^35=j^34=2^49=XCD197^52=20231219-22:30:39.617^56=Q005^45=133^58=Unsupported Message Type^372=D^380=3^10=006^Reject reasons
Section titled “Reject reasons”| Code | Meaning |
|---|---|
| 0 | Other |
| 1 | Unknown ID |
| 2 | Unknown Security |
| 3 | Unsupported <35> MsgType |
| 4 | Application not available |
| 5 | Conditionally required field missing |
| 6 | Not authorized |
| 7 | DeliverTo firm not available at this time |