Overview
solana.dex_swaps is a Turbo-only curated dataset that emits one normalized row per DEX swap across the major Solana AMMs and bonding-curve programs. Each row is a fully decoded swap event with the bought/sold token, amounts (both raw and decimal-scaled), the underlying program, and the transaction context needed to trace the swap back on-chain.
This dataset is exclusive to Turbo and is not available in Mirror.
- Track swap volume, prices, or flows across multiple Solana DEXes without decoding each program’s instructions yourself.
- Attribute swaps to routers/aggregators (for example, Jupiter) versus direct DEX interactions.
- Join raw and decimal-scaled amounts alongside the on-chain transaction signature and slot.
Quick start
Scope the source to the DEXes you care about withfilter.program_ids (program IDs) and options.dex (human-readable labels). Both accept a comma-separated string.
start_block, block_ranges, filters, checkpoints).
Supported DEXes and program IDs
The dataset currently decodes swap events from the following programs. Theproject column is the human-readable label (use in options.dex); project_main_id carries the raw on-chain program ID (use in filter.program_ids).
DEX (project) | Program ID (project_main_id) |
|---|---|
meteora_damm_v1 | Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB |
meteora_damm_v2 | cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG |
raydium_clmm | CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK |
raydium_cpmm | CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C |
orca_whirlpool | whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc |
pump_amm | pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA |
pumpfun | 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P |
Schema
All amounts describe a single side of the trade: the bought token is what the trader received, the sold token is what they gave up.| Column | Type | Nullable | Description |
|---|---|---|---|
id | string | no | Unique swap id. |
project | string | yes | Human-readable DEX label (for example, raydium_clmm, pump_amm). |
version | uint8 | yes | DEX/event schema version. |
block_timestamp | uint64 | no | Unix timestamp (seconds) of the block. |
block_slot | uint64 | no | Solana slot the transaction landed in. |
trade_source | string | no | direct when the swap is a top-level instruction; otherwise the program ID of the router/aggregator (for example, Jupiter) that invoked it. |
token_bought_amount | float64 | no | Amount received, scaled by token_bought_decimals (human units). |
token_sold_amount | float64 | no | Amount paid, scaled by token_sold_decimals (human units). |
token_bought_amount_raw | uint64 | no | Amount received in raw base units (unscaled integer). |
token_sold_amount_raw | uint64 | no | Amount paid in raw base units (unscaled integer). |
token_bought_mint_address | string | no | SPL mint address of the token received. |
token_sold_mint_address | string | no | SPL mint address of the token paid. |
token_bought_decimals | uint8 | no | Decimals of the bought mint. |
token_sold_decimals | uint8 | no | Decimals of the sold mint. |
project_main_id | string | no | The DEX program ID (raw, on-chain). |
trader_id | string | no | The swap instruction’s own payer/owner account. See field notes. |
tx_id | string | no | Transaction signature. |
instruction_index | int64 | no | Index of the swap instruction within the flattened instruction list. |
parent_instruction_index | int64 | yes | Parent instruction index when invoked by a router (inner instruction); null for a top-level swap. |
Field notes
token_bought_*vstoken_sold_*— direction is from the trader’s perspective. A row always has both sides populated;token_bought_amountandtoken_sold_amountare the decimal-scaled versions of the_rawinteger amounts.trade_source— distinguishes direct DEX interactions from router-routed ones. When a swap is an inner instruction of an aggregator, this holds the parent (router) program ID rather thandirect.trader_id— the payer/owner account attached to the swap instruction itself. For router-routed swaps this is typically the router-owned account that signed the inner instruction, not necessarily the end user that submitted the transaction. Usetx_idplus the outer transaction’s fee payer if you need the originating wallet.projectvsproject_main_id— useprojectfor human-readable filters and grouping; useproject_main_idwhen you need the exact on-chain program ID.
Guide: Stream swaps from selected DEXes to Postgres
This pipeline streams Raydium CLMM and Orca Whirlpool swaps.filter.program_ids narrows the source at scan time; options.dex tells the decoder which DEX projects to emit.
Guide: Filter to a single DEX
Narrow both the source filter and the decoder options to a single DEX — here, Raydium CLMM:Guide: Separate direct swaps from router-routed swaps
Aggregators like Jupiter invoke DEX programs as inner instructions. Usetrade_source to split direct swaps from aggregator flow: