Perpetuals API
Max-pain liquidation level, per coin
Every coin's single most-leveraged long and short liquidation price and the USD sitting at each — one row per coin, sortable by how close price is to triggering it.
/api/external/perps/derivatives-liquidation-max-painWhat it returns
For every coin, the ONE price at which its most-leveraged long positions would be force-liquidated, the ONE price for its most-leveraged shorts, and how many US dollars of positions sit at each — one row per coin, so a caller can rank coins by how close they sit to a liquidation cascade. This is NOT derivatives-liquidation-levels, which models the WHOLE price curve (many levels, both directions) for a SINGLE coin already known; this answers across every coin at once, one level per side. It is also NOT options-max-pain, which is an OPTIONS strike (where a coin's options would cost holders the most) — an unrelated market from this endpoint's leveraged perpetual positions. The reference price on each row is a model snapshot taken when it was computed, not necessarily the live price (measured 0.16% apart for BTC in the same minute). longDistancePercent/shortDistancePercent are derived here, not sent by the source: the percent price would have to move to reach each side's level. A side with nothing to liquidate answers null for its price, its USD level and its distance, never 0. The population is not limited to crypto — equities and FX tickers appear in the same list. Row order (sort=source, the default) is the source's own and is not meaningful; sort by nearest long or short distance instead to rank coins by proximity to a cascade.
Chains
This endpoint is not tied to a chain: it takes no chain in its request.
Request
Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.
curl -H "x-dex-data-key: $DEXDATA_API_KEY" \ "https://api.dexdata.io/api/external/perps/derivatives-liquidation-max-pain"
| Parameter | Description |
|---|---|
limitquery · integer · optional | How many rows to return, after sorting. Defaults to 50; at most 1000. limit ≤ 150 keeps the answer under 32 KB. |
symbolquery · string · optional | Keep only one coin, by ticker, e.g. "BTC". Case-insensitive. Not a token mint or contract address. |
sortquery · string · optional | source (default): the order the upstream sent, which is NOT meaningful (neither alphabetical nor by level). nearest-long/nearest-short: ascending by that side's distance percent, a coin with nothing to liquidate on that side sorting last.sourcenearest-longnearest-short |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
rows | object[] | One row per coin, after the symbol filter, sort, and then limit. |
rows[].symbol | string | null | The coin ticker, as the venue lists it. Not scoped to crypto — equities and FX tickers appear too. |
rows[].price | number | null | The model's reference price when this was computed. May differ slightly from the live price — measured 0.16% apart for BTC in the same minute. |
rows[].longMaxPainPrice | number | null | The price at which the most-leveraged long positions would be force-liquidated. null when there is nothing to liquidate on the long side. |
rows[].longMaxPainUsd | number | null | US dollars of long positions sitting at longMaxPainPrice. null exactly when that price is. |
rows[].longDistancePercent | number | null | Derived, not sent by the source: the percent price would have to FALL to reach longMaxPainPrice, always positive, rounded to 4 decimals. null when longMaxPainPrice is null. |
rows[].shortMaxPainPrice | number | null | The price at which the most-leveraged short positions would be force-liquidated. null when there is nothing to liquidate on the short side. |
rows[].shortMaxPainUsd | number | null | US dollars of short positions sitting at shortMaxPainPrice. null exactly when that price is. |
rows[].shortDistancePercent | number | null | Derived, not sent by the source: the percent price would have to RISE to reach shortMaxPainPrice, always positive, rounded to 4 decimals. null when shortMaxPainPrice is null. |
Start building with DexData today
Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.
Get a free API key