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

# Spot Trades Feed

> Real-time DEX trades on 12 EVM chains and Solana over WebSocket: schema, fields, venues, USD pricing, corrections and history in historical_spot_trades.

The Spot Trades feed streams every decentralized exchange (DEX) trade on 12 EVM chains and Solana. Each WebSocket message holds one block. Each trade has its pool, its token amounts, the executed price, the taker side, a USD notional, and the transaction that settled it.

For connection, resume, corrections and latency, see the [Market Data Feeds overview](https://docs.dune.com/market-data-feeds/overview.md).

| | |
| - | - |
| Chains | Arbitrum, Arc, Avalanche C-Chain, Base, BNB Chain, Ethereum, HyperEVM, Monad, Optimism, Polygon, Robinhood Chain, X Layer, Solana |
| EVM endpoint | `wss://api.dune.com/api/feed/dex/trades/evm/{chain_id}` |
| Solana endpoint | `wss://api.dune.com/api/feed/dex/trades/svm/1` |
| EVM format | `dex-trades.json.v2` |
| Solana format | `dex-trades.json.v1` |
| History | `dune.dune.historical_spot_trades` |

## Coverage

The table shows one day of history, 2026-11-17, from `historical_spot_trades`. A venue is a distinct `venue` label. Counts change from day to day.

| Chain | Venues | Instruments | Trades |
| - | - | - | - |
| Arbitrum | 48 | 343 | 182,632 |
| Arc | 8 | 12 | 3,845 |
| Avalanche C-Chain | 24 | 159 | 74,158 |
| Base | 55 | 666 | 1,449,475 |
| BNB Chain | 83 | 1,604 | 3,306,795 |
| Ethereum | 46 | 912 | 160,371 |
| HyperEVM | 21 | 165 | 118,668 |
| Monad | 9 | 29 | 23,004 |
| Optimism | 17 | 162 | 141,593 |
| Polygon | 29 | 324 | 226,890 |
| Robinhood Chain | 28 | 512 | 887,407 |
| X Layer | 20 | 56 | 111,160 |
| Solana | 25 | 462 | 5,881,549 |
| **All chains** | **275** | **5,406** | **12,567,547** |

The 275 venue labels include `unknown_amm`, which marks pools whose program Dune has not attributed to a venue. On 2026-11-17 that label had 2,576 trades.

Examples of venues in the feed are Uniswap V2, V3 and V4, Curve, Balancer V2, Aerodrome and Slipstream, PancakeSwap V3 and Infinity, Camelot, GMX V2, and on Solana Raydium, Orca, Meteora, Pump.fun and PumpSwap. To browse instruments, open the [instrument explorer](https://dune.com/data/feeds).

## Message envelope

| Field | Type | Description |
| - | - | - |
| `schema_version` | string | `dex-trades.json.v2` on EVM, `dex-trades.json.v1` on Solana |
| `chain` | object | `{"id": 8453, "type": "evm"}` or `{"id": 1, "type": "svm"}` |
| `block_number` | integer | EVM block number, or Solana slot |
| `block_timestamp` | string | Block time, RFC 3339, UTC |
| `op` | string | `INSERT` for the first message of the block, `UPDATE` for a correction |
| `incarnation_version` | integer | Increases with each correction of the block |
| `sequence_number` | string | Resume cursor |
| `trades` | array | Every trade in the block. Can be empty. |
| `block_notification_time` | string | When Dune first observed the block. Omitted when unknown. |

## Trade fields: EVM (`dex-trades.json.v2`)

| Field | Type | Description |
| - | - | - |
| `trade_id` | string | Unique, stable trade identifier. The key for corrections. |
| `tx.hash` | string | Transaction hash, `0x` lowercase hex |
| `tx.from`, `tx.to` | string | Transaction sender and recipient. `to` is `null` for contract creation. |
| `tx.index` | integer | Position of the transaction in the block |
| `tx.source_kind` | string | `log` or `trace`: the source of the trade inside the transaction |
| `tx.source_index` | integer | Log index or trace index |
| `taker` | string | The address that received `amount_out` |
| `maker` | string | The filler on RFQ and order venues. Omitted for AMM pools, where the pool is the counterparty. |
| `pool` | string or null | Pool address |
| `pool_id` | string or null | Pool id for venues that identify pools by id, such as Uniswap V4 and the Balancer Vault. Exactly one of `pool` and `pool_id` is set. |
| `legs` | array | The tokens of the swap. Each leg has `address` and one of `amount_in_raw` (sent to the pool) or `amount_out_raw` (received from the pool), as a decimal string in the token's smallest unit. A leg can have its own `value`. |
| `base`, `quote` | string or null | Base and quote token addresses. Both are `null` when the swap is not resolved to a known instrument. |
| `side` | string or null | `buy` when the taker received the base token, else `sell` |
| `executed_price` | number or null | Quote per base, decimal-adjusted, from the token amounts |
| `value` | object or null | `{notional_usd, price_source, stale_usd_price}`. `null` when the trade is unpriced. |
| `condition_flags` | array | See [Condition flags](#condition-flags) |
| `instrument_code` | string | Dune instrument code, for example `WETH-USDC.UNIV3.BASE`. Omitted when not resolved. |

The EVM format has no token symbols, token decimals or venue names. Use `instrument_code` and the instrument reference data to get them.

## Trade fields: Solana (`dex-trades.json.v1`)

Solana trades have the same identity fields, in Solana's own formats, plus inline token and venue metadata.

| Field | Type | Description |
| - | - | - |
| `trade_id` | string | `{chain}-{slot}-{signature}-{outer_ix}-{inner_ix or x}-{ordinal}` |
| `tx.hash` | string | Transaction signature, base58 |
| `tx.from` | string | Fee payer |
| `tx.to` | null | Always `null` on Solana |
| `tx.index` | integer | Position of the transaction in the slot |
| `tx.source_kind` | string | Always `instruction` |
| `tx.source_index` | integer | Top-level instruction index |
| `venue.name` | string | Venue label, for example `raydium_clmm` or `pump_fun` |
| `venue.protocol` | string | AMM family of the venue |
| `venue.id` | string | Venue code, for example `RAYDIUMCLMM.SOL`. Omitted for `unknown_amm`. |
| `venue.pool` | string | Pool account, base58 |
| `taker`, `maker` | string | As on EVM |
| `tokens` | array | One entry per token: `address`, `symbol`, `decimals`, `amount_in_raw`, `amount_out_raw`, and decimal-adjusted `amount_in` and `amount_out` |
| `base`, `quote`, `side`, `executed_price`, `value`, `condition_flags`, `instrument_code` | | As on EVM. `instrument_code` ends in `.SOL`. |

Aggregator and router wrapper rows are not sent on the Solana feed. You receive the underlying pool fills only.

## USD value

`value.notional_usd` is the trade's USD value. Dune computes it from the quote token amount and an oracle price for the quote token.

* `price_source` is `chainlink` or `pyth`. On Solana live it is `pyth`.
* Staked SOL tokens (mSOL, bSOL, JupSOL, hSOL, stSOL) are priced at their protocol's onchain exchange rate times the SOL price.
* `stale_usd_price: true` means the oracle price was older than the staleness limit at the trade's block.
* If no oracle price exists for the quote token, `value` is `null` and the trade has the `unpriced` flag. Not every trade has a USD value.
* `executed_price` comes from the token amounts only. It does not use an oracle.

## Condition flags

| Flag | Meaning |
| - | - |
| `unpriced` | No USD price for the quote token. `value` is `null`. |
| `stale_usd_price` | The oracle price behind `notional_usd` was stale |
| `aggregated_trade` | The row is an aggregator or intent route that wraps underlying pool fills. Drop these rows when you sum volume, or you count the trade twice. |
| `price_outlier` | The implied price is far outside the pool's market: a unit price above $1e8, or a buy and a sell in one pool in the same transaction at prices 2x or more apart, each worth at least $1. The trade is a real swap. |
| `illiquid_usd_price` | History only. Not sent on the live feed. |

## Examples

EVM, Base (`dex-trades.json.v2`), captured on 19 November 2026:

```json theme={null}
{
  "schema_version": "dex-trades.json.v2",
  "chain": { "id": 8453, "type": "evm" },
  "block_number": 59669307,
  "block_timestamp": "2026-11-19T21:37:17Z",
  "op": "INSERT",
  "incarnation_version": 0,
  "sequence_number": "25123511",
  "trades": [
    {
      "tx": {
        "hash": "0x3404c9bbeac0916e1dc8c6a9e73dce63f93ab73a11f9cdf7bf958dd2f3258bde",
        "from": "0x7ba0f047e8a81e2b22831487b85316750d633b21",
        "to": "0xfdc4619cc6e9518a58407987f8e87d82e8e6409f",
        "index": 25,
        "source_kind": "trace",
        "source_index": 415
      },
      "trade_id": "8453-59669307-25-trace-415-0",
      "taker": "0xfdc4619cc6e9518a58407987f8e87d82e8e6409f",
      "pool": "0x04ecf751338812f20a9412ce51d40321ace7e7a1",
      "pool_id": null,
      "legs": [
        { "address": "0xb20000000000000000000016e38fd364d271ba28", "amount_in_raw": "144003818" },
        { "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "amount_out_raw": "135745287" }
      ],
      "base": "0xb20000000000000000000016e38fd364d271ba28",
      "quote": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "side": "sell",
      "executed_price": 94.265061083311,
      "value": { "notional_usd": 135.72417317, "price_source": "chainlink", "stale_usd_price": false },
      "condition_flags": [],
      "instrument_code": "0xb20000000000000000000016e38fd364d271ba28-USDC.UNIV3.BASE"
    }
  ],
  "block_notification_time": "2026-11-19T21:37:17.022481750Z"
}
```

Solana (`dex-trades.json.v1`), captured on 19 November 2026:

```json theme={null}
{
  "schema_version": "dex-trades.json.v1",
  "chain": { "id": 1, "type": "svm" },
  "block_number": 471488749,
  "block_timestamp": "2026-11-19T21:37:16Z",
  "op": "INSERT",
  "incarnation_version": 0,
  "sequence_number": "85955169",
  "trades": [
    {
      "tx": {
        "hash": "4X6TnexBJvb4bf6mqYSB2ZfXKv2fLHHfnjwUFyKKnYGagwrJkh9e6YdDVB6xtKh6APftFF2zdvzRgaaetV9K38Pd",
        "from": "Bx6cvJ1zEurodnxAZi38HkRMb5jeR1CdsX9tGx8LiMt",
        "to": null,
        "index": 43,
        "source_kind": "instruction",
        "source_index": 5
      },
      "trade_id": "1-471488749-4X6TnexBJvb4bf6mqYSB2ZfXKv2fLHHfnjwUFyKKnYGagwrJkh9e6YdDVB6xtKh6APftFF2zdvzRgaaetV9K38Pd-5-2-0",
      "venue": {
        "id": "PUMPFUN.SOL",
        "name": "pump_fun",
        "pool": "EYQJF4oZhoevQzgxXdRTiYBNqZfY9wkovxtiS2Sh29pY",
        "protocol": "pump_fun"
      },
      "taker": "Bx6cvJ1zEurodnxAZi38HkRMb5jeR1CdsX9tGx8LiMt",
      "tokens": [
        {
          "address": "So11111111111111111111111111111111111111112",
          "symbol": "WSOL", "decimals": 9,
          "amount_in_raw": "7169665", "amount_out_raw": "0",
          "amount_in": 0.007169665, "amount_out": 0.0
        },
        {
          "address": "He35s92sjfnzJYU2eChU7DxvNoJuDU6RsbXe56uWpump",
          "symbol": "420 MUSK", "decimals": 6,
          "amount_in_raw": "0", "amount_out_raw": "39431888705132",
          "amount_in": 0.0, "amount_out": 39431888.705132
        }
      ],
      "base": "He35s92sjfnzJYU2eChU7DxvNoJuDU6RsbXe56uWpump",
      "quote": "So11111111111111111111111111111111111111112",
      "side": "buy",
      "executed_price": 1.8182403215869494e-10,
      "value": { "notional_usd": 0.5177873146277863, "price_source": "pyth", "stale_usd_price": false },
      "condition_flags": [],
      "instrument_code": "He35s92sjfnzJYU2eChU7DxvNoJuDU6RsbXe56uWpump-WSOL.PUMPFUN.SOL"
    }
  ],
  "block_notification_time": "2026-11-19T21:37:17.002698881Z"
}
```

## History

`dune.dune.historical_spot_trades` has one row per spot trade. Dune rebuilds it from raw chain data with the same decoders and oracle pricing as the live feed.

| Chain | First day |
| - | - |
| Polygon | 2022-03-09 |
| Solana | 2022-04-07 |
| Avalanche C-Chain | 2022-11-26 |
| Ethereum | 2023-01-01 |
| Base | 2023-08-04 |
| Arbitrum | 2023-09-20 |
| Optimism | 2024-04-09 |
| HyperEVM | 2025-02-20 |
| BNB Chain | 2025-05-09 |
| Monad | 2025-11-25 |
| X Layer | 2026-04-01 |
| Robinhood Chain | 2026-06-06 |
| Arc | 2026-06-12 |

On 19 November 2026, every chain had a partition for every day from its first day to 2026-11-18.

Columns: `chain_type`, `chain_id`, `block_timestamp`, `block_date`, `block_number`, `tx_hash`, `tx_from`, `tx_to`, `tx_index`, `tx_source_kind`, `tx_source_index`, `trade_id`, `venue`, `venue_id`, `protocol`, `pool`, `pool_id`, `taker`, `maker`, `base_token_address`, `base_token_symbol`, `base_token_decimals`, `quote_token_address`, `quote_token_symbol`, `quote_token_decimals`, `base_amount_raw`, `base_amount`, `quote_amount_raw`, `quote_amount`, `side`, `executed_price`, `notional_usd`, `price_source`, `stale_usd_price`, `condition_flags`, `instrument_id`, `instrument_code`.

Differences from the live feed:

* History keeps only pool fills. Aggregator wrapper rows are not in it.
* Each day keeps the trades of pools that qualified for the instrument universe on that day.
* Solana token symbols are the symbols at the time the day was rebuilt, because Solana token metadata can change.

```sql DuneSQL theme={null}
SELECT
  date_trunc('hour', block_timestamp) AS hour,
  sum(notional_usd) AS volume_usd,
  sum(quote_amount) / sum(base_amount) AS vwap
FROM dune.dune.historical_spot_trades
WHERE block_date = DATE '2026-11-17'
  AND chain_type = 'svm'
  AND instrument_code = 'WSOL-USDC.RAYDIUMCLMM.SOL'
  AND NOT contains(condition_flags, 'price_outlier')
GROUP BY 1
ORDER BY 1
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.