1
Decode
New blocks on each supported chain are decoded into pool creations, token launches and swaps for every supported protocol. Pool state (reserves, price) is updated with each event.
2
Classify and price
Each swap is classified (a regular trade, a liquidity change, MEV or a bonding event) and priced in USD using the token prices at that moment.
3
Aggregate
Token prices, liquidity, market cap and rolling window stats (volume, trades, buyers, sellers, price change) are computed from the priced swaps.
4
Serve
The REST API reads the indexed data. The WebSocket surfaces publish each block’s trades, in order, as they are processed.
Token prices
A token’s USD price is a weighted blend of its pools:- Up to 50 pools containing the token are considered, starting with the highest 24h volume.
- Each pool’s price is converted to USD through the other token’s USD price.
- Pools are weighted by 24h volume (pools with at least $1,000 of volume). If no pool has that much volume, they are weighted by liquidity instead (the pool’s weaker side, in USD).
- Pools with a very small share of the token’s volume are skipped. Pools with less than $1,000 of liquidity are ignored; if no pool reaches that, only the single deepest pool is used.
- Outlier prices are dropped before blending.
- Recognised stablecoins are pinned at $1.
tokenPrice on a trade) are the prices at the moment of that trade. Candle prices only count trades of at least $0.10, so dust trades do not distort charts.
Rolling stats
Token and pool stats such asvolume24hUSD, trades1h, buyers5min and priceChange24hPercentage are recomputed continuously, typically within about a minute of new trades. Expect REST stats to trail the live trade stream by up to that much.
Pulse keeps its own live windows for the short horizons (1 minute to 1 hour), so its live answers can move faster than REST stats, and numbers can differ slightly between the two.
What the REST API reads
- The REST API only reads indexed data. It never queries the chain on request, with one exception: the native coin balance in
GET /wallet/holdingsis read live from a node (and cached for about 5 seconds). - A token or pool must already be indexed. Requests for a token ChainQuery has not seen return
404 TOKEN_NOT_FOUND(orPOOL_NOT_FOUND); the API does not index it on demand. - Token metadata (name, symbol, supply, logo, socials) is stored when a token is first seen and refreshed in the background, so supply-based values such as market cap can update on later calls.
Which swaps count as trades
Only swaps classified as trades appear inGET /trades, the WebSocket channels, the multi-events stream and candles. These are excluded:
- adding or removing liquidity,
- MEV activity, including sandwich attacks and the swaps they sandwich,
- bonding events (a launchpad token graduating to a DEX pool).
Stream ordering and history
The WebSocket surfaces receive trades per chain, one block at a time:- Ordered. Blocks are released strictly in order, and items inside a block keep their on-chain order. Every event has a cursor that encodes this position, except on sampled subscriptions (
maxUpdatesPerMinute), which drop items and cannot resume. - Resumable. About 10 minutes of recent blocks are kept. Reconnect with your last cursor within that window and you receive exactly the events you missed, with no duplicates. Older cursors are refused with
RESUME_EXPIRED. See Cursors and resume. - Gaps. If a block has not been processed after about 15 seconds, the stream skips past it and sends a
gapmessage with the affected block range. Trades in those blocks are not streamed; fetch them from REST if you need them.
Freshness at a glance
Use
GET /health/last-swaps (at the host root, not under /api/v1) to check how recent the newest indexed swap is on each chain.