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.

GET/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>"
Parameters
ParameterDescription
from

query · 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.
to

query · integer · required

Window end, Unix SECONDS. Inclusive. At most 100 buckets are asked for in one call, anchored at this instant.
chain

path · string · required

The chain the pool lives on. Solana only; every other chain returns 400 — this resource is not offered there.
pool

path · 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.

Response fields of Pool liquidity depth over time
FieldTypeDescription
candlesobject[]
candles[].atnumberThe bucket's OPEN, Unix seconds. Buckets are not a padded grid — a quiet pool skips a bucket rather than repeating its last value.
candles[].openUsdnumber | null
candles[].highUsdnumber | null
candles[].lowUsdnumber | null
candles[].closeUsdnumber | nullPool depth in USD at the bucket's close. A real 0 means DRAINED.
coveredFromnumber | nullThe earliest instant this response actually covers, or null when there are no candles at all. Never earlier than the requested from.
truncatedbooleantrue 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