Documentation Index
Fetch the complete documentation index at: https://docs.deribit.com/llms.txt
Use this file to discover all available pages before exploring further.
Unsolicited events
Unsolicited events are sent by the exchange when activity occurs on your resting orders or quotes without you directly requesting it — for example, fills as a maker, system cancellations, or MMP triggers.Maker vs. taker fills:
OrdersFilled unsolicited events are only sent to the maker. If your order or quote was the aggressor (taker), all fill information is returned directly on the acknowledgement message (NewOrderResponse, AmendOrderResponse, or MassQuoteResponse). You will not receive a separate OrdersFilled event for taker fills.OrderPlaced (330)
Unsolicited event sent when a speed-bumped order completes the speed bump period and is entered into the book without any immediate fills. Sent to the session that originally submitted the order.| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | transactTime | int64 | 8 | Nanoseconds since epoch. Time of entry into the order book |
| 2 | execId | int64 | 8 | Exchange-assigned event ID |
| 3 | clientOrderId | int64 | 8 | Numeric client order ID |
| 4 | orderId | int64 | 8 | Numeric exchange assigned order ID |
| 5 | instrumentId | int64 | 8 | Numeric instrument ID |
| 6 | limitPrice | Price9 | 8 | Price at which the order was placed in the book |
| 7 | amount | Decimal72 | 9 | Remaining order amount |
| 8 | side | int8 | 1 | 1=BUY-1=SELL |
| 9 | orderState | int8 | 1 | 1=Active3=Cancelled (if cancelled during the speed bump period) |
OrderPlacedWithFills (332)
Unsolicited event sent when a speed-bumped order completes the speed bump period, is entered into the book, and immediately matches. Sent to the session that originally submitted the order.| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | transactTime | int64 | 8 | Nanoseconds since epoch. Time of entry into the order book |
| 2 | execId | int64 | 8 | Exchange-assigned event ID |
| 3 | clientOrderId | int64 | 8 | Numeric client order ID |
| 4 | orderId | int64 | 8 | Numeric exchange assigned order ID |
| 5 | instrumentId | int64 | 8 | Numeric instrument ID |
| 6 | limitPrice | Price9 | 8 | Price at which the order was placed in the book |
| 7 | amount | Decimal72 | 9 | Remaining order amount after fills |
| 8 | filledAmount | Decimal72 | 9 | Total amount filled upon book entry |
| 9 | side | int8 | 1 | 1=BUY-1=SELL |
| 10 | orderState | int8 | 1 | 1=Active2=Filled |
| 11 | blockLengthOfFills | uint16 | 2 | 25 (bytes) |
| 12 | numberOfFills | uint16 | 2 | Indicates the length of the following repeating group containing all fills when the order was entered into the book |
| ->13 | matchId | int64 | 8 | Transaction ID representing match |
| ->14 | fillPrice | Price9 | 8 | Price of fill |
| ->15 | fillAmount | Decimal72 | 9 | Amount of fill |
| 16 | blockLengthOfLegs | uint16 | 2 | 34 (bytes) |
| 17 | numberOfLegs | uint16 | 2 | Indicates the length of the following repeating group containing all combo leg quantities and prices. Non-zero for trades on combo instruments only. |
| ->18 | matchId | int64 | 8 | Transaction ID representing match. |
| ->19 | instrumentId | int64 | 8 | Numeric instrument ID |
| ->20 | legPrice | Price9 | 8 | Price of this leg in the combo instrument |
| ->21 | legQty | Decimal72 | 9 | Quantity of this leg in the combo instrument |
| ->22 | legSide | int8 | 1 | 1=BUY-1=SELL |
QuoteOrdersPlaced (334)
Unsolicited event sent when one or more speed-bumped quote sides complete the speed bump period and are entered into the book. Sent to the session that originally submitted theMassQuoteRequest.
| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | transactTime | int64 | 8 | Nanoseconds since epoch. Time of entry into the order book |
| 2 | execId | int64 | 8 | Exchange-assigned event ID |
| 3 | quoteId | int64 | 8 | Numeric client quote ID from the originating MassQuoteRequest |
| 4 | mmpGroupId | int64 | 8 | Identifier of MMP group |
| 5 | blockLengthOfQuotes | uint16 | 2 | 44 (bytes) |
| 6 | numberOfQuotes | uint16 | 2 | Number of placed quote entries in this message |
| ->7 | instrumentId | int64 | 8 | Numeric instrument ID |
| ->8 | buyOrderId | int64 | 8 | Numeric exchange assigned order ID for buy side, or 0 if not placed |
| ->9 | sellOrderId | int64 | 8 | Numeric exchange assigned order ID for sell side, or 0 if not placed |
| ->10 | buyPrice | Price9 | 8 | Limit price of buy side |
| ->11 | sellPrice | Price9 | 8 | Limit price of sell side |
| ->12 | buyAmount | Decimal72 | 9 | Remaining buy amount |
| ->13 | sellAmount | Decimal72 | 9 | Remaining sell amount |
| ->14 | buyQuoteStatus | int8 | 1 | 0=Inactive1=Unmodified2=QuantityReduced3=Updated4=Filled5=CanceledByRequest6=CanceledByMmp7=CanceledBySelfMatch |
| ->15 | sellQuoteStatus | int8 | 1 | Refer to buyQuoteStatus for possible values |
OrdersFilled (300)
Event generated when one or more resting orders are filled by a taker order. This may include orders from different instruments if the taker order was for a combo instrument and matched an implied order.| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | transactTime | int64 | 8 | Nanoseconds since echo. Time of entry into the order book |
| 2 | execId | int64 | 8 | Exchange-assigned event ID |
| 3 | blockLengthOfFills | uint16 | 2 | 60 (bytes) |
| 4 | numberOfFills | uint16 | 2 | Indicates the length of the following repeating group containing all immediate fills when the order was submitted |
| ->5 | clientOrderId | int64 | 8 | Numeric client order ID. Set to the quoteId if the order was submitted as part of a MassQuote |
| ->6 | orderId | int64 | 8 | Numeric exchange assigned order ID |
| ->7 | instrumentId | int64 | 8 | Numeric instrument ID |
| ->8 | matchId | int64 | 8 | Transaction ID representing match, shared by all fills within match |
| ->9 | fillPrice | Price9 | 8 | Price of fill |
| ->10 | fillAmount | Decimal72 | 9 | Amount of fill |
| ->11 | totalFilled | Decimal72 | 9 | Cumulative amount filled |
| ->12 | side | int8 | 1 | 1=BUY -1=SELL |
| ->13 | flags | uint8 | 1 | Defined in following table |
| ->14 | reserved | int16 | 2 | Padding for byte alignment |
| 15 | blockLengthOfLegs | uint16 | 2 | 33 (bytes) |
| 16 | numberOfLegs | uint16 | 2 | Indicates the length of the following repeating group containing all combo leg quantities and prices. Non-zero for trades on combo instruments only. |
| ->17 | matchId | int64 | 8 | Transaction ID representing match. |
| ->18 | instrumentId | int64 | 8 | Numeric instrument ID. |
| ->19 | legQty | Decimal72 | 9 | Quantity of this leg in the combo instrument |
| ->20 | legPrice | Price9 | 8 | Price of this leg in the combo instrument |
| ->21 | legSide | int8 | 1 | 1=BUY -1=SELL |
| Bit number (from last to first) | Name | Description |
|---|---|---|
| 1 | isQuote | 0=False (order) 1=True (quote) |
| 2 | isFullyFilled | 0=PartiallyFilled 1=FullyFilled |
| 3 | Reserved for future use | |
| 4 | Reserved for future use | |
| 5 | Reserved for future use | |
| 6 | Reserved for future use | |
| 7 | Reserved for future use | |
| 8 | Reserved for future use |
OrdersCanceled (310)
Event generated when one or more orders and/or quotes submitted via this binary API session are canceled for some reason other than in direct response to a client request (NewOrderRequest, AmendOrderRequest, CancelOrderRequest, MassQuoteRequest). For example, due to end-of-day expiries, liquidation, admin action, or as part of a mass cancel request or MMP trigger event.| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | transactTime | int64 | 8 | Nanoseconds since epoch. Time of entry into the order book |
| 2 | execId | int64 | 8 | Exchange-assigned event ID |
| 3 | flags | uint8 | 1 | 0=isLastMessage |
| 4 | blockLengthOfOrders | uint16 | 2 | 35 (bytes) |
| 5 | numberOfOrders | uint16 | 2 | Length of the following repeating group of canceled orders |
| ->6 | clientOrderId | int64 | 8 | Numeric client order ID |
| ->7 | orderId | int64 | 8 | Numeric exchange assigned order ID |
| ->8 | instrumentId | int64 | 8 | Numeric instrument ID |
| ->9 | totalFilled | Decimal72 | 9 | Filled amount of canceled order |
| ->10 | cancelReason | int8 | 1 | See OrdersCanceled Cancel Reasons |
| ->11 | orderFlags | uint8 | 1 | 1=isQuote |
MassQuoteMmpTriggered (320)
Event generated when a mass quote Market Maker Protection limit is triggered. Followed by one or more OrderCanceled messages..| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | transactTime | int64 | 8 | Nanoseconds since echo. Time of trigger in the order book |
| 2 | execId | int64 | 8 | Exchange-assigned event ID |
| 3 | mmpGroupId | int64 | 8 | Identifier of MMP group |
| 4 | frozenUntil | int64 | 8 | Nanoseconds since epoch |
| 5 | quantityLevel | double | 8 | The total traded quantity, within a given interval, at the time of the trigger |
| 6 | vegaLevel | double | 8 | The change in vega exposure within a given interval, at the time of the trigger |
| 7 | deltaLevel | double | 8 | The change in delta within a given interval, at the time of the trigger |
| 8 | trigger | int8 | 1 | 0=quantity 1=delta 2=vega |
OrdersMmpTriggered (322)
Event generated when an orders Market Maker Protection limit is triggered. Followed by one or OrderCanceled messages.| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | transactTime | int64 | 8 | Nanoseconds since echo. Time of trigger in the order book |
| 2 | execId | int64 | 8 | Exchange-assigned event ID |
| 3 | currencyPairId | int64 | 8 | Numeric currency pair ID |
| 4 | frozenUntil | int64 | 8 | Nanoseconds since epoch |
| 5 | quantityLevel | double | 8 | The total traded quantity, within a given interval, at the time of the trigger |
| 6 | vegaLevel | double | 8 | The change in vega exposure within a given interval, at the time of the trigger |
| 7 | deltaLevel | double | 8 | The change in delta within a given interval |
| 8 | trigger | int8 | 1 | 0=quantity 1=delta 2=vega |
MassQuoteMmpUnfrozen (324)
Event generated when a mass quote Market Maker Protection group is unfrozen, either in response to a reset request or because thefrozenUntil timer elapsed.
| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | transactTime | int64 | 8 | Nanoseconds since epoch. Time of trigger in the order book |
| 2 | execId | int64 | 8 | Exchange-assigned event ID |
| 3 | mmpGroupId | int64 | 8 | Identifier of MMP group |
| 4 | correlationId | int64 | 8 | Client-assigned ID, or 0x8000000000000000 if unsolicited (timer elapsed) |
OrdersMmpUnfrozen (326)
Event generated when an orders Market Maker Protection group is unfrozen, either in response to a reset request or because thefrozenUntil timer elapsed.
| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | transactTime | int64 | 8 | Nanoseconds since epoch. Time of trigger in the order book |
| 2 | execId | int64 | 8 | Exchange-assigned event ID |
| 3 | currencyPairId | int64 | 8 | Numeric currency pair ID |
| 4 | correlationId | int64 | 8 | Client-assigned ID, or 0x8000000000000000 if unsolicited (timer elapsed) |