Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
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 SWAPREPO/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.API Key Permission: ReadGET /API/swaplend/marketdata/
MarketDataRequestRequest parameters:
Field Name | Format | Req'd | Comments | |||||
---|---|---|---|---|---|---|---|---|
MsgType | String | ✓ | V = MarketDataRequest | |||||
MsgSeqNum | SeqNum | ✓ | User generated incremental number to allow receiver to identify possible message gaps | |||||
SendingTime | UTCTimestamp | ✓ | Time of sending this message | |||||
MDReqID | String | ✓ | Must be unique, or the ID of previous Market Data Request to disable if SubscriptionRequestType = Disable previous Snapshot + Updates Request (2). | |||||
SubscriptionRequestType | Char | ✓ | Either to requerst a snapshot for current market or subscribe for streaming updates. Unsubscribe will cancel any future updates. | |||||
MarketDepth | Int | ✓ | 0 = full book depth | |||||
MDUpdateType | Int | Required if SubscriptionRequestType = Snapshot + Updates (1). Supported values: | ||||||
<MDReqGrp> | Component group✓ | <NoMDEntryTypes> Repeating group | ✓ | |||||
Number of MDEntryType fields requested.> | MDEntryType | Char | ✓ | List of Market Data Entries subcribed. Supported values: | ||||
<InstrmtMDReqGrp> Component block | ✓ | |||||||
<NoRelatedSym> | ✓ | Number of symbols (instruments) requested.> | <Instrument> Repeating group | ✓ | Insert here the set of "Instrument" (symbology) fields defined in "Common Components of Application Messages" | |||
>> | Symbol | String | BTC/USD-ON-R to get data on this specific Instrument | |||||
>> | Product | Int | 13 = FINANCING (Product or SecurityType will return ALL Repo) | |||||
>> | SecurityGroup | String | E.g. 1w to subscribe to the Market Data of all the 1 week Repo Instruments. Supported values: | |||||
>> | SecurityType | String | REPO | |||||
>> | MaturityDate | LocalMktDate | Use this field to get all Market Data for REPO instruments whose Far_Leg delivery is on this date | |||||
>> | SecurityStatus | String | E.g. 1 = Active to get all Active REPO traded in SWAPREPO/Lend, or 2 = Inactive | |||||
> | <UndInstrmtGrp> Component group<NoUnderlyings> | |||||||
>> | <UnderlyingInstrument> Component group | |||||||
>>> | UnderlyingSymbol | String | E.g. BTC/USD this is the best and recommended field to simply filter for all Repo on this currency pair. | |||||
>>> | UnderlyingCurrency | Currency | E.g. ADA → Use this field to filter for either Base or Quote currency of interest | |||||
> | Currency | Currency | E.g. EUR → Use this field to filter for the Quote (P&L) currency of your choice |
Example request:
Code Block |
---|
MsgType: V MsgSeqNum: 78267345674 SendingTime: 20220905-23:55:09.299 MDReqID: hhs578-h623 SubscriptionRequestType: 1 MarketDepth: 1 MDUpdateType: 1 MDReqGrp MDEntryType: 0,1,2 InstrmtMDReqGrp Instrument Symbol: BTC/USD-ON-R Symbol: BTC/USDT-ON-R |
Code Block | ||
---|---|---|
| ||
{ "Header": { "MsgType": "V", "MsgSeqNum": "78267345674", "SenderCompID": "SENDER", "TargetCompID": "TARGET", "SendingTime": "20220905-23:55:09.299" }, "MDReqID": "hhs578-h623", "SubscriptionRequestType": "1", "MarketDepth": "1", "MDUpdateType": "1", "MDReqGrp": [ { "MDEntryType": "0" }, { "MDEntryType": "1" }, { "MDEntryType": "2" } ], "InstrmtMDReqGrp": { "Instrument": [ { "Symbol": "BTC/USD-ON-R" }, { "Symbol": "BTC/USDT-ON-R" } ] } } |