Skip to main content

TypeScript shape

interface TradeSubscriptionPayload {
  id?: string | null;
  stable_id?: string | null;
  pair: string;
  token?: string | null;
  date?: number | null;
  token_price?: number | null;
  token_amount?: number | null;
  token_amount_vs?: number | null;
  token_amount_raw?: string | null;
  token_amount_raw_vs?: string | null;
  token_amount_usd?: number | null;
  type?: string | null;
  operation?: string | null;
  blockchain?: string | null;
  hash?: string | null;
  sender?: string | null;
  trader?: string | null;
}
id
String
REST trade id when available. It is nullable on fast-path stream messages; use stable_id as the fallback matching key.
stable_id
String
Deterministic stream trade id built from chainId, transaction hash, pair address, and swap index. Use it to disambiguate multiple trades in the same transaction when id is null.
pair
String!
required
Pair or pool address for the trade.
token
String
Token address in assetMode or traderMode.
date
Float
Trade timestamp in milliseconds.
token_price
Float
Base token price in USD at trade time.
token_amount
Float
Human-readable amount of the base token traded.
token_amount_vs
Float
Human-readable amount of the quote token traded.
token_amount_raw
String
Exact raw base token amount in the token’s smallest on-chain units.
token_amount_raw_vs
String
Exact raw quote token amount in the quote token’s smallest on-chain units.
token_amount_usd
Float
USD value of the trade.
type
String
Trade direction, usually buy or sell.
operation
String
Swap operation type, for example regular, deposit, or withdrawal.
blockchain
String
Blockchain name, for example ethereum, base, or solana.
hash
String
Transaction hash or Solana signature. hash is not unique enough by itself for multi-swap transactions.
sender
String
Transaction sender address.
trader
String
Matched wallet address in traderMode.