Read a crypto liquidation heatmap
curl --request GET \
--url https://api.darvas.app/v1/crypto/liquidations/heatmap \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.darvas.app/v1/crypto/liquidations/heatmap"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.darvas.app/v1/crypto/liquidations/heatmap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ticker": "BTC-USDT-SWAP",
"exchange": "okx",
"market_type": "swap",
"interval": "1H",
"start_time": "2026-11-21T00:00:00.000Z",
"end_time": "2026-11-28T12:00:00.000Z",
"lookback_bars": 180,
"threshold": 15,
"price_bucket_percent": 0.25,
"leverage_sensitivity": 1,
"coverage": "calibrated",
"bucket_size": 244.53,
"max_usd": 58100000.2,
"last_price": 97811.4,
"inputs": {
"open_interest_points": 180,
"long_short_points": 180,
"top_trader_points": 180,
"taker_volume_points": 180,
"funding_points": 23,
"liquidation_events": 412
},
"levels": [
{
"price_low": 95120.5,
"price_high": 95365.3,
"long_usd": 41200000.5,
"short_usd": 0,
"total_usd": 41200000.5,
"event_usd": 2100000.2,
"score": 0.94,
"confidence": "high",
"side": "below_price",
"distance_percent": -2.62
}
],
"limited": false,
"cells": [
{
"time": "2026-11-28T11:00:00.000Z",
"time_milliseconds": 1795863600000,
"end_time_milliseconds": 1795867200000,
"price_low": 95120.5,
"price_high": 95365.3,
"long_usd": 41200000.5,
"short_usd": 0,
"total_usd": 41200000.5,
"event_usd": 2100000.2,
"score": 0.94,
"confidence": "high"
}
]
}{
"error": "VALIDATION_ERROR",
"message": "Send ticker or cik"
}{
"error": "UNAUTHORIZED",
"message": "The API key is not valid"
}{
"error": "PLAN_REQUIRED",
"message": "The account of this key has no active data API plan"
}{
"error": "NOT_FOUND",
"message": "No company has this ticker or CIK"
}{
"error": "RATE_LIMITED",
"message": "Too many requests"
}{
"error": "INTERNAL_ERROR",
"message": "Something went wrong"
}{
"error": "UNAVAILABLE",
"message": "The data service is unavailable"
}Crypto Derivatives
Bitcoin & Crypto Liquidation Heatmap Data API
Estimate concentrated crypto perpetual liquidation price levels and leverage clusters to map liquidation cascades across BTC, ETH and altcoins.
Read a crypto liquidation heatmap
curl --request GET \
--url https://api.darvas.app/v1/crypto/liquidations/heatmap \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.darvas.app/v1/crypto/liquidations/heatmap"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.darvas.app/v1/crypto/liquidations/heatmap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ticker": "BTC-USDT-SWAP",
"exchange": "okx",
"market_type": "swap",
"interval": "1H",
"start_time": "2026-11-21T00:00:00.000Z",
"end_time": "2026-11-28T12:00:00.000Z",
"lookback_bars": 180,
"threshold": 15,
"price_bucket_percent": 0.25,
"leverage_sensitivity": 1,
"coverage": "calibrated",
"bucket_size": 244.53,
"max_usd": 58100000.2,
"last_price": 97811.4,
"inputs": {
"open_interest_points": 180,
"long_short_points": 180,
"top_trader_points": 180,
"taker_volume_points": 180,
"funding_points": 23,
"liquidation_events": 412
},
"levels": [
{
"price_low": 95120.5,
"price_high": 95365.3,
"long_usd": 41200000.5,
"short_usd": 0,
"total_usd": 41200000.5,
"event_usd": 2100000.2,
"score": 0.94,
"confidence": "high",
"side": "below_price",
"distance_percent": -2.62
}
],
"limited": false,
"cells": [
{
"time": "2026-11-28T11:00:00.000Z",
"time_milliseconds": 1795863600000,
"end_time_milliseconds": 1795867200000,
"price_low": 95120.5,
"price_high": 95365.3,
"long_usd": 41200000.5,
"short_usd": 0,
"total_usd": 41200000.5,
"event_usd": 2100000.2,
"score": 0.94,
"confidence": "high"
}
]
}{
"error": "VALIDATION_ERROR",
"message": "Send ticker or cik"
}{
"error": "UNAUTHORIZED",
"message": "The API key is not valid"
}{
"error": "PLAN_REQUIRED",
"message": "The account of this key has no active data API plan"
}{
"error": "NOT_FOUND",
"message": "No company has this ticker or CIK"
}{
"error": "RATE_LIMITED",
"message": "Too many requests"
}{
"error": "INTERNAL_ERROR",
"message": "Something went wrong"
}{
"error": "UNAVAILABLE",
"message": "The data service is unavailable"
}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.| Coverage | Details |
|---|---|
| Markets | OKX perpetual swaps such as BTC-USDT-SWAP (default) and ETH-USDT-SWAP |
| Bar sizes | interval: 5m, 15m, 30m, 1H (default), 4H and 1D |
| Lookback | lookback_bars from 30 to 500 of the newest bars (default 180) |
| Bands | price_bucket_percent from 0.02 to 2 percent of the last price (default 0.25) |
| Filters | threshold from 0 to 100 (default 15); leverage_sensitivity from 0.25 to 3 (default 1) |
| Cell cap | 20,000 cells, newest kept; limited is true when capped |
| MCP tool | get_crypto_liquidation_heatmap on the data API MCP server |
Reading the estimate
- Coverage.
coveragesays what backs the estimate:calibratedwith reported liquidations,estimatedwith open interest,fallbackwith candles alone.inputscounts the points of each series used (open_interest_points,long_short_points,top_trader_points,taker_volume_points,funding_points) and theliquidation_eventsreported in the window. A series Darvas cannot read counts0, and the estimate continues without it. - Bands. Every band carries
price_low,price_high,long_usdandshort_usd(estimated positions liquidated there),event_usd(reported liquidations that calibrate it) andtotal_usd, the three together.scoreistotal_usdagainst the heatmap’s largest band on a log scale from 0 to 1, andconfidence(low,medium,high) says how well reported liquidations back it. - Threshold.
thresholdis in percent ofscore:threshold=25keeps bands with ascoreof at least 0.25, and values above 95 act as 95.leverage_sensitivityabove1weights the higher leverage levels, whose liquidations sit closer to price. - Nearest levels.
levelslists up to 25 bands of the newest bar, the mosttotal_usdfirst, withside(below_price, where long liquidations wait, orabove_price, where short ones do) anddistance_percent, the band’s middle againstlast_price. - Cells.
cellsholds every bar’s bands that passthreshold, oldest bar first, withtime,time_millisecondsandend_time_milliseconds.bucket_sizeis each band’s height in price andmax_usdthe largest band’s total.
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
import os
import requests
headers = {"X-API-KEY": os.environ["DARVAS_API_KEY"]}
heat = requests.get(
"https://api.darvas.app/v1/crypto/liquidations/heatmap",
headers=headers,
params={"ticker": "BTC-USDT-SWAP", "interval": "1H", "lookback_bars": 240},
).json()
print("Coverage:", heat["coverage"], "Last price:", heat["last_price"], "Inputs:", heat["inputs"])
below = [lv for lv in heat["levels"] if lv["side"] == "below_price"]
above = [lv for lv in heat["levels"] if lv["side"] == "above_price"]
nearest_long = max(below, key=lambda lv: lv["distance_percent"], default=None)
nearest_short = min(above, key=lambda lv: lv["distance_percent"], default=None)
print("Nearest long cluster:", nearest_long)
print("Nearest short cluster:", nearest_short)
# ETH perpetual on 4-hour bars, 0.1 percent bands, strong cells only
curl -H "X-API-KEY: $DARVAS_API_KEY" \
"https://api.darvas.app/v1/crypto/liquidations/heatmap?ticker=ETH-USDT-SWAP&interval=4H&lookback_bars=240&price_bucket_percent=0.1&threshold=25"
Authorizations
apiKeybearerKey
Query Parameters
Response
Read a crypto liquidation heatmap: one page.
The answer of GET /crypto/liquidations/heatmap.