openapi: 3.0.0
info:
title: Deribit Account Management Market Data API
version: 2.1.1
servers:
- url: https://test.deribit.com/api/v2
tags:
- name: Market Data
paths:
/public/get_order_book:
get:
parameters:
- in: query
name: instrument_name
required: true
schema:
type: string
example: BTC-PERPETUAL
description: The instrument name for which to retrieve the order book, see [`public/get_instruments`](#public-get_instruments) to obtain instrument names.
- in: query
name: depth
required: false
schema:
type: integer
enum:
- 1
- 5
- 10
- 20
- 50
- 100
- 1000
- 10000
example: 5
description: The number of entries to return for bids and asks, maximum - `10000`.
responses:
'200':
$ref: '#/components/responses/PublicGetOrderBookResponse'
tags:
- Market Data
requestBody:
content:
application/json:
examples:
request:
value:
jsonrpc: '2.0'
id: 8772
method: public/get_order_book
params:
instrument_name: BTC-PERPETUAL
depth: 5
description: JSON-RPC Request Example
description: JSON-RPC request body
description: 'Retrieves the order book (bids and asks) for a given instrument, along with other market values such as best bid/ask prices, last trade price, mark price, and index price.
The order book depth can be controlled using the `depth` parameter, which accepts values from 1 to 10000. The response includes price levels sorted by price (bids descending, asks ascending).
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_order_book)
'
x-mint:
metadata:
title: public/get_order_book
og:title: public/get_order_book
keywords:
- public/get_order_book
- instrument_name
- depth
- timestamp
- state
- stats
- open_interest
- best_bid_price
- best_bid_amount
- best_ask_price
- best_ask_amount
- index_price
- min_price
- max_price
- mark_price
- last_price
- underlying_price
- underlying_index
- interest_rate
- bid_iv
- ask_iv
- mark_iv
- greeks
- funding_8h
- current_funding
- delivery_price
- settlement_price
- bids
- asks
- volume
- low
- high
- price_change
- volume_usd
- delta
- gamma
- rho
- theta
- vega
href: /api-reference/market-data/public-get_order_book
/public/get_order_book_by_instrument_id:
get:
parameters:
- in: query
name: instrument_id
required: true
schema:
type: integer
description: The instrument ID for which to retrieve the order book, see [`public/get_instruments`](#public-get_instruments) to obtain instrument IDs.
- in: query
name: depth
required: false
schema:
type: integer
enum:
- 1
- 5
- 10
- 20
- 50
- 100
- 1000
- 10000
description: The number of entries to return for bids and asks, maximum - `10000`.
responses:
'200':
$ref: '#/components/responses/PublicGetOrderBookResponse'
tags:
- Market Data
description: 'Retrieves the order book (bids and asks) for a given instrument ID, along with other market values such as best bid/ask prices, last trade price, mark price, and index price.
This method is similar to `get_order_book` but uses instrument ID instead of instrument name. The order book depth can be controlled using the `depth` parameter, which accepts values from 1 to 10000.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_order_book_by_instrument_id)
'
x-mint:
metadata:
title: public/get_order_book_by_instrument_id
og:title: public/get_order_book_by_instrument_id
keywords:
- public/get_order_book_by_instrument_id
- instrument_id
- depth
- instrument_name
- timestamp
- state
- stats
- open_interest
- best_bid_price
- best_bid_amount
- best_ask_price
- best_ask_amount
- index_price
- min_price
- max_price
- mark_price
- last_price
- underlying_price
- underlying_index
- interest_rate
- bid_iv
- ask_iv
- mark_iv
- greeks
- funding_8h
- current_funding
- delivery_price
- settlement_price
- bids
- asks
- volume
- low
- high
- price_change
- volume_usd
- delta
- gamma
- rho
- theta
- vega
href: /api-reference/market-data/public-get_order_book_by_instrument_id
/public/get_last_settlements_by_currency:
get:
parameters:
- name: currency
required: true
in: query
schema:
$ref: '#/components/schemas/currency'
description: The currency symbol
- in: query
name: type
required: false
schema:
$ref: '#/components/schemas/settlement_type'
description: Settlement type
- name: count
required: false
in: query
schema:
type: integer
maximum: 1000
minimum: 1
description: Number of requested items, default - `20`, maximum - `1000`
- name: continuation
in: query
required: false
schema:
type: string
example: xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT
description: Continuation token for pagination
- in: query
name: search_start_timestamp
required: false
schema:
$ref: '#/components/schemas/timestamp'
description: The latest timestamp to return result from (milliseconds since the UNIX epoch)
responses:
'200':
$ref: '#/components/responses/PublicSettlementResponse'
tags:
- Market Data
requestBody:
content:
application/json:
examples:
request:
value:
jsonrpc: '2.0'
id: 4497
method: public/get_last_settlements_by_currency
params:
currency: BTC
type: delivery
count: 2
description: JSON-RPC Request Example
description: JSON-RPC request body
description: 'Retrieves historical settlement, delivery, and bankruptcy events from all instruments within a given currency. Settlements occur when futures or options contracts expire and are settled at the delivery price.
Results can be filtered by settlement type and timestamp. Use pagination parameters (`count` and `continuation`) to retrieve large settlement histories. This data is useful for analyzing historical contract settlements and understanding market events.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_last_settlements_by_currency)
'
x-mint:
metadata:
title: public/get_last_settlements_by_currency
og:title: public/get_last_settlements_by_currency
keywords:
- public/get_last_settlements_by_currency
- currency
- type
- count
- continuation
- search_start_timestamp
- settlements
- funding
- funded
- index_price
- instrument_name
- mark_price
- position
- profit_loss
- session_bankruptcy
- session_profit_loss
- session_tax
- session_tax_rate
- socialized
- timestamp
href: /api-reference/market-data/public-get_last_settlements_by_currency
/public/get_book_summary_by_currency:
get:
parameters:
- name: currency
required: true
in: query
schema:
$ref: '#/components/schemas/currency'
description: The currency symbol
- name: kind
required: false
in: query
schema:
$ref: '#/components/schemas/kind'
description: Instrument kind, if not provided instruments of all kinds are considered
responses:
'200':
$ref: '#/components/responses/PublicGetBookSummaryResponse'
tags:
- Market Data
requestBody:
content:
application/json:
examples:
request:
value:
jsonrpc: '2.0'
id: 9344
method: public/get_book_summary_by_currency
params:
currency: BTC
kind: future
description: JSON-RPC Request Example
description: JSON-RPC request body
description: 'Retrieves summary information such as open interest, 24-hour volume, best bid/ask prices, last trade price, and other market statistics for all instruments in a given currency.
Results can be filtered by instrument kind (future, option, etc.). This method provides a quick overview of market activity across all instruments for a currency.
**Note:** For real-time updates, we recommend using the WebSocket subscription to `ticker.{instrument_name}.{interval}` instead of polling this endpoint.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_book_summary_by_currency)
'
x-mint:
metadata:
title: public/get_book_summary_by_currency
og:title: public/get_book_summary_by_currency
keywords:
- public/get_book_summary_by_currency
- currency
- kind
- instrument_name
- high
- low
- base_currency
- quote_currency
- volume
- bid_price
- ask_price
- mid_price
- mark_price
- last
- open_interest
- creation_timestamp
- estimated_delivery_price
- volume_usd
- volume_notional
- current_funding
- funding_8h
- mark_iv
- interest_rate
- underlying_index
- underlying_price
- price_change
href: /api-reference/market-data/public-get_book_summary_by_currency
/public/get_book_summary_by_instrument:
get:
parameters:
- name: instrument_name
required: true
in: query
schema:
$ref: '#/components/schemas/instrument_name'
description: Instrument name
responses:
'200':
$ref: '#/components/responses/PublicGetBookSummaryResponse'
tags:
- Market Data
requestBody:
content:
application/json:
examples:
request:
value:
jsonrpc: '2.0'
id: 3659
method: public/get_book_summary_by_instrument
params:
instrument_name: ETH-22FEB19-140-P
description: JSON-RPC Request Example
description: JSON-RPC request body
description: 'Retrieves summary information such as open interest, 24-hour volume, best bid/ask prices, last trade price, mark price, and other market statistics for a specific instrument.
This method provides a quick overview of current market activity and liquidity for a single instrument.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_book_summary_by_instrument)
'
x-mint:
metadata:
title: public/get_book_summary_by_instrument
og:title: public/get_book_summary_by_instrument
keywords:
- public/get_book_summary_by_instrument
- instrument_name
- high
- low
- base_currency
- quote_currency
- volume
- bid_price
- ask_price
- mid_price
- mark_price
- last
- open_interest
- creation_timestamp
- estimated_delivery_price
- volume_usd
- volume_notional
- current_funding
- funding_8h
- mark_iv
- interest_rate
- underlying_index
- underlying_price
- price_change
href: /api-reference/market-data/public-get_book_summary_by_instrument
/public/get_last_settlements_by_instrument:
get:
parameters:
- name: instrument_name
required: true
in: query
schema:
$ref: '#/components/schemas/instrument_name'
description: Instrument name
- in: query
name: type
required: false
schema:
$ref: '#/components/schemas/settlement_type'
description: Settlement type
- name: count
required: false
in: query
schema:
type: integer
maximum: 1000
minimum: 1
description: Number of requested items, default - `20`, maximum - `1000`
- name: continuation
in: query
required: false
schema:
type: string
example: xY7T6cutS3t2B9YtaDkE6TS379oKnkzTvmEDUnEUP2Msa9xKWNNaT
description: Continuation token for pagination
- in: query
name: search_start_timestamp
required: false
schema:
$ref: '#/components/schemas/timestamp'
description: The latest timestamp to return result from (milliseconds since the UNIX epoch)
responses:
'200':
$ref: '#/components/responses/PublicSettlementResponse'
tags:
- Market Data
requestBody:
content:
application/json:
examples:
request:
value:
jsonrpc: '2.0'
id: 5482
method: public/get_last_settlements_by_instrument
params:
instrument_name: BTC-22FEB19
type: settlement
count: 1
description: JSON-RPC Request Example
description: JSON-RPC request body
description: 'Retrieves historical settlement, delivery, and bankruptcy events for a specific instrument. Settlements occur when futures or options contracts expire and are settled at the delivery price.
Results can be filtered by settlement type and timestamp. Use pagination parameters (`count` and `continuation`) to retrieve large settlement histories. This method is useful for tracking settlement history for a specific instrument.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_last_settlements_by_instrument)
'
x-mint:
metadata:
title: public/get_last_settlements_by_instrument
og:title: public/get_last_settlements_by_instrument
keywords:
- public/get_last_settlements_by_instrument
- instrument_name
- type
- count
- continuation
- search_start_timestamp
- settlements
- funding
- funded
- index_price
- mark_price
- position
- profit_loss
- session_bankruptcy
- session_profit_loss
- session_tax
- session_tax_rate
- socialized
- timestamp
href: /api-reference/market-data/public-get_last_settlements_by_instrument
/public/get_contract_size:
get:
tags:
- Market Data
parameters:
- name: instrument_name
required: true
in: query
schema:
$ref: '#/components/schemas/instrument_name'
description: Instrument name
responses:
'200':
$ref: '#/components/responses/PublicGetContractSizeResponse'
description: 'Retrieves the contract size (also known as contract multiplier) for a given instrument. The contract size determines how many units of the underlying asset one contract represents.
This value is essential for calculating position values, margin requirements, and P&L calculations. Different instruments may have different contract sizes.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_contract_size)
'
x-mint:
metadata:
title: public/get_contract_size
og:title: public/get_contract_size
keywords:
- public/get_contract_size
- instrument_name
- contract_size
href: /api-reference/market-data/public-get_contract_size
/public/get_trade_volumes:
get:
parameters:
- name: extended
in: query
required: false
schema:
type: boolean
description: Request for extended statistics. Including also 7 and 30 days volumes (default false)
responses:
'200':
$ref: '#/components/responses/PublicGetTradesVolumesResponse'
tags:
- Market Data
description: 'Retrieves aggregated 24-hour trade volumes for different instrument types and currencies. The volume statistics include all executed trades across the platform.
**Note:** Position moves are not included in this volume. Block trades and Block RFQ trades are included in the volume calculations.
Use the `extended` parameter to include additional volume statistics and breakdowns.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_trade_volumes)
'
x-mint:
metadata:
title: public/get_trade_volumes
og:title: public/get_trade_volumes
keywords:
- public/get_trade_volumes
- extended
- currency
- calls_volume
- puts_volume
- futures_volume
- spot_volume
- calls_volume_7d
- puts_volume_7d
- futures_volume_7d
- spot_volume_7d
- calls_volume_30d
- puts_volume_30d
- futures_volume_30d
- spot_volume_30d
href: /api-reference/market-data/public-get_trade_volumes
/public/get_index_price:
get:
parameters:
- name: index_name
required: true
in: query
schema:
$ref: '#/components/schemas/index_name'
description: Index identifier, matches (base) cryptocurrency with quote currency
responses:
'200':
$ref: '#/components/responses/PublicGetIndexPriceResponse'
tags:
- Market Data
description: 'Retrieves the current index price value for a given index name. Index prices are used as reference prices for mark price calculations and settlement.
Use `get_index_price_names` or `get_supported_index_names` to retrieve available index names.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_index_price)
'
x-mint:
metadata:
title: public/get_index_price
og:title: public/get_index_price
keywords:
- public/get_index_price
- index_name
- index_price
- estimated_delivery_price
href: /api-reference/market-data/public-get_index_price
/public/get_index_price_names:
get:
tags:
- Market Data
parameters:
- name: extended
in: query
required: false
schema:
type: boolean
default: false
example: true
description: When set to `true`, returns additional information including `future_combo_creation_enabled` and `option_combo_creation_enabled` for each index
responses:
'200':
$ref: '#/components/responses/PublicGetIndexPriceNamesResponse'
requestBody:
content:
application/json:
examples:
request:
value:
jsonrpc: '2.0'
id: 1
method: public/get_index_price_names
params:
extended: true
description: JSON-RPC Request Example
description: JSON-RPC request body
description: 'Retrieves the identifiers (names) of all supported price indexes. Price indexes are reference prices used for mark price calculations, settlement, and other market operations.
When the `extended` parameter is set to `true`, the response includes additional information such as whether future combo creation and option combo creation are enabled for each index.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_index_price_names)
'
x-mint:
metadata:
title: public/get_index_price_names
og:title: public/get_index_price_names
keywords:
- public/get_index_price_names
- extended
- name
- future_combo_creation_enabled
- option_combo_creation_enabled
href: /api-reference/market-data/public-get_index_price_names
/public/get_supported_index_names:
get:
parameters:
- name: type
required: false
in: query
schema:
type: string
enum:
- all
- spot
- derivative
description: Type of a cryptocurrency price index
responses:
'200':
$ref: '#/components/responses/PublicGetIndexPriceNamesResponse'
tags:
- Market Data
description: 'Retrieves the identifiers (names) of all supported price indexes, optionally filtered by index type. Price indexes are reference prices used for mark price calculations, settlement, and other market operations.
Use the `type` parameter to filter indexes by type (e.g., spot, futures, etc.). This method helps discover available indexes for use with other API methods.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_supported_index_names)
'
x-mint:
metadata:
title: public/get_supported_index_names
og:title: public/get_supported_index_names
keywords:
- public/get_supported_index_names
- type
- name
- future_combo_creation_enabled
- option_combo_creation_enabled
href: /api-reference/market-data/public-get_supported_index_names
/public/get_instruments:
get:
tags:
- Market Data
parameters:
- name: currency
required: true
in: query
schema:
$ref: '#/components/schemas/currency_with_any'
description: The currency symbol or `"any"` for all
- name: kind
required: false
in: query
schema:
$ref: '#/components/schemas/kind'
description: Instrument kind, if not provided instruments of all kinds are considered
- name: expired
in: query
schema:
type: boolean
default: false
description: Set to true to show recently expired instruments instead of active ones.
required: false
responses:
'200':
$ref: '#/components/responses/PublicGetInstrumentsResponse'
requestBody:
content:
application/json:
examples:
request:
value:
jsonrpc: '2.0'
id: 1
method: public/get_instruments
params:
currency: BTC
kind: future
description: JSON-RPC Request Example
description: JSON-RPC request body
description: 'Retrieves available trading instruments. This method can be used to see which instruments are available for trading, or which instruments have recently expired.
**Note - This method has distinct API rate limiting requirements:** Sustained rate: 1 request/second. To avoid rate limits, we recommend using either the REST requests for server-cached data or the WebSocket subscription to [instrument_state.{kind}.{currency}](https://docs.deribit.com/api-reference/subscription-channels/instrument-state-kind-currency) for real-time updates. For more information, see [Rate Limits](https://support.deribit.com/hc/en-us/articles/25944617523357-Rate-Limits).
Results can be filtered by currency and instrument kind (future, option, etc.). Set the `expired` parameter to `true` to retrieve recently expired instruments instead of active ones.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_instruments)
'
x-mint:
metadata:
title: public/get_instruments
og:title: public/get_instruments
keywords:
- public/get_instruments
- currency
- kind
- expired
- settlement_currency
- counter_currency
- base_currency
- quote_currency
- min_trade_amount
- instrument_name
- instrument_id
- is_active
- settlement_period
- creation_timestamp
- tick_size
- tick_size_steps
- expiration_timestamp
- strike
- option_type
- future_type
- instrument_type
- contract_size
- maker_commission
- taker_commission
- max_liquidation_commission
- block_trade_commission
- block_trade_tick_size
- block_trade_min_trade_amount
- max_leverage
- price_index
- state
- above_price
href: /api-reference/market-data/public-get_instruments
/public/get_instrument:
get:
tags:
- Market Data
parameters:
- name: instrument_name
required: true
in: query
schema:
$ref: '#/components/schemas/instrument_name'
description: Instrument name
responses:
'200':
$ref: '#/components/responses/PublicGetInstrumentResponse'
requestBody:
content:
application/json:
examples:
request:
value:
jsonrpc: '2.0'
id: 2
method: public/get_instrument
params:
instrument_name: BTC-13JAN23-16000-P
description: JSON-RPC Request Example
description: JSON-RPC request body
description: 'Retrieves detailed information about a specific instrument, including instrument specifications, contract details, tick size, settlement currency, expiration date (for futures and options), strike price (for options), and other instrument parameters.
This method is useful for obtaining instrument metadata needed for trading operations and calculations.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_instrument)
'
x-mint:
metadata:
title: public/get_instrument
og:title: public/get_instrument
keywords:
- public/get_instrument
- instrument_name
- kind
- settlement_currency
- counter_currency
- base_currency
- quote_currency
- min_trade_amount
- instrument_id
- is_active
- settlement_period
- creation_timestamp
- tick_size
- tick_size_steps
- expiration_timestamp
- strike
- option_type
- future_type
- instrument_type
- contract_size
- maker_commission
- taker_commission
- max_liquidation_commission
- block_trade_commission
- block_trade_tick_size
- block_trade_min_trade_amount
- max_leverage
- price_index
- state
- above_price
href: /api-reference/market-data/public-get_instrument
/public/get_historical_volatility:
get:
parameters:
- name: currency
required: true
in: query
schema:
$ref: '#/components/schemas/currency'
description: The currency symbol
tags:
- Market Data
responses:
'200':
$ref: '#/components/responses/PublicGetHistoricalVolatilityResponse'
requestBody:
content:
application/json:
examples:
request:
value:
jsonrpc: '2.0'
id: 8387
method: public/get_historical_volatility
params:
currency: BTC
description: JSON-RPC Request Example
description: JSON-RPC request body
description: 'Provides historical volatility data for a given cryptocurrency. Historical volatility measures the degree of price variation over a past period and is useful for risk assessment and option pricing.
The response includes volatility statistics calculated from historical price movements. This data can be used for portfolio risk analysis and understanding market conditions.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_historical_volatility)
'
x-mint:
metadata:
title: public/get_historical_volatility
og:title: public/get_historical_volatility
keywords:
- public/get_historical_volatility
- currency
- timestamp
- value
href: /api-reference/market-data/public-get_historical_volatility
/public/get_funding_rate_history:
get:
tags:
- Market Data
parameters:
- name: instrument_name
required: true
in: query
schema:
$ref: '#/components/schemas/instrument_name'
description: Instrument name
- name: start_timestamp
required: true
in: query
schema:
$ref: '#/components/schemas/timestamp'
description: The earliest timestamp to return result from (milliseconds since the UNIX epoch)
- name: end_timestamp
required: true
in: query
schema:
$ref: '#/components/schemas/timestamp'
description: The most recent timestamp to return result from (milliseconds since the UNIX epoch)
responses:
'200':
$ref: '#/components/responses/PublicGetFundingRateHistoryResponse'
requestBody:
content:
application/json:
examples:
request:
value:
jsonrpc: '2.0'
id: 7617
method: public/get_funding_rate_history
params:
instrument_name: BTC-PERPETUAL
start_timestamp: 1569888000000
end_timestamp: 1569902400000
description: JSON-RPC Request Example
description: JSON-RPC request body
description: 'Retrieves hourly historical funding rate (interest rate) data for a PERPETUAL instrument over a specified time period. Funding rates are periodic payments exchanged between long and short positions in perpetual contracts.
The response includes hourly funding rate values, which can be used to analyze funding rate trends and calculate historical funding costs. This method is applicable only for PERPETUAL instruments.
[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fget_funding_rate_history)
'
x-mint:
metadata:
title: public/get_funding_rate_history
og:title: pub
# --- truncated at 32 KB (152 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/deribit/refs/heads/main/openapi/deribit-market-data-api-openapi.yml