> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstream.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Trades

> Normalized DEX swap events across all supported chains — price, size, maker/taker, router, slippage.

The **Trades** data product is every DEX swap that ChainStream indexes, normalized so you can query by token, wallet, pool or router without caring which AMM emitted the event.

## What's inside

| Field group    | Examples                                                              |
| :------------- | :-------------------------------------------------------------------- |
| Identity       | `chainId`, `txHash`, `logIndex`, `blockNumber`, `timestamp`           |
| Parties        | `makerAddress`, `takerAddress`, `router`, `dex`                       |
| Economics      | `tokenIn`, `tokenOut`, `amountIn`, `amountOut`, `priceUsd`, `sizeUsd` |
| Context        | `poolAddress`, `feeTier`, `slippageBps`, `gasUsedUsd`                 |
| Classification | `side` (buy/sell), `type` (open/close/add/remove), `isFirstBuy`       |

## Coverage & freshness

* **Chains**: every chain in [Supported Chains](/en/docs/supported-chains).
* **DEXes**: Uniswap v2/v3/v4, Raydium, Meteora, PancakeSwap, Aerodrome, Jupiter-routed, + more — see [per-chain support tables](/en/api-reference/kafka-topics/evm).
* **Latency**: block-level — Kafka delivers within 1–2 s of finalization, REST within 5–10 s.

## Access

<CardGroup cols={2}>
  <Card title="REST" icon="database" href="/en/api-reference/endpoint/data/trade/v2/trade-chain-get">
    `/v2/trade/{chain}`, `/v2/trade/{chain}/activities`, `/v2/trade/{chain}/top-traders`.
  </Card>

  <Card title="GraphQL" icon="diagram-project" href="/en/graphql/getting-started/overview">
    Flexible filters: join Trades with Tokens and Wallets.
  </Card>

  <Card title="WebSocket" icon="bolt" href="/en/api-reference/endpoint/websocket/api">
    `dex-trade:{chain}_{tokenAddress}` (by token) and `dex-wallet-trade:{chain}_{walletAddress}` (by wallet). SDK: `client.stream.subscribeTokenTrade` / `subscribeWalletTrade`.
  </Card>

  <Card title="Kafka" icon="tower-broadcast" href="/en/api-reference/kafka-topics/evm">
    `{chain}.dex.trades` topics per chain, Protobuf-encoded.
  </Card>

  <Card title="SDK / CLI" icon="terminal" href="/en/docs/access-methods/cli">
    `client.trade.list()`, `chainstream market trades --chain solana --token <addr>`.
  </Card>

  <Card title="MCP" icon="robot" href="/en/docs/ai-agents/mcp-server/introduction">
    `trades_recent` tool for agents (filter by token, wallet or pool).
  </Card>
</CardGroup>

## Common use cases

* Render a live trade tape for a token
* Compute realized PnL for a wallet
* Trigger alerts on first-buy or large-trade events
* Feed a trading bot with maker/taker context
* Aggregate to OHLC at custom intervals (or use [Candles](/en/docs/data-products/candles-ohlc))

## Billing

REST / GraphQL: per-page cost scales with `limit`. WebSocket and Kafka charge per delivered message, discounted for high-volume tiers.

## Next

<CardGroup cols={2}>
  <Card title="Candles (OHLC)" icon="chart-column" href="/en/docs/data-products/candles-ohlc">
    Pre-aggregated price bars if you don't need tick-level detail.
  </Card>

  <Card title="Smart Money" icon="brain" href="/en/docs/data-products/smart-money">
    Trades filtered to high-performing wallet cohorts.
  </Card>
</CardGroup>
