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.

GET/api/external/perps/perps-markets

What 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"
Parameters
ParameterDescription
time_frame

query · string · optional

The trailing window the ranking is computed over. Defaults to "all".4h1d7d30dall
sort_by

query · string · optional

Which open-interest figure to sort by. Defaults to combined open interest.long_ioshort_ioopen_interest
sort_type

query · string · optional

Sort direction. Defaults to descending.ascdesc
offset

query · integer · optional

0-based row offset, for paging through the ranking.
limit

query · 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.

Response fields of Perpetual-futures markets, all of them
FieldTypeDescription
marketsobject[]
markets[].symbolstring | nullThe market ticker, e.g. "BTC". Not a token mint or contract address.
markets[].longOpenInterestUsdnumber | nullTotal long open interest, USD.
markets[].shortOpenInterestUsdnumber | nullTotal short open interest, USD.
markets[].openInterestUsdnumber | nullCombined open interest across long and short, USD.
markets[].marginUsdnumber | nullTotal margin currently backing all open positions, USD.
markets[].marginUsedUsdnumber | nullMargin actively committed to current positions, USD.
markets[].entryMarginUsdnumber | nullMargin value measured at entry prices across current positions, USD.
markets[].unrealizedPnlUsdnumber | nullAggregate unrealized profit and loss across all current positions, USD.
markets[].leveragenumber | nullAggregate effective leverage across open positions.
markets[].biasnumber | nullNet directional bias between long and short positioning. Positive = long skew; negative = short skew.
markets[].biasTextstring | nullHuman-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