Pools API

The individual trades in one pool

Raw trade events in ONE liquidity pool, addressed by the pool itself rather than by a token traded in it — who traded, when, which side, how much. An untrusted price is null, never a number.

GET/api/external/pool-analysis/pool-trades/{chain}/{pool}

What it returns

The individual trades in one liquidity pool, addressed by the POOL rather than by a token in it — the pool-keyed sibling of trades. Every row describes a swap that happened in THIS pool alone: a token traded through several pools has a different trade list at each one, and none of them sums to the token-keyed sibling's list without double-counting. A pool address nothing knows is a 404, not an empty list and not a 500. A priceUsd that could not be trusted — a literal 0 from the source, or a same-batch outlier check rejecting it — is null, never a number; the trade itself is still published. token names the pool leg each row is about: side is buying or selling IT, amountToken is an amount of IT and priceUsd is ITS price. It is null only when the source did not name the leg. On SOL, BNB, ETH, BASE and RHC a window in the past is answered from the newest trades at or before to; on STABLE and ARC only a window reaching the most recent trades is, and an older one comes back empty.

Chains

  • Solana SOL
  • BNB Chain BNB
  • Ethereum ETH
  • Stable STABLE
  • Base BASE
  • Robinhood Chain RHC
  • Arc ARC

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-trades/SOL/<pool>?from=<from>&to=<to>&limit=<limit>"
Parameters
ParameterDescription
from

query · integer · required

Window start, Unix SECONDS. Inclusive.
to

query · integer · required

Window end, Unix SECONDS. Inclusive.
limit

query · integer · required

Most trades to return, newest-first within the window. Capped at 200 — higher than the token-keyed sibling's cap because that one is bounded by the lowest of several sources' per-call ceilings, and this endpoint's first source has a higher one. When the second source answers (the first failed, or the window is too far in the past for it), at most 100 rows come back and coveredFrom/truncated say how far back they reach. A wide window costs no more than a narrow one: one upstream call regardless of how wide [from, to] is, two when the second source is asked.
chain

path · string · required

The chain the pool lives on. CELO, ARB, OP and SCROLL return 400 here.
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 The individual trades in one pool
FieldType
tradesobject[]
trades[].atnumber
trades[].sidestring
trades[].priceUsdnumber | null
trades[].amountTokennumber | null
trades[].volumeUsdnumber | null
trades[].walletstring | null
trades[].txHashstring | null
trades[].tokenstring | null
coveredFromnumber | null
truncatedboolean

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