Perpetuals API
Indicator history for one derivatives instrument: RSI, MACD, Bollinger, ATR, TD
How a technical indicator read candle by candle for one perpetual or future on one venue, at the width and look-back you ask for. The only endpoint with Bollinger Bands.
/api/external/perps/derivatives-technicals-history/{symbol}What it returns
How one technical indicator has read over time for one perpetual or future on one exchange: one point per candle, oldest first, at the candle width you ask for. indicator is rsi, macd (with its signal line and histogram), boll (Bollinger Bands), ma, ema, atr or td (TD Sequential), and each carries its own figures — named in fields, and only those, so an RSI point has no empty band slots. unit says what the numbers ARE: an index is a 0-100 oscillator, a price is in the instrument's quote currency, a count is a bar count. `period` is published with every answer and it is not the canonical one: the default is 9 for rsi, ma, ema and boll — not 14 or 20 — and 14 for atr. Ask for period=14 to get the RSI most charts draw; on the same daily candle the two read 4.45 points apart. macd and td have no period at all (MACD is fixed at 12/26/9) and refuse one. The newest point is computed on a candle that has not closed, and says so with complete: false; it moves until the candle ends. symbol is the venue's instrument id and venue the exchange — take both from a derivatives-coin-venues row. An exchange nobody lists, an instrument it does not list, and a listed instrument the source has no candles for each answer 404, with a message saying which. For the current reading across timeframes of a COIN rather than an instrument, ask derivatives-technicals; for the price candles themselves, derivatives-ohlcv.
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-technicals-history/<symbol>?venue=<venue>&indicator=rsi"
| Parameter | Description |
|---|---|
venuequery · string · required | The exchange, as derivatives-coin-venues names it (e.g. "Binance", "OKX", "Bybit", "Hyperliquid", "Deribit", "Crypto.com"). Matched ignoring case. Not every listed exchange has candles for every instrument it lists. |
indicatorquery · string · required | Which indicator: rsi (relative strength index), macd (moving average convergence divergence, with its signal line and histogram), boll (Bollinger Bands — the middle, upper and lower band), ma (simple moving average), ema (exponential moving average), atr (average true range) or td (TD Sequential buy and sell counts). One indicator per answer, and one upstream call.rsimacdbollmaemaatrtd |
intervalquery · string · optional | Candle width. Defaults to one day.1m3m5m15m30m1h4h6h8h12h1d1w |
periodquery · integer · optional | How many candles each reading looks back over, 2 to 500. Defaults to 9 for rsi, ma, ema and boll, and to 14 for atr — whatever it is, the answer says so in period. A longer period costs points at the start of the series, which is where the indicator is still warming up. macd and td have no period and answer 400 if one is given. |
limitquery · integer · optional | How many of the most recent points to return, 1 to 1000. Defaults to 100. Fewer come back when the instrument's history is shorter: one call covers about a thousand candles less the warm-up, and a weekly series is all the history there is. limit ≤ 300 keeps the answer under 32 KB. |
symbolpath · string · required | The venue's own instrument id, as instrument in derivatives-coin-venues rows: e.g. "BTCUSDT" (Binance, Bybit), "BTC-USDT-SWAP" (OKX), "BTC_USDT" (Gate), "BTC-PERPETUAL" (Deribit) — not a bare coin ticker such as "BTC", and not a token mint or contract address. The exact spelling is matched first; otherwise the one listed id that differs only in case. |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
venue | string | The exchange, spelled as it lists itself. |
instrument | string | The instrument id as the exchange lists it, e.g. "BTCUSDT" for "btcusdt". |
symbol | string | The coin (base asset) ticker, as the exchange lists it. |
indicator | string | The indicator this series reads. |
interval | string | The candle width. |
period | number | null | How many candles each reading looked back over. null on macd and td, which have no period. |
unit | string | What the numbers are: index is a 0-100 oscillator, price is the quote currency (for macd, a difference of two price averages), count is a bar count. Only compare figures that share a unit. |
fields | string[] | Which figures this indicator's points carry, and the only ones they carry: value for rsi, ma, ema and atr; value, signal and histogram for macd; middle, upper and lower for boll; buyCount and sellCount for td. |
points | object[] | Oldest first, at most limit. Evenly spaced by interval: a point whose figures are all null is kept rather than dropped, because on td that is a real reading — no setup was running in either direction on that candle. |
points[].at | number | The candle's open, unix seconds. |
points[].complete | boolean | Whether that candle has ended. false on the newest point while its candle is still running, and its figures move until it closes. |
points[].value | number | null | The indicator's value, in unit: the RSI, the moving average, the average true range, or the MACD line. Absent on boll and td, which state no single value. |
points[].signal | number | null | MACD's signal line, the EMA of the MACD line. Absent on every other indicator, and null on the first points of a MACD series, where the signal is still warming up. |
points[].histogram | number | null | The MACD line less its signal line — positive above, negative below. Absent on every other indicator, and null while the signal is warming up. A null is not a zero: a zero histogram is a crossover. |
points[].middle | number | null | The middle Bollinger band, the moving average the bands are drawn around. boll only. |
points[].upper | number | null | The upper Bollinger band. boll only. |
points[].lower | number | null | The lower Bollinger band. boll only. |
points[].buyCount | number | null | How far a TD Sequential BUY setup has counted on this candle. null when none is running — which is not a count of zero. td only. |
points[].sellCount | number | null | How far a TD Sequential SELL setup has counted on this candle. null when none is running. No candle measured carried both counts. td only. |
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