Skip to main content
Messages
kind
type:enum
required

Instrument kind

Allowed values: future, option, spot, future_combo, option_combo

Available options: future, option, spot, future_combo, option_combo
currency
type:enum
required

Currency code or any for all

Allowed values: BTC, ETH, USDC, USDT, EURR, any

Available options: BTC, ETH, USDC, USDT, EURR, any
interval
type:enum
required

Frequency of notifications. Events will be aggregated over this interval. The value raw means no aggregation will be applied (Please note that raw interval is only available to authorized users)

Allowed values: raw, 100ms, agg2

Available options: raw, 100ms, agg2
Subscription Request
type:object

Client sends subscription request to subscribe to notification channel. Please refer to Notification page for more information.

Subscription Notification Data
type:object

Server sends subscription notification data

data
type:object
required
instrument_name
type:string

Unique instrument identifier

trades
type:object
trade_id
type:string
required

Unique (per currency) trade identifier

trade_seq
type:integer
required

The sequence number of the trade within instrument

instrument_name
type:string
required

Unique instrument identifier

timestamp
type:integer
required

The timestamp of the trade (milliseconds since the UNIX epoch)

order_type
type:enum

Order type: "limit, "market", or "liquidation"

Available options: limit, market, liquidation
advanced
type:enum

Advanced type of user order: "usd" or "implv" (only for options; omitted if not applicable)

Available options: usd, implv
order_id
type:string
required

Id of the user order (maker or taker), i.e. subscriber's order id that took part in the trade

matching_id
type:string
required

Always null

direction
type:enum
required

Direction: buy, or sell

Available options: buy, sell
tick_direction
type:enum
required

Direction of the "tick" (0 = Plus Tick, 1 = Zero-Plus Tick, 2 = Minus Tick, 3 = Zero-Minus Tick).

Available options: 0, 1, 2, 3
index_price
type:number
required

Index Price at the moment of trade

price
type:number
required

Price in base currency

amount
type:number
required

Trade amount. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin.

contracts
type:number

Trade size in contract units (optional, may be absent in historical trades)

iv
type:number

Option implied volatility for the price (Option only)

underlying_price
type:number

Underlying price for implied volatility calculations (Options only)

liquidation
type:enum

Optional field (only for trades caused by liquidation): "M" when maker side of trade was under liquidation, "T" when taker side was under liquidation, "MT" when both sides of trade were under liquidation

Available options: M, T, MT
liquidity
type:enum

Describes what was role of users order: "M" when it was maker order, "T" when it was taker order

Available options: M, T
fee
type:number
required

User's fee in units of the specified fee_currency

fee_currency
type:enum
required

Currency, i.e "BTC", "ETH", "USDC"

Available options: BTC, ETH, USDC, USDT, EURR
label
type:string

User defined label (presented only when previously set for order by user)

state
type:enum
required

Order state: "open", "filled", "rejected", "cancelled", "untriggered" or "archive" (if order was archived)

Available options: open, filled, rejected, cancelled, untriggered, archive
block_trade_id
type:string

Block trade id - when trade was part of a block trade

block_rfq_id
type:integer

ID of the Block RFQ - when trade was part of the Block RFQ

block_rfq_quote_id
type:integer

ID of the Block RFQ quote - when trade was part of the Block RFQ

reduce_only
type:string

true if user order is reduce-only

post_only
type:string

true if user order is post-only

mmp
type:boolean

true if user order is MMP

risk_reducing
type:boolean

true if user order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users)

api
type:boolean

true if user order was created with API

profit_loss
type:number

Profit and loss in base currency.

mark_price
type:number
required

Mark Price at the moment of trade

legs
type:array

Optional field containing leg trades if trade is a combo trade (present when querying for only combo trades and in combo_trades events)

combo_id
type:string

Optional field containing combo instrument name if the trade is a combo trade

combo_trade_id
type:string

Optional field containing combo trade identifier if the trade is a combo trade

quote_set_id
type:string

QuoteSet of the user order (optional, present only for orders placed with private/mass_quote)

quote_id
type:string

QuoteID of the user order (optional, present only for orders placed with private/mass_quote)

trade_allocations
type:object

List of allocations for Block RFQ pre-allocation. Each allocation specifies user_id, amount, and fee for the allocated part of the trade. For broker client allocations, a client_info object will be included.

user_id
type:integer

User ID to which part of the trade is allocated. For brokers the User ID is obstructed.

amount
type:number
required

Amount allocated to this user.

fee
type:number
required

Fee for the allocated part of the trade.

client_info
type:object

Optional client allocation info for brokers.

client_id
type:integer

ID of a client; available to broker. Represents a group of users under a common name.

client_link_id
type:integer

ID assigned to a single user in a client; available to broker.

name
type:string

Name of the linked user within the client; available to broker.

orders
type:object
order_id
type:string
required

Unique order identifier

order_state
type:enum
required

Order state: "open", "filled", "rejected", "cancelled", "untriggered"

Available options: open, filled, rejected, cancelled, untriggered, triggered
order_type
type:enum
required

Order type: "limit", "market", "stop_limit", "stop_market", "take_limit", "take_market", "trailing_stop"

Available options: market, limit, stop_market, stop_limit, take_market, take_limit, trailing_stop
original_order_type
type:enum

Original order type. Optional field

Available options: market, market_limit
time_in_force
type:enum
required

Order time in force: "good_til_cancelled", "good_til_day", "fill_or_kill" or "immediate_or_cancel"

Available options: good_til_cancelled, good_til_day, fill_or_kill, immediate_or_cancel
is_rebalance
type:boolean

Optional (only for spot). true if order was automatically created during cross-collateral balance restoration

is_liquidation
type:boolean

Optional (not added for spot). true if order was automatically created during liquidation

instrument_name
type:string
required

Unique instrument identifier

creation_timestamp
type:integer
required

The timestamp (milliseconds since the Unix epoch)

last_update_timestamp
type:integer
required

The timestamp (milliseconds since the Unix epoch)

direction
type:enum
required

Direction: buy, or sell

Available options: buy, sell
description
type:string

Price in base currency or "market_price" in case of open trigger market orders

label
type:string
required

User defined label (up to 64 characters)

post_only
type:boolean
required

true for post-only orders only

reject_post_only
type:boolean

true if order has reject_post_only flag (field is present only when post_only is true)

reduce_only
type:boolean

Optional (not added for spot). 'true for reduce-only orders only'

api
type:boolean
required

true if created with API

web
type:boolean

true if created via Deribit frontend (optional)

mobile
type:boolean

Optional field with value true added only when created with Mobile Application

refresh_amount
type:number

The initial display amount of iceberg order. Iceberg order display amount will be refreshed to that value after match consuming actual display amount. Absent for other types of orders

display_amount
type:number

The actual display amount of iceberg order. Absent for other types of orders.

amount
type:number

It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin.

contracts
type:number

It represents the order size in contract units. (Optional, may be absent in historical data).

filled_amount
type:number

Filled amount of the order. For perpetual and futures the filled_amount is in USD units, for options - in units or corresponding cryptocurrency contracts, e.g., BTC or ETH.

average_price
type:number

Average fill price of the order

advanced
type:enum

advanced type: "usd" or "implv" (Only for options; field is omitted if not applicable).

Available options: usd, implv
implv
type:number

Implied volatility in percent. (Only if advanced="implv")

usd
type:number

Option price in USD (Only if advanced="usd")

triggered
type:boolean

Whether the trigger order has been triggered

trigger
type:enum

Trigger type (only for trigger orders). Allowed values: "index_price", "mark_price", "last_price".

Available options: index_price, mark_price, last_price
trigger_price
type:number

Trigger price (Only for future trigger orders)

trigger_offset
type:number

The maximum deviation from the price peak beyond which the order will be triggered (Only for trailing trigger orders)

trigger_reference_price
type:number

The price of the given trigger at the time when the order was placed (Only for trailing trigger orders)

block_trade
type:boolean

true if order made from block_trade trade, added only in that case.

mmp
type:boolean

true if the order is a MMP order, otherwise false.

risk_reducing
type:boolean

true if the order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users), otherwise false.

replaced
type:boolean

true if the order was edited (by user or - in case of advanced options orders - by pricing engine), otherwise false.

auto_replaced
type:boolean

Options, advanced orders only - true if last modification of the order was performed by the pricing engine, otherwise false.

quote
type:boolean

If order is a quote. Present only if true.

mmp_group
type:string

Name of the MMP group supplied in the private/mass_quote request. Only present for quote orders.

quote_set_id
type:string

Identifier of the QuoteSet supplied in the private/mass_quote request. Only present for quote orders.

quote_id
type:string

The same QuoteID as supplied in the private/mass_quote request. Only present for quote orders.

trigger_order_id
type:string

Id of the trigger order that created the order (Only for orders that were created by triggered orders).

combo_order_id
type:string

Id of the combo order that created this order (only present for orders that were created as legs of a combo order).

app_name
type:string

The name of the application that placed the order on behalf of the user (optional).

mmp_cancelled
type:boolean

true if order was cancelled by mmp trigger (optional)

cancel_reason
type:enum

Enumerated reason behind cancel "user_request", "autoliquidation", "cancel_on_disconnect", "risk_mitigation", "pme_risk_reduction" (portfolio margining risk reduction), "pme_account_locked" (portfolio margining account locked per currency), "position_locked", "mmp_trigger" (market maker protection), "mmp_config_curtailment" (market maker configured quantity decreased), "edit_post_only_reject" (cancelled on edit because of reject_post_only setting), "oco_other_closed" (the oco order linked to this order was closed), "oto_primary_closed" (the oto primary order that was going to trigger this order was cancelled), "settlement" (closed because of a settlement)

Available options: user_request, autoliquidation, cancel_on_disconnect, risk_mitigation, pme_risk_reduction, pme_account_locked, position_locked, mmp_trigger, mmp_config_curtailment, edit_post_only_reject, oco_other_closed, oto_primary_closed, settlement
oto_order_ids
type:object

The Ids of the orders that will be triggered if the order is filled

trigger_fill_condition
type:enum

The fill condition of the linked order (Only for linked order types), default: `first_hit`.

  • `"first_hit"` - any execution of the primary order will fully cancel/place all secondary orders.
  • `"complete_fill"` - a complete execution (meaning the primary order no longer exists) will cancel/place the secondary orders.
  • `"incremental"` - any fill of the primary order will cause proportional partial cancellation/placement of the secondary order. The amount that will be subtracted/added to the secondary order will be rounded down to the contract size.
Available options: first_hit, complete_fill, incremental
oco_ref
type:string

Unique reference that identifies a one_cancels_others (OCO) pair.

primary_order_id
type:string

Unique order identifier

is_secondary_oto
type:boolean

true if the order is an order that can be triggered by another order, otherwise not present.

is_primary_otoco
type:boolean

true if the order is an order that can trigger an OCO pair, otherwise not present.

position
type:object
instrument_name
type:string
required

Unique instrument identifier

kind
type:enum
required

Instrument kind: "future", "option", "spot", "future_combo", "option_combo"

Available options: future, option, spot, future_combo, option_combo
average_price
type:number
required

Average price of trades that built this position

direction
type:enum
required

Direction: buy, sell or zero

Available options: buy, sell, zero
mark_price
type:number
required

Current mark price for position's instrument

delta
type:number
required

Delta parameter

gamma
type:number

Only for options, Gamma parameter

vega
type:number

Only for options, Vega parameter

theta
type:number

Only for options, Theta parameter

index_price
type:number
required

Current index price

initial_margin
type:number
required

Initial margin

maintenance_margin
type:number
required

Maintenance margin

settlement_price
type:number
required

Optional (not added for spot). Last settlement price for position's instrument 0 if instrument wasn't settled yet

total_profit_loss
type:number
required

Profit or loss from position

floating_profit_loss
type:number
required

Floating profit or loss

realized_profit_loss
type:number
required

Realized profit or loss

size
type:number
required

Position size for futures size in quote currency (e.g. USD), for options size is in base currency (e.g. BTC)

size_currency
type:number

Only for futures, position size in base currency

average_price_usd
type:number

Only for options, average price in USD

floating_profit_loss_usd
type:number

Only for options, floating profit or loss in USD

leverage
type:integer

Current available leverage for future position

realized_funding
type:number

Realized Funding in current session included in session realized profit or loss, only for positions of perpetual instruments

interest_value
type:number

Value used to calculate realized_funding (perpetual only)