Reference
Liquidation levels
Predicted liquidation levels per market: where open positions would liquidate, as a current snapshot and as history: 30 days on Trial & Starter, 60 on Pro, 90 on Premium.
Current liquidation levels
GET
Where open positions would liquidate: the latest snapshot of one market, as price buckets holding the notional of open positions whose liquidation price falls inside each bucket.
These are predicted levels, not realised liquidations (see Liquidations for those). A new snapshot is taken about every 5 minutes.
Headers
- API key sent in the request header; never accepted as a query parameter.
x-api-keystringrequiredQuery parameters
- Market symbol as listed by the protocol's /markets endpoint. Required: levels are served one market at a time.
- Return only levels whose price bucket reaches above this price.
- Return only levels whose price bucket starts below this price.
marketstringrequiredprice_minnumberprice_maxnumberResponse
200{ market, snapshot_ts, data: Level[] }Request
cURL
curl --request GET \ --url https://api.perpdb.xyz/v1/gmtrade/liquidation-levels?market=SOL \ --header 'x-api-key: ak_...'
Example
{
"market": "SOL",
"snapshot_ts": "2026-11-15T22:00:55.952Z",
"data": [
{
"price": 7.5,
"width": 0.5,
"long_usd": 30,
"short_usd": 0,
"long_count": 1,
"short_count": 0
},
{
"price": 21,
"width": 0.5,
"long_usd": 8.371266923608001,
"short_usd": 0,
"long_count": 1,
"short_count": 0
}
]
}Liquidation levels history
GET
Liquidation levels of one market over time: for each bucket of the window, the last snapshot taken inside it. This is the data a liquidation heatmap draws.
History depth
A request may span at most 200 buckets (about 8 days at 1h, 33 days at 4h, the full 90 days at 1d on Premium) and 250,000 levels; a larger request is rejected with a 400, never truncated. Buckets with no snapshot are absent. Responses can be several MB: use price_min and price_max to fetch only the price range you draw.
Headers
- API key sent in the request header; never accepted as a query parameter.
x-api-keystringrequiredQuery parameters
- Market symbol as listed by the protocol's /markets endpoint. Required: levels are served one market at a time.
- Aggregation bucket size.
- Inclusive window start as an RFC 3339 timestamp, floored to the interval. Clamped to 90 days back on every plan; the effective start is echoed in the response. Defaults to 7 days at 1h, 30 days at 4h, 90 days at 1d.
- Window end as an RFC 3339 timestamp; no snapshot later than this is returned. Defaults to the current time.
- Return only levels whose price bucket reaches above this price.
- Return only levels whose price bucket starts below this price.
marketstringrequiredinterval1h | 4h | 1dfromstringtostringprice_minnumberprice_maxnumberResponse
200{ market, interval, from, to, data: Bucket[] }Request
cURL
curl --request GET \ --url https://api.perpdb.xyz/v1/gmtrade/liquidation-levels/history?market=SOL&interval=1d \ --header 'x-api-key: ak_...'
Example
{
"market": "SOL",
"interval": "1d",
"from": "2026-08-17T00:00:00.000Z",
"to": "2026-11-15T22:05:15.262Z",
"data": [
{
"time": "2026-08-17T00:00:00.000Z",
"levels": [
{
"price": 4.5,
"width": 0.5,
"long_usd": 33.99766368651849,
"short_usd": 0
},
{
"price": 15,
"width": 0.5,
"long_usd": 8.371266923608001,
"short_usd": 0
}
]
},
{
"time": "2026-08-18T00:00:00.000Z",
"levels": [
{
"price": 3.5,
"width": 0.5,
"long_usd": 33.99766368651849,
"short_usd": 0
},
{
"price": 15.5,
"width": 0.5,
"long_usd": 8.371266923608001,
"short_usd": 0
}
]
}
]
}