Pools API
Pool liquidity depth over time
How ONE pool's liquidity depth moved over a window, in USD — the TREND under pool-detail's point-in-time snapshot. A draining pool is a rug in progress. Solana only.
/api/external/pool-analysis/pool-liquidity-history/{chain}/{pool}What it returns
How this pool's liquidity depth has moved over a window, in USD — the pool-keyed sibling of the token-scoped liquidity snapshot, and the TREND underneath it: a draining pool is a rug in progress. SOLANA ONLY — every other chain returns 400, a restriction the one wired source declares itself rather than one this API infers from an unmeasured gap. coveredFrom and truncated exist because the source anchors a single page rather than accepting an arbitrary window: a wide request is answered honestly rather than truncated silently or rejected. A real 0 means the pool has been DRAINED and is published as 0; only null means no figure was reported.
Chains
- Solana SOL
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-liquidity-history/SOL/<pool>?from=<from>&to=<to>"
| Parameter | Description |
|---|---|
fromquery · integer · required | Window start, Unix SECONDS. May return fewer buckets than this if the source's own single anchored page does not reach back this far — see coveredFrom. |
toquery · integer · required | Window end, Unix SECONDS. Inclusive. At most 100 buckets are asked for in one call, anchored at this instant. |
chainpath · string · required | The chain the pool lives on. Solana only; every other chain returns 400 — this resource is not offered there. |
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 |
|---|---|---|
candles | object[] | |
candles[].at | number | The bucket's OPEN, Unix seconds. Buckets are not a padded grid — a quiet pool skips a bucket rather than repeating its last value. |
candles[].openUsd | number | null | |
candles[].highUsd | number | null | |
candles[].lowUsd | number | null | |
candles[].closeUsd | number | null | Pool depth in USD at the bucket's close. A real 0 means DRAINED. |
coveredFrom | number | null | The earliest instant this response actually covers, or null when there are no candles at all. Never earlier than the requested from. |
truncated | boolean | true when there may be earlier liquidity history this response does not contain — the source's single anchored page did not reach back to the requested from. |
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