Token trades
Latest trades, newest first. One transaction can produce several rows, also for one wallet:
on Solana two wallets that sign it are two rows; a multi-hop swap through the token can be a
sell and a buy of the same wallet, and a swap routed through several pools several rows on
the same side; on EVM chains a row is one swap log. Key rows on id: it is the same on REST
pages, the trades snapshot, its frames and its retracts, and unique among one token’s
rows (across tokens, key on token + id).
Page back with next until it is null: a page can hold fewer rows than limit and still
carry next. A Solana page may also hold more than limit rows, when one transaction alone
has more, and the first page may leave out the last half second of trades, which the
trades channel carries. On EVM chains, while a token is watched, the first page also
carries live legs history lacks, so it can hold up to twice limit rows.
from and to walk a time window: the first page starts just below to, the page that
reaches from has next: null, and next carries the window, so later pages need only
the cursor. Pages are newest first only: for oldest first, walk the window and reverse it.
On EVM chains wallet= gives that wallet’s swaps of the token as
/wallets/{chain}/{address}/trades gives them (one row per pool, with pool).
next of the previous page as cursor; next is null on the last page. wallet= keeps one wallet’s trades (on EVM chains, as wallet trades gives them: one row per pool, with pool). from and to (Unix ms) walk a time window: the first page starts just below to, the page that reaches from has next: null, and next carries the window. For oldest first, walk the window and reverse it:
- A row is one wallet’s side of a swap. One transaction can give several rows, also for one wallet: on Solana two wallets that sign it are two rows; a multi-hop swap through the token can be a sell and a buy of the same wallet, and a swap routed through several pools several rows on the same side; on EVM chains a row is one swap log.
- Key rows on
id: the same on REST pages, thetradeschannel’s snapshot, frames and retracts. The pages of one walk do not repeat a row. Never key onsignaturealone, orsignature+wallet. sideis the side of the token:buymeans the wallet received it.quoteAmount,quoteSymbolandquoteTokenare the other side of the swap, in its own units:quoteSymbolnames the chain’s coin for its wrapped token (SOL, ETH, BNB), else the quote’s symbol (USDC, USD1, …).volumeNativeandpriceNativeare the trade in the chain’s coin (SOL, ETH, BNB).walletisnullwhen no source names the trader; on EVM chains a pool or the V4 PoolManager is never given as one.poolanddexcan benullwhen the source does not say which pool.volumeUsd,priceUsd,quoteAmountandquoteSymbolcan benullon a history row too.- On EVM chains, while a token is watched, the first page also carries live legs history lacks: it can hold up to twice
limitrows. - The row count does not end the walk: a page can hold fewer rows than
limit, even none, and still carrynext. A Solana page may also hold more thanlimitrows, when one transaction alone has more, and the first page may leave out the last half second of trades, which the live channel carries. - A Solana page may answer 503 with
Retry-After: it cannot be served right now. Ask again after it, with the same cursor.
trades channel sends the last 100 trades, then every new one.Path Parameters
Query Parameters
The next of the previous page, as given (URL-encoded). Opaque, and its format may change: never build or alter one. One the server can no longer honour is a 400: start again from the first page. A cursor that keeps failing (a 400, or a 503 again and again) while the first page loads: start again from the first page too.