Skip to main content
cURL
curl --request GET \
  --url https://test.deribit.com/api/v2/public/get_order_book \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": 8772,
  "method": "public/get_order_book",
  "params": {
    "instrument_name": "BTC-PERPETUAL",
    "depth": 5
  }
}
'
{
  "jsonrpc": "2.0",
  "id": 8772,
  "result": {
    "timestamp": 1550757626706,
    "stats": {
      "volume": 93.35589552,
      "price_change": 0.6913,
      "low": 3940.75,
      "high": 3976.25
    },
    "state": "open",
    "settlement_price": 3925.85,
    "open_interest": 45.27600333464605,
    "min_price": 3932.22,
    "max_price": 3971.74,
    "mark_price": 3931.97,
    "last_price": 3955.75,
    "instrument_name": "BTC-PERPETUAL",
    "index_price": 3910.46,
    "funding_8h": 0.00455263,
    "current_funding": 0.00500063,
    "change_id": 474988,
    "bids": [
      [
        3955.75,
        30
      ],
      [
        3940.75,
        102020
      ],
      [
        3423,
        42840
      ]
    ],
    "best_bid_price": 3955.75,
    "best_bid_amount": 30,
    "best_ask_price": 0,
    "best_ask_amount": 0,
    "asks": []
  }
}

Query Parameters

instrument_name
string
required

The instrument name for which to retrieve the order book, see public/get_instruments to obtain instrument names.

Example:

"BTC-PERPETUAL"

depth
enum<integer>

The number of entries to return for bids and asks, maximum - 10000.

Available options:
1,
5,
10,
20,
50,
100,
1000,
10000
Example:

5

Response

200 - application/json

Success response

jsonrpc
enum<string>
required

The JSON-RPC version (2.0)

Available options:
2.0
result
object
required
id
integer

The id that was sent in the request