Market Data Request

XCDE transmits real-time Market Data information via Websocket on a subscription basis. A Market Data Request can be tailored to return specific instruments and fields. Successful requests will return a Snapshot or a Stream of messages containing one or more Market Data Entries.

The REPO/Lend Orderbook can provide Top-of-book or Full-book information. For a full book, the Bid and Offer side may have several Market Data entries representing an aggregate of Orders at each price tier (Aggregated book).

The Market Data "SubscriptionRequestType" = 1 (Snapshot + Updates) should be used to provide an initial snapshot followed by continuous updates until the User decides to "unsbscripe" or disconnect.

In case of an empty book, no bids or asks will be returned in a given instrument. A Snapshot Full Refresh Message will return an an MDEntryType = “J” (Null Market).

Some conditions can cause the book to look crossed. Such conditions include quantity conditions as All-Or-None (AON), MinQty and MatchIncement not met.

While it is possible to specify many parameters in a request, XCDE may not support all of them. A Market Data Request Reject will be sent in response to a request that cannot be honored.

Request parameters:

Field NameFormatReq'dComments
MsgTypeStringV = MarketDataRequest
MsgSeqNumSeqNumUser generated incremental number to allow receiver to identify possible message gaps
SendingTimeUTCTimestampTime of sending this message
MDReqIDStringMust be unique, or the ID of previous Market Data Request to disable if SubscriptionRequestType = Disable previous Snapshot + Updates Request (2).
SubscriptionRequestTypeCharEither to requerst a snapshot for current market or subscribe for streaming updates. Unsubscribe will cancel any future updates.
0 = Snapshot
1 = Snapshot + Updates (Subscribe)
2 = Disable previous Snapshot + Update Request (Unsubscribe)
MarketDepthInt0 = full book depth
1 = top of book
MDUpdateTypeIntRequired if SubscriptionRequestType = Snapshot + Updates (1). Supported values:
0 = Full refresh (only available for Top of Book)
1 = Incremental refresh
<MDReqGrp> Repeating group
MDEntryTypeCharList of Market Data Entries subcribed. Supported values:
0 = Bid
1 = Offer
2 = Trade
7 = Trading Session High Price
8 = Trading Session Low Price
N = Session High Bid
O = Session Low Offer
<InstrmtMDReqGrp> Component block
<Instrument> Repeating groupInsert here the set of "Instrument" (symbology) fields defined in "Common Components of Application Messages"
>>SymbolStringBTC/USD-ON-R to get data on this specific Instrument
>>ProductInt13 = FINANCING (Product or SecurityType will return ALL Repo)
>>SecurityGroupStringE.g. 1w to subscribe to the Market Data of all the 1 week Repo Instruments. Supported values:
ID = Intra-day
ON = Overnight in the week, over week-end on Fridays
TOD-TOM = Today-Tomorrow during week-ends
1w and 2w = 1 week, 2 weeks
>>SecurityTypeStringREPO
>>MaturityDateLocalMktDateUse this field to get all Market Data for REPO instruments whose Far_Leg delivery is on this date
>>SecurityStatusStringE.g. 1 = Active to get all Active REPO traded in REPO/Lend, or 2 = Inactive
<UndInstrmtGrp> Component group
>><UnderlyingInstrument> Component group
>>>UnderlyingSymbolStringE.g. BTC/USD this is the best and recommended field to simply filter for all Repo on this currency pair.
>>>UnderlyingCurrencyCurrencyE.g. ADA → Use this field to filter for either Base or Quote currency of interest
CurrencyCurrencyE.g. EUR → Use this field to filter for the Quote (P&L) currency of your choice
Example request:
 1MsgType: V
 2MsgSeqNum: 78267345674
 3SendingTime: 20220905-23:55:09.299
 4MDReqID: hhs578-h623
 5SubscriptionRequestType: 1
 6MarketDepth: 1
 7MDUpdateType: 1
 8MDReqGrp
 9  MDEntryType: 0,1,2
10InstrmtMDReqGrp
11  Instrument
12    Symbol: BTC/USD-ON-R
13    Symbol: BTC/USDT-ON-R
 1{
 2  "Header": {
 3    "MsgType": "V",
 4    "MsgSeqNum": "78267345674",
 5    "SenderCompID": "SENDER",
 6    "TargetCompID": "TARGET",
 7    "SendingTime": "20220905-23:55:09.299"
 8  },
 9  "MDReqID": "hhs578-h623",
10  "SubscriptionRequestType": "1",
11  "MarketDepth": "1",
12  "MDUpdateType": "1",
13  "MDReqGrp": [
14    {
15      "MDEntryType": "0"
16    },
17    {
18      "MDEntryType": "1"
19    },
20    {
21      "MDEntryType": "2"
22    }
23  ],
24  "InstrmtMDReqGrp": {
25    "Instrument": [
26      {
27        "Symbol": "BTC/USD-ON-R"
28      },
29      {
30        "Symbol": "BTC/USDT-ON-R"
31      }
32    ]
33  }
34}