Market Data Incremental Refresh
This Market Data message is used for incremental updates to keep a local book at the lowest cost of data traffic. Market Data Entries have a unique MDEntryID among all currently active Market Data Entries so they can be referenced for the purposes of deleting and replacing them.
When changing a Market Data Entry, the MDEntryID changes for a new ID, and MDEntryRefID will contain the ID of the Market Data Entry being changed.
Deletion of a Market Data Entry would not specify an MDEntryID or MDRefID, but would only remove the most recent Market Data Entry for the specified symbol and side.
A Change of a Market Data Entry would not specify an MDEntryID or MDRefID, but would only replace the most recent Market Data Entry for the specified symbol and side.
The Market Data message for incremental updates may contain any combination of new, changed, or deleted Market Data Entries, for any combination of instruments, with any combination of trades, high, low so long as the maximum message size is not exceeded. All of these types of Market Data Entries can be changed and deleted.
Adding, Changing, or Deleting Market Data Entries requires special consideration of the MDEntryPositionNo field, if receiver wishes to process it. For example, assuming ten bids for an Instrument. Adding a bid with MDEntryPositionNo = 4 requires the User to shift down other Market Data Entries, i.e. the Market Data Entry in the 4th display position will shift to the 5th, the 5th shifts to the 6th, etc. until the 10th shifts to the 11th. XCDE will NOT send a modification of all MDEntries in the 4th through 10th positions just to update the MDEntryPositionNo field; the User must infer the change.
Similarly, deleting a Market Data Entry in the 7th position causes the 8th Market Data Entry to move into the 7th position, the 9th to shift into the 8th position, etc.
To conserve bandwidth in streaming subscriptions: · An instrument will only be identified when a Market Data Entry is first created. · XCDE will refer to a previous active Market Data Entry of an instrument instead of duplicating the instrument information. · New Market Data Entries will default to the same instrument of the previous Market Data Entry in the same Market Data message (neither Symbol nor MDEntryRefID are necessary). · In the case of a change in a Market Data Entry, only the fields changing need to be sent as part of the change to the Market Data Entry (change of MDEntrySize but not MDEntryPx only requires the MDEntrySize field + MDUpdateAction and MDEntryID).
Request parameters
Field Name | Format | Req'd | Comments | |
---|---|---|---|---|
MsgType | String | ✓ | X = MarketDataIncrementalRefresh | |
MsgSeqNum | SeqNum | ✓ | User generated incremental number to allow receiver to identify possible message gaps | |
SendingTime | UTCTimestamp | ✓ | Time of sending this message | |
MDBookType | Int | Type of book (supported): 1 = Top of Book 2 = Price Depth | ||
TradeDate | LocalMktDate | Trading Date in NY local time | ||
MDReqID | Echoes back the MDReqID | |||
Repeating component <MDIncGrp> | ✓ | |||
> | MDUpdateAction | Char | ✓ | Any supported: 0 = New 1 = Change 2 = Delete |
> | MarketDepth | Int | Can be used to define the current depth of the book. | |
> | MDEntryType | Char | Conditionally required if MDUpdateAction = New(0). Cannot be changed. | |
> | MDEntryID | String | Unique among currently active entries if MDUpdateAction = New (0). Same as a previous MDEntryID if MDUpdateAction = Delete (2). Same as a previous MDEntryID if MDUpdateAction = Change (1) and MDEntryRefID is not specified. Unique among currently active entries if MDUpdateAction = Change(1) and MDEntryRefID is specified.. | |
> | MDEntryRefID | String | If MDUpdateAction = Change(1), this refers to a previous MDEntryID. | |
> | Component block <Instrument> | |||
>> | Symbol | String | BTC/USD-ON-R | |
> | MDEntryPx | Price | -1.74 | |
> | MDEntrySize | Qty | 150.1234 | |
> | TickDirection | Char | Direction of the "tick": 0 = Plus Tick 1 = Zero-Plus Tick (Zero after a Plus) 2 = Minus Tick 3 = Zero-Minus Tick (Zero after a Minus) | |
> | TradingSessionID | String | 20220826 | |
> | NumberOfOrders | Int | Number of individual orders making up an MDEntry Bid or Offer | |
> | NetChgPrevDay | PriceOffset | Net change from previous day's closing price vs. LAST traded price. | |
> | Text | String | Text to describe the Market Data Entry. Part of repeating group. | |
> | MDPriceLevel | Int | Display position of Bid or Offer, numbered from most competitive to least competitive, per market side, beginning with 1 | |
> | TransactTime | UTCTimestamp | Used to specify the time of matching of a “Last”. | |
> | MDEntrySpotRate | Float | For Bid, Offer and Last, reference price for Near_Leg at the time |
1MsgType: X
2MsgSeqNum: 89875632
3SendingTime: 20220906-23:55:56.825
4MDBookType: 1
5TradeDate: 20220907
6MDReqID: jh56238-yw5
7MDUpdateAction: 0
8MarketDepth: 1
9MDEntryType: 0
10MDEntryID: jgd529k-86543
11Symbol: BTC/USD-ID-R
12MDEntryPx: 2.76
13MDEntrySize: 320
14TickDirection: 0
15TradingSessionID: 20220907
16NumberOfOrders: 4
17Text
18MDPriceLevel: 1
19TransactTime: 20220906-23:55:56.358
20MDEntrySpotRate: 19,234
1{
2 "Header": {
3 "MsgType": "X",
4 "MsgSeqNum": "89875632",
5 "SenderCompID": "SENDER",
6 "TargetCompID": "TARGET",
7 "SendingTime": "20220906-23:55:56.825"
8 },
9 "MDBookType": "1",
10 "TradeDate": "20220907",
11 "MDReqID": "jh56238-yw5",
12 "MDIncGrp": [
13 {
14 "MDUpdateAction": "0",
15 "MarketDepth": "1",
16 "MDEntryType": "0",
17 "MDEntryID": "jgd529k-86543",
18 "Instrument": {
19 "Symbol": "BTC/USD-ID-R"
20 },
21 "MDEntryPx": "2.76",
22 "MDEntrySize": "320",
23 "TickDirection": "0",
24 "TradingSessionID": "20220907",
25 "NumberOfOrders": "4",
26 "Text": "",
27 "MDPriceLevel": "1",
28 "TransactTime": "20220906-23:55:56.358",
29 "MDEntrySpotRate": "19234"
30 }
31 ]
32}