Skip to main content
Market Data Request(V) can be used to request market data in snapshot or the incremental form. Deribit uses his message for order book requests and its change notification.

Arguments

TagNameTypeRequiredComments
262MdReqIdStringYesUnique ID assigned to this request
263SubscriptionRequestTypeintYesSubscription Request Type. Valid values:
  • 0 = Snapshot,
  • 1 = Snapshot + Updates (Subscribe),
  • 2 = Disable previous Snapshot + Update Request (Unsubscribe)
264MarketDepthintNoSee remark about MDUpdateType below
265MDUpdateTypeintwhen SubscriptionRequestType=1The type of update to subscribe to.

Valid values:

  • 0= full refresh,
  • 1= incremental refresh

9011DeribitSkipBlockTradesBooleanNoTo skip block trades. If 9011=Y then block trades will not be reported. Default is N
9012DeribitShowBlockTradeIdBooleanNoTo show block trade id. If 9012=Y and 9012=N then block trades will include BlockTrade ID as TrdMatchID (880). Default is N
100007DeribitTradeAmountintNoAmount of trades returned in the snapshot response to request for snapshot of recent trades, default 20, maximum 1000
100008DeribitSinceTimestampintNoUTC Timestamp in milliseconds (integer number of milliseconds), if specified, the response returns the trades happened since that timestamp, applicable to the request for recent trades snapshot
Group MDReqGrp
267NoMdEntryTypesNumInGroupYesNumber of entry types in the request
=>269MDEntryTypeintYes

Valid values:

  • 0 = Bid (Bid side of the order book),
  • 1 = Offer (Ask side of the order book),
  • 2 = Trade (Info about recent trades),
  • 3 = Index Value (value of Index for INDEX instruments like BTC-DERIBIT-INDEX),
  • 6 = Settlement Price (Estimated Delivery Price for INDEX instruments like BTC-DERIBIT-INDEX)
Group InstrmtMDReqGrp
146NoRelatedSymNumInGroupNoNumber of symbols requested. Necessary if more than 1 Symbol requested
=>55SymbolStringYesInstrument symbol. See instrument naming convention for more details
When requesting a subscription (SubscriptionRequestType=1), the only supported combinations are:
  • MDUpdateType=1, MarketDepth=0. This will result a Market Data - Snapshot(W) with the whole order book, followed by incremental updates (X messages) through the whole order book depth.
  • MDUpdateType=0, MarketDepth=(1,10,20). This results in Market Data - Full Refresh(W) messages, containing the entire specified order book depth. Valid values for MarketDepth are 1, 10, 20.
If multiple instrument symbols are specified then the system responds with multiple market data messages corresponding to those instruments.

Response

If the server is unable to supply the requested data, it will respond with a Market Data Request Reject(Y) message. If the request called for a snapshot (SubscriptionRequestType(263)=0), the server will respond with a Market Data - Snapshot/Full Refresh(W) message. If the request called for a snapshot and subscription (SubscriptionRequestType(263)=1), the server will start sending Market Data - Incremental Refresh(X) messages.