Perpetuals API
Perpetual-futures markets, all of them
Every perpetual-futures market this surface covers, with its current state. A MARKET is keyed by trading symbol, not by chain and mint — these are derivatives, not tokens you hold.
/api/external/perps/perps-marketsWhat it returns
A market-wide ranking across every perpetual futures market this endpoint covers — no chain and no token/wallet subject in the request at all. Sortable by long/short open interest or combined open interest, over a trailing time frame. This is a DIFFERENT universe from the rest of this API: a market symbol (e.g. "BTC") here is a leveraged derivatives market, never a token mint or contract address on any of this API's six chains, and nothing this endpoint returns can be looked up against those chains. Use the symbol field on any row with GET /perps/perps-market, GET /perps/perps-market-positions or GET /perps/perps-liquidation-map for more detail on one market.
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/perps-markets"
| Parameter | Description |
|---|---|
time_framequery · string · optional | The trailing window the ranking is computed over. Defaults to "all".4h1d7d30dall |
sort_byquery · string · optional | Which open-interest figure to sort by. Defaults to combined open interest.long_ioshort_ioopen_interest |
sort_typequery · string · optional | Sort direction. Defaults to descending.ascdesc |
offsetquery · integer · optional | 0-based row offset, for paging through the ranking. |
limitquery · integer · optional | How many rows to return. Defaults to 10; this endpoint caps it at 20. |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
markets | object[] | |
markets[].symbol | string | null | The market ticker, e.g. "BTC". Not a token mint or contract address. |
markets[].longOpenInterestUsd | number | null | Total long open interest, USD. |
markets[].shortOpenInterestUsd | number | null | Total short open interest, USD. |
markets[].openInterestUsd | number | null | Combined open interest across long and short, USD. |
markets[].marginUsd | number | null | Total margin currently backing all open positions, USD. |
markets[].marginUsedUsd | number | null | Margin actively committed to current positions, USD. |
markets[].entryMarginUsd | number | null | Margin value measured at entry prices across current positions, USD. |
markets[].unrealizedPnlUsd | number | null | Aggregate unrealized profit and loss across all current positions, USD. |
markets[].leverage | number | null | Aggregate effective leverage across open positions. |
markets[].bias | number | null | Net directional bias between long and short positioning. Positive = long skew; negative = short skew. |
markets[].biasText | string | null | Human-readable interpretation of bias, e.g. "Very Bullish". |
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