Skip to main content
Read a crypto liquidation heatmap

Overview

This endpoint estimates where leveraged positions of an OKX perpetual swap would be liquidated. For each bar of the lookback, Darvas takes the open interest the bar added, its long/short and top-trader ratios, taker volume and funding, spreads that exposure over the usual leverage levels, decays it with time and sweeps it when price trades through. The liquidations OKX reported calibrate the estimate. The answer is a model of positioning, not orders resting in the book.

Reading the estimate

  • Coverage. coverage says what backs the estimate: calibrated with reported liquidations, estimated with open interest, fallback with candles alone. inputs counts the points of each series used (open_interest_points, long_short_points, top_trader_points, taker_volume_points, funding_points) and the liquidation_events reported in the window. A series Darvas cannot read counts 0, and the estimate continues without it.
  • Bands. Every band carries price_low, price_high, long_usd and short_usd (estimated positions liquidated there), event_usd (reported liquidations that calibrate it) and total_usd, the three together. score is total_usd against the heatmap’s largest band on a log scale from 0 to 1, and confidence (low, medium, high) says how well reported liquidations back it.
  • Threshold. threshold is in percent of score: threshold=25 keeps bands with a score of at least 0.25, and values above 95 act as 95. leverage_sensitivity above 1 weights the higher leverage levels, whose liquidations sit closer to price.
  • Nearest levels. levels lists up to 25 bands of the newest bar, the most total_usd first, with side (below_price, where long liquidations wait, or above_price, where short ones do) and distance_percent, the band’s middle against last_price.
  • Cells. cells holds every bar’s bands that pass threshold, oldest bar first, with time, time_milliseconds and end_time_milliseconds. bucket_size is each band’s height in price and max_usd the largest band’s total.
When Darvas holds no candles of the perpetual, the answer is 404; other tickers, such as spot pairs, return 400. For the liquidation fills OKX reported, see /crypto/liquidations. For open interest and funding history, see /crypto/derivatives. For resting book liquidity, see /crypto/order-book/heatmap.

Examples

Authorizations

X-API-KEY
string
header
required

A Darvas data API key: dvk_ and 43 characters.

Query Parameters

ticker
string

An OKX perpetual swap such as BTC-USDT-SWAP; BTC-USDT-SWAP without it.

Maximum string length: 48
Pattern: ^[A-Za-z0-9][A-Za-z0-9-]{0,40}-SWAP$
interval
enum<string>
default:1H

The bar size; 1H without it.

Available options:
5m,
15m,
30m,
1H,
4H,
1D
Maximum string length: 4
lookback_bars
integer<int32>
default:180

Bars of positioning to build the heatmap from (30 to 500; default 180).

Required range: 30 <= x <= 500
threshold
number<double>
default:15

The least score in percent a cell needs to be answered (0 to 100; default 15).

Required range: 0 <= x <= 100
price_bucket_percent
number<double>
default:0.25

Each band's height as a percent of the last price (0.02 to 2; default 0.25).

Required range: 0.02 <= x <= 2
leverage_sensitivity
number<double>
default:1

Weight on the higher leverage levels, whose liquidations sit closer to price (0.25 to 3; default 1).

Required range: 0.25 <= x <= 3

Response

Read a crypto liquidation heatmap: one page.

The answer of GET /crypto/liquidations/heatmap.

ticker
string
required

The perpetual 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 liquidation heatmap.

Available options:
okx
Example:

"okx"

market_type
enum<string>
required

The market of the liquidation heatmap.

Available options:
swap
Example:

"swap"

interval
enum<string>
required

The bar size of the liquidation heatmap.

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

"1H"

start_time
string<date-time>
required

The first bar's start, in UTC.

Maximum string length: 30
Example:

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

end_time
string<date-time>
required

The newest bar's end, in UTC.

Maximum string length: 30
Example:

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

lookback_bars
integer<int64>
required

Bars asked for.

Required range: 0 <= x <= 500
Example:

180

threshold
number<double> | null
required

The least score in percent a cell needed.

Example:

15

price_bucket_percent
number<double> | null
required

Each band's height as a percent of the last price.

Example:

0.25

leverage_sensitivity
number<double> | null
required

The weight on higher leverage levels.

Example:

1

coverage
enum<string>
required

calibrated with reported liquidations, estimated with open interest, fallback with candles alone.

Available options:
calibrated,
estimated,
fallback
Example:

"calibrated"

bucket_size
number<double> | null
required

Each band's height in price.

Example:

244.53

max_usd
number<double> | null
required

The largest band's total, in USD.

Example:

58100000.2

last_price
number<double> | null
required

The newest bar's close.

Example:

97811.4

inputs
object
required

How many points of each input the heatmap read.

Example:
levels
object[]
required

Up to 25 bands of the newest bar, the most exposure first.

Maximum array length: 25
limited
boolean
required

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

Example:

false

cells
object[]
required

Every bar's bands that pass threshold, oldest bar first.

Maximum array length: 20000