Pools API
Candles of one pool in its own exchange rate
Open/high/low/close of ONE pool with the base token priced in the quote token (not USD), base and quote named, volume in base units and in USD.
/api/external/pool-analysis/pool-rate-ohlcv/{chain}/{pool}What it returns
Price candles for one liquidity pool in the pool's OWN exchange rate: open/high/low/close are one unit of base priced in units of quote (on a SOL/BONK pool, about 32 million BONK per SOL), not USD — pool-ohlcv is the USD sibling. Which token is the base is fixed per pool and is not necessarily the pool's first token; read base and quote. volumeBase is in base-token units and volumeUsd in USD. On SOL both sides are named by address and symbol; on the other chains by symbol only (address is null). A bucket in which the pool did not trade is missing rather than filled. An unknown pool answers an empty series with nothing named — it cannot be told from a pool that did not trade in the window. A window that has not happened yet is refused with 400.
Chains
- Solana SOL
- BNB Chain BNB
- Ethereum ETH
- Base BASE
- Robinhood Chain RHC
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/pool-analysis/pool-rate-ohlcv/SOL/<pool>?interval=1m&from=<from>&to=<to>"
| Parameter | Description |
|---|---|
intervalquery · string · required | Candle width.1m5m15m1h4h1d |
fromquery · integer · required | Window start, Unix SECONDS. A candle is returned when its OPEN is at or after this time. |
toquery · integer · required | Window end, Unix SECONDS, inclusive. At most 1000 candles fit in one request — a wider window returns 400. |
chainpath · string · required | The chain the pool lives on. SOL, ETH, BNB, BASE and RHC are served; STABLE and ARC return 400. CELO, ARB, OP and SCROLL return 400 here. |
poolpath · string · required | The pool identifier — a pool/pair address on most venues, or a 32-byte pool ID where the venue uses one (Uniswap v4). It identifies the POOL, not a token traded in it. |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
chain | string | |
pool | string | The pool asked; EVM addresses lower-cased. |
interval | string | |
base | object | The token each price is FOR. |
base.address | string | null | Mint (Solana) or contract address. null on chains where the pair is named by symbol only (every chain but SOL). |
base.symbol | string | null | null when the pair's name cannot be split unambiguously. |
quote | object | The token each price is DENOMINATED IN. |
quote.address | string | null | Mint (Solana) or contract address. null on chains where the pair is named by symbol only (every chain but SOL). |
quote.symbol | string | null | null when the pair's name cannot be split unambiguously. |
candles | object[] | Ascending by at. |
candles[].at | number | The bucket's OPEN, Unix seconds. |
candles[].open | number | null | One base unit in quote units. |
candles[].high | number | null | |
candles[].low | number | null | |
candles[].close | number | null | |
candles[].volumeBase | number | null | Traded in the bucket, in base-token units. |
candles[].volumeUsd | number | null | Traded in the bucket, in USD. |
candles[].complete | boolean | Whether the bucket has ended. The newest candle is usually the one in progress. |
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