Skip to main content
Read a crypto order book heatmap

Overview

This endpoint returns the order book over time for one exchange’s spot or perpetual swap market. For each bar and price row, bid_size and ask_size are the time-weighted average size resting on the bid and the ask, and bid_max and ask_max are the largest size a single sample of the bar saw. The values come from the one-second samples of the OKX, Binance and Bybit books Darvas records.

Window, price range and rows

  • Time window. Pass start_time and end_time as ISO 8601 timestamps (2026-11-27T00:00:00Z), UTC dates (2026-11-27) or Unix milliseconds. Without end_time, the window ends at the end of the open bar; without start_time, it starts 120 bars before end_time. A window over 600 bars, or an end_time that is not after start_time, returns 400.
  • Price range. low and high bound the rows. Without them, the range is the window’s lowest candle low less half a percent and its highest candle high plus half a percent; send one and the other comes from the candles. low must be below high, and a window without candles returns 404 unless both are sent.
  • Row height. row_size sets the smallest row height in price, such as row_size=25 for 25-dollar rows on BTC. Rows still grow until the range fits 400 of them, and the answer’s row_size is the height used (0 when the window holds no book).
  • Cells. Each entry in cells gives time and time_milliseconds (the bar’s start), price (the row’s low price, spanning row_size above it), bid_size, ask_size, bid_max and ask_max. Cells are sorted newest bar first, then lowest row first.
  • Persistent walls. bid_walls and ask_walls rank the five rows with the most size on average across every bar of the window (price, average_size). They show liquidity that stayed rather than one bar’s spike.
For the live book at this moment, see /crypto/order-book. For estimated liquidation clusters, see /crypto/liquidations/heatmap. For taker volume per price, see /crypto/footprint.

Examples

Authorizations

X-API-KEY
string
header
required

A Darvas data API key: dvk_ and 43 characters.

Query Parameters

ticker
string
required

The instrument id: BTC-USDT or BTC-USDT-SWAP on OKX, ETH-USDC-SWAP on Hyperliquid, BTC-USD on Coinbase, spot:BTCUSDT or perpetual:BTCUSDT on Binance and Bybit. A Binance or Bybit symbol such as BTCUSDT also works with market_type, spot without it. A Darvas aggregated pair is BASE-QUOTE or BASE-QUOTE-SWAP, such as BTC-USDT-SWAP, or BTC-ALLUSD for one combining its USD, USDT and USDC markets.

Maximum string length: 64
Pattern: ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,63}$
exchange
enum<string>
default:okx

okx, binance or bybit; okx without it.

Available options:
okx,
binance,
bybit
Maximum string length: 16
market_type
enum<string>

spot or swap; without it, the market the ticker implies.

Available options:
spot,
swap
Maximum string length: 8
interval
enum<string>
default:15m

The heatmap's bar size; 15m without it.

Available options:
1m,
5m,
15m,
30m,
1H,
2H,
4H,
1D,
1W
Maximum string length: 4
start_time
string

The window's first moment: ISO 8601, a UTC date or Unix milliseconds; 120 bars before end_time without it.

Maximum string length: 40
Pattern: ^[0-9][0-9T:.+Z-]{0,39}$
end_time
string

The window's end: ISO 8601, a UTC date or Unix milliseconds; the end of the open bar without it.

Maximum string length: 40
Pattern: ^[0-9][0-9T:.+Z-]{0,39}$
low
number<double>

The lowest price to answer; the window's lowest candle less half a percent without it.

Required range: x <= 1000000000000
high
number<double>

The highest price to answer; the window's highest candle plus half a percent without it.

Required range: x <= 1000000000000
row_size
number<double>

The smallest row height to answer in price; rows still grow until the range fits 400 of them.

Required range: x <= 1000000000000

Response

Read a crypto order book heatmap: one page.

The answer of GET /crypto/order-book/heatmap.

ticker
string
required

The instrument id of the heatmap.

Maximum string length: 64
Pattern: ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,63}$
Example:

"BTC-USDT-SWAP"

exchange
enum<string>
required

The exchange of the book heatmap.

Available options:
okx,
binance,
bybit
Example:

"okx"

market_type
enum<string>
required

The market of the book heatmap.

Available options:
spot,
swap
Example:

"swap"

interval
enum<string>
required

The bar size of the book heatmap.

Available options:
1m,
5m,
15m,
30m,
1H,
2H,
4H,
1D,
1W
Example:

"15m"

start_time
string<date-time>
required

The window's first bar start, in UTC.

Maximum string length: 30
Example:

"2026-11-27T00:00:00.000Z"

end_time
string<date-time>
required

The window's end, in UTC.

Maximum string length: 30
Example:

"2026-11-28T12:00:00.000Z"

low
number<double> | null
required

The lowest price answered.

Example:

95210.4

high
number<double> | null
required

The highest price answered.

Example:

99120.8

row_size
number<double> | null
required

Each row's height in price; 0 when the window holds no book.

Example:

10

limited
boolean
required

Whether the cells reached the 120,000-cell cap, which keeps the newest bars.

Example:

false

bid_walls
object[]
required

The five rows with the most bid size on average.

Maximum array length: 5
ask_walls
object[]
required

The five rows with the most ask size on average.

Maximum array length: 5
cells
object[]
required

Every bar's rows, newest bar first, lowest row first.

Maximum array length: 120000