Perpetuals API

One coin's perp bid and ask depth near the price, across venues, over time

A coin's resting perpetual bids and asks within 0.25% to 10% of price, summed across venues, in USD and coin units, one snapshot per interval (1m to 1w). Not spot.

GET/api/external/perps/derivatives-orderbook-depth-history/{symbol}

What it returns

One coin's derivatives order book depth over time: the resting bids (buy orders) and asks (sell orders) within a band of range percent either side of the price, in US dollars and in units of the coin, on the coin's perpetual markets, summed across every tracked derivatives venue that records the book, one snapshot per interval, oldest first. Not spot. A venue counts the instruments whose book is recorded, which need not be all of its perpetuals for the coin. Each snapshot is the book as recorded at its time; the newest is normally the live book when the figures were read (complete: false, still moving) and counts toward limit. Snapshots dated before the coin's book was first recorded are left out. An answer may be served from a cache up to a few minutes old. symbol is the coin ticker (e.g. "BTC"), matched case-insensitively — not an instrument id, not a token mint or contract address, and not scoped to any of this API's chains. An unknown ticker, or a coin whose book is not recorded, answers 404. With venue and instrument (both or neither) the answer is that one market's own book depth instead, in the same shape and units, with venue and instrument echoed; a market whose book is not recorded answers 404.

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-orderbook-depth-history/<symbol>"
Parameters
ParameterDescription
interval

query · string · optional

Spacing between snapshots. Defaults to one day.1m3m5m15m30m1h4h6h8h12h1d1w
range

query · number · optional

The band, in percent either side of the price, whose resting orders are summed. Defaults to 1.0.250.50.75123510
limit

query · integer · optional

How many of the most recent snapshots to return, the live one included, 1 to 1000. Defaults to 100. Fewer come back when the coin's recorded history is shorter. limit ≤ 200 keeps the answer under 32 KB.
venue

query · string · optional

Together with instrument: the exchange whose order book depth to answer instead of the total across venues, as derivatives-coin-venues names it (e.g. "Binance", "OKX", "Bybit", "Hyperliquid"), matched ignoring case.
instrument

query · string · optional

Together with venue: the exchange's own instrument id, as instrument in derivatives-coin-venues rows (e.g. "BTCUSDT" on Binance, "BTC-USDT-SWAP" on OKX, "BTC-USD" on Hyperliquid). It must trade the coin in the path.
symbol

path · string · required

The coin (base asset) ticker, e.g. "BTC" or "kPEPE" — not a venue instrument id such as "BTCUSDT", and not a token mint or contract address. Case-insensitive.

Response fields

A JSON response. Every field is always present; null means the value could not be established, never zero.

Response fields of One coin's perp bid and ask depth near the price, across venues, over time
FieldTypeDescription
symbolstringThe coin, spelled as it is listed (e.g. "BTC" for "btc").
venuestringOnly with venue and instrument: the exchange, as it names itself. Absent from the answer across venues.
instrumentstringOnly with venue and instrument: the exchange's instrument id, as it lists it.
intervalstringThe spacing between snapshots.
rangePctnumberThe band, in percent either side of the price.
snapshotsobject[]Oldest first.
snapshots[].atnumberWhen the book was recorded, unix seconds.
snapshots[].bidsUsdnumber | nullResting bids within the band, summed across exchanges, US dollars. null when not stated.
snapshots[].bidsQuantitynumber | nullResting bids within the band, summed across exchanges, in units of the coin as the ticker names it (a kPEPE is 1,000 PEPE). null when not stated.
snapshots[].asksUsdnumber | nullResting asks within the band, summed across exchanges, US dollars. null when not stated.
snapshots[].asksQuantitynumber | nullResting asks within the band, summed across exchanges, in units of the coin as the ticker names it (a kPEPE is 1,000 PEPE). null when not stated.
snapshots[].completebooleanWhether the snapshot is final. false only on the newest, the live book when the figures were read.

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