Skip to main content
market-details follows a list of pools. For every trade in any of them, it sends the trade together with the pool’s market data, re-priced at that trade. Use it for pair pages and pool dashboards. Weight: the number of distinct pools in pools. See Subscription weight.

Parameters

There is no excludeNoise and no token parameter on this channel.
pools must contain pool addresses. Unlike REST GET /market/details, a token address is not resolved to its best pool. The channel does not check that the pools exist: an address that is not a pool subscribes successfully and never sends events. To find a token’s pools, use GET /token/markets.

Which trades you receive

  • Every trade in each listed pool. The quote-token rule does not apply.
  • Each trade is oriented to the pool’s base token: data.token is the base and data.tokenVs is the quote, matching pairData.baseToken and pairData.quoteToken.

Event data

data is a trade event with one extra field, pairData.
string
Address of the token the trade is viewed from, lowercase. All token* fields describe this token and all *Vs fields describe the other side.
string
Address of the other token in the pair, lowercase.
string
Pool address or 32-byte pool id, lowercase.
string | null
Pool type id, for example uniswap-v3.
number
Trade time in Unix epoch milliseconds (block time).
number
Same value as date.
number
Block number of the trade.
number
USD price of token at the time of the trade.
number
USD price of tokenVs at the time of the trade.
number
Amount of token traded, adjusted for decimals. Always positive.
number
Amount of tokenVs traded, adjusted for decimals. Always positive.
string
Amount of token as a raw integer string in base units. Always positive.
string
Amount of tokenVs as a raw integer string in base units. Always positive.
number
USD value of the trade.
number
Price of token in the chain’s native coin (for example ETH): tokenPrice divided by the native coin’s USD price at the time of the trade. 0 when the native price is unknown.
"buy" | "sell"
Direction from the point of view of token. buy: token left the pool (the trader received token). sell: token entered the pool (the trader gave up token).
"regular"
Always regular.
string
Chain display name, for example Ethereum or Base. This is not a chain id.
string
Transaction hash.
string
Address that initiated the transaction (the trader’s wallet), lowercase.
number | null
Gas fee for this trade in USD: the transaction’s gas cost, split evenly across the swaps in that transaction. null when unknown.
object | null
The pool’s market data, in the same shape as the REST GET /market/details response. null when it could not be loaded in time (see below).

How pairData is built

  • Market data is built once per block for each pool and reused for every trade in that block. Reserves (base.approximateReserveToken, quote.approximateReserveToken and their raw values) are as of the end of the block. Windowed stats such as volume and trade counts come from the regularly refreshed pool stats, so they lag slightly behind the live trade.
  • Each event re-prices the block’s data at the trade: Other fields, including priceTokenString, liquidityUSD and the windowed stats, are as built for the block.
  • pairData is null when the pool is not found, the lookup fails, or it takes longer than 2 seconds. The trade fields are still sent.
  • base and quote can each be null when that token’s details are not stored.
  • Date fields such as createdAt and latestTradeDate are ISO 8601 strings.

Example