Skip to main content
fast-trade sends one event per trade for a token, a pool, or a token inside one pool. It is the lightest channel: events carry only the trade, with no extra lookups, so they are delivered as soon as the block is processed. Weight: 1 per subscription. See Subscription weight.

Parameters

Sending neither token nor pool fails with:
The channel does not check that the token or pool exists. An address that never trades produces no events.

Which trades you receive

Every event is oriented to one token: data.token is the token the trade is described from, and data.tokenVs is the other side of the pool. Amounts, prices and type (buy or sell) are all from the point of view of data.token.
With both token and pool, the token must be one of the pool’s two tokens. If it isn’t, the subscription succeeds but never delivers anything. No error is returned.
Each swap has a base token and a quote token. The quote is the side that prices the other: a stablecoin, the chain’s native or wrapped-native token, or another recognised quote asset. In a MEME/WETH pool, MEME is the base and WETH is the quote.

The quote-token rule

A token-only subscription matches a trade when the token is the trade’s base token, or when it is the quote token but the quote is not a recognised quote asset. In practice, subscribing to a quote asset such as WETH or USDC by token gives you only trades where that asset is the base, for example WETH in a WETH/USDC pool. You do not receive every MEME/WETH trade on the chain. That keeps a WETH subscription about WETH’s own price, not every token priced in WETH. To follow a quote asset in a specific pool anyway, send both token and pool. That combination is matched by pool, so the quote-token rule doesn’t apply.

Excluding noise

With excludeNoise: true, a trade is dropped when any of these is true. “Followed token” means token if you sent it, otherwise the pool’s base token.
  1. The trade’s USD value is $0.10 or less.
  2. The followed token’s USD price is not a finite number, or is above 3.4e30, or below 1e-16.
  3. The followed token trades in more than one pool, and the trade’s USD value is $100 or less.
Whether a token trades in more than one pool is cached for about 5 minutes. For subscriptions with token, it is looked up before subscribed is sent. For pool-only subscriptions it is looked up on the first trade, so the first few trades may be filtered as if the token had a single pool.

Event data

data is a trade event:
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.

Example

Follow a token on Base, without noise:
Every trade in one pool, at most one per second:
The sampled subscription has no cursor on subscribed or on events.