Discovery and markets API
One coin's spot price candles with traded volume on one exchange
OHLC candles with USD volume for one coin's spot pair on one of ten major exchanges, 1m to 1w, oldest first. Keyed by ticker and exchange; prices in the quote currency.
/api/external/discovery/spot-coin-ohlcv/{symbol}What it returns
One exchange's spot price candles for one coin — open, high, low and close, with the USD volume traded in each candle — oldest first. Prices are in the pair's quote currency, named in quote: a dollar stablecoin or US dollars on most, but Korean won on a KRW pair. The newest candle is normally the one still in progress when the figures were read (complete: false). Pass the coin ticker and the exchange; without quote, the exchange's USDT pair is used, else its USD pair, else its USDC pair, else the first of the rest in alphabetical order. Ten major exchanges are covered, and on some only a subset of their pairs (Binance: its USDT and USD pairs), so not every market spot-coin-venues lists has candles here. A coin the exchange has no covered pair for, or none in the quote asked, 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/discovery/spot-coin-ohlcv/<symbol>?venue=Binance"
| Parameter | Description |
|---|---|
venuequery · string · required | The exchange, spelled exactly as listed (case-sensitive), as spot-coin-venues names it.BinanceBitfinexBitgetBybitCoinbaseCrypto.comGateKrakenOKXUpbit |
quotequery · string · optional | The quote currency of the pair, e.g. "USDT", "USD" or "KRW". Case-insensitive. Optional: without it, USDT, then USD, then USDC. |
intervalquery · string · optional | Candle width. Defaults to one day.1m3m5m15m30m1h4h6h8h12h1d1w |
limitquery · integer · optional | How many of the most recent candles to return, 1 to 1000. Defaults to 100. Fewer come back when the pair's history is shorter or a candle carries no figures. limit ≤ 250 keeps the answer under 32 KB. |
symbolpath · string · required | The coin (base asset) ticker, e.g. "BTC" or "PEPE" — not a pair such as "BTCUSDT" or "BTC/USDT", 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.
| Field | Type | Description |
|---|---|---|
symbol | string | The coin ticker as the exchange lists it, e.g. "BTC" for "btc". |
venue | string | The exchange. |
quote | string | The currency every price is in, e.g. "USDT" or "KRW". |
pair | string | The pair, BASE/QUOTE, as spot-coin-venues prints it. |
interval | string | The candle width. |
candles | object[] | Oldest first. |
candles[].at | number | The candle's open, unix seconds. |
candles[].open | number | null | Price at the open, in quote. null when not stated. |
candles[].high | number | null | Highest price in the candle, in quote. null when not stated. |
candles[].low | number | null | Lowest price in the candle, in quote. null when not stated. |
candles[].close | number | null | Price at the close — for the candle in progress, the latest price — in quote. null when not stated. |
candles[].volumeUsd | number | null | USD volume traded on the pair in the candle, whatever the quote. null when not stated. |
candles[].complete | boolean | Whether the figures are final. false only on the newest candle, which was still in progress when its 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