Aggregator

OKX DEX Router historical data as Parquet

Every OKX DEX Router instruction and event in Solana history, decoded with an Anchor IDL that we checked against real transactions. Trawl gives you 7 event tables and 25 instruction tables, with a column for each account, argument and field. Calls from other programs (CPI) are in the result too.

Updated

The preset

Program
proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u
Preset
okx-dex-router
Tables
7 event tables and 25 instruction tables, and part-* with the raw bytes of each match
Transactions
Successful only. Failed transactions changed nothing on the chain, and they are about 3% of the output. "include_failed": true keeps them.
Price
$4 for one recent epoch, $4.62 for one week of chain
Sample
Free, 856 KB

The price is the same for every program: you pay for the archive the scan reads, not for the rows. Pricing.

# ask for a price: a 402 with the quote, no payment yet
curl -X POST https://trawl.run/scan \
  -H 'Content-Type: application/json' \
  -d '{"preset":"okx-dex-router","start_epoch":1058,"end_epoch":1058}'

-- then, in DuckDB, on the files of the job
SELECT slot, signature, order_id, source_mint, destination_mint
FROM 'ev-swap_cpi_event2-*.parquet'
ORDER BY slot
LIMIT 10;

Add "filter": {"accounts": ["<wallet>"]} to keep only the transactions that touch one wallet. How a filter changes a preset.

Free sample

1,000 slots of epoch 1079, 6 November 2026, 13:41 to 13:45 UTC: every row the preset gives for them. 1,122 decoded instructions, 2,591 events and 0 raw rows, in 15 Parquet files. The zip also holds the IDL that decoded them, the schema, the provenance and a SHA-256 list. The samples of all presets cover the same slots, so they join on signature.

Download the sample (856 KB)

# check the zip, then each file in it
echo '2b33c377174eeb1269cb7ddb26eec5d9fe46cbe3cd4ec955b43bd811ee853cb4  trawl-sample-okx-dex-router-e1079.zip' | sha256sum -c
unzip trawl-sample-okx-dex-router-e1079.zip && cd trawl-sample-okx-dex-router-e1079
sha256sum -c SHA256SUMS

Slots 466,130,000 to 466,130,999. PROVENANCE.txt names the scan build and the SHA-256 of the IDL, which is the same as in the provenance of a paid job with this preset.

Event tables

One table for each event in the IDL. Each row also has log_index and the context columns. An event that the program writes two ways gives one row.

ev-swap_cpi_event2
fields: order_id u64, source_mint base58 string, destination_mint base58 string, source_token_account_owner base58 string, destination_token_account_owner base58 string, amount_in u64, source_token_change u64, destination_token_change u64
ev-swap_event
fields: dex JSON string, amount_in u64, amount_out u64
ev-swap_tob_v2_cpi_event2
fields: order_id u64, source_mint base58 string, destination_mint base58 string, source_token_account_owner base58 string, destination_token_account_owner base58 string, amount_in u64, source_token_change u64, destination_token_change u64, commission_direction bool, total_commission_rate u32, parent_commission_rate u32, parent_commission_amount u64, parent_commission_account base58 string, child_commission_rate u32, child_commission_amount u64, child_commission_account base58 string, platform_fee_rate u16, platform_fee_amount u64, platform_fee_account base58 string, trim_rate u8, trim_amount u64, trim_account base58 string
ev-swap_toc_v2_cpi_event2
fields: order_id u64, source_mint base58 string, destination_mint base58 string, source_token_account_owner base58 string, destination_token_account_owner base58 string, amount_in u64, source_token_change u64, destination_token_change u64, commission_direction bool, total_commission_rate u32, parent_commission_rate u32, parent_commission_amount u64, parent_commission_account base58 string, child_commission_rate u32, child_commission_amount u64, child_commission_account base58 string, platform_fee_rate u16, platform_fee_amount u64, platform_fee_account base58 string
ev-swap_with_fee_cpi_event_v3
fields: order_id u64, source_mint base58 string, destination_mint base58 string, source_token_account_owner base58 string, destination_token_account_owner base58 string, amount_in u64, source_token_change u64, destination_token_change u64, commission_direction bool, commission_paid_in_sol bool, total_commission_rate u32, total_commission_amount u64, num_commission_levels u8, commission_rates JSON string, commission_amounts JSON string, commission_accounts JSON string, trim_info JSON string
ev-swap_with_fees_cpi_event2
fields: order_id u64, source_mint base58 string, destination_mint base58 string, source_token_account_owner base58 string, destination_token_account_owner base58 string, amount_in u64, source_token_change u64, destination_token_change u64, commission_direction bool, commission_rate u32, commission_amount u64, commission_account base58 string, platform_fee_rate u16, platform_fee_amount u64, platform_fee_account base58 string, trim_rate u8, trim_amount u64, trim_account base58 string
ev-swap_with_fees_cpi_event_enhanced2
fields: order_id u64, source_mint base58 string, destination_mint base58 string, source_token_account_owner base58 string, destination_token_account_owner base58 string, amount_in u64, source_token_change u64, destination_token_change u64, commission_direction bool, commission_rate u32, commission_amount u64, commission_account base58 string, platform_fee_rate u16, platform_fee_amount u64, platform_fee_account base58 string, trim_rate u8, trim_amount u64, trim_account base58 string, charge_rate u16, charge_amount u64, charge_account base58 string

Instruction tables

One table for each instruction in the IDL: the named accounts, then the arguments. Each row also has the context columns: slot, tx_index, signature, success, fee, program_id, ix_index, is_inner, inner_index, stack_height, accounts. What each one holds.

ix-claim
accounts: signer, receiver, source_token_account, destination_token_account, sa_authority, token_mint, token_program, system_program, associated_token_program
args: amount u64
ix-claim_cashback_pumpfun
accounts: signer, sa_authority, user_volume_accumulator, receiver, event_authority, system_program, pumpfun_program
ix-claim_cashback_pumpswap
accounts: signer, sa_authority, user_volume_accumulator, wsol_mint, spl_token_program, uva_wsol_ata, sa_wsol_ata, receiver_wsol_ata, system_program, event_authority, pumpswap_program
ix-create_ata_with_close_authority
accounts: payer, owner, ata, close_authority, mint, token_program, associated_token_program, system_program
ix-create_token_account
accounts: payer, owner, token_account, token_mint, token_program, system_program
args: bump u8
ix-create_token_account_with_seed
accounts: payer, owner, token_account, token_mint, token_program, system_program
args: bump u8, seed u32
ix-init_token_ledger
accounts: payer, token_ledger, system_program
args: index u8
ix-proxy_swap
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, event_authority, program
args: args JSON string
ix-set_token_ledger
accounts: token_ledger, token_account
ix-swap
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, event_authority, program
args: args JSON string
ix-swap_tob
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, commission_account, platform_fee_account, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, event_authority, program
args: args JSON string, commission_info u32, platform_fee_rate u16, trim_rate u8
ix-swap_tob_enhanced
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, commission_account, platform_fee_account, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, event_authority, program
args: args JSON string, commission_info u32, platform_fee_rate u16, trim_rate u8, charge_rate u16
ix-swap_tob_v2
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, parent_commission_account, child_commission_account, platform_fee_account, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, event_authority, program
args: args JSON string, total_commission_info u32, parent_commission_rate u32, platform_fee_rate u16, trim_rate u8
ix-swap_tob_v3
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, event_authority, program
args: args JSON string, config JSON string, trim_config JSON string
ix-swap_tob_with_receiver
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, commission_account, platform_fee_account, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, sol_receiver, event_authority, program
args: args JSON string, commission_info u32, platform_fee_rate u16, trim_rate u8
ix-swap_tob_with_receiver_token_ledger
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, commission_account, platform_fee_account, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, sol_receiver, token_ledger, event_authority, program
args: args JSON string, commission_info u32, platform_fee_rate u16, trim_rate u8
ix-swap_tob_with_receiver_token_ledger_v3
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, token_ledger, sol_receiver, event_authority, program
args: args JSON string, config JSON string, trim_config JSON string
ix-swap_tob_with_receiver_v3
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, sol_receiver, event_authority, program
args: args JSON string, config JSON string, trim_config JSON string
ix-swap_tob_with_token_ledger
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, commission_account, platform_fee_account, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, token_ledger, event_authority, program
args: args JSON string, commission_info u32, platform_fee_rate u16, trim_rate u8
ix-swap_tob_with_token_ledger_v3
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, token_ledger, event_authority, program
args: args JSON string, config JSON string, trim_config JSON string
ix-swap_toc
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, commission_account, platform_fee_account, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, event_authority, program
args: args JSON string, commission_info u32, platform_fee_rate u16
ix-swap_toc_v2
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, parent_commission_account, child_commission_account, platform_fee_account, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, event_authority, program
args: args JSON string, total_commission_info u32, parent_commission_rate u32, platform_fee_rate u16
ix-swap_toc_v3
accounts: payer, source_token_account, destination_token_account, source_mint, destination_mint, sa_authority, source_token_sa, destination_token_sa, source_token_program, destination_token_program, associated_token_program, system_program, event_authority, program
args: args JSON string, config JSON string
ix-wrap_unwrap
accounts: payer, payer_wsol_account, wsol_mint, temp_wsol_account, commission_account, platform_fee_account, authority_pda, wsol_sa, token_program, system_program, event_authority, program
args: args JSON string
ix-wrap_unwrap_with_receiver
accounts: payer, payer_wsol_account, wsol_mint, temp_wsol_account, commission_account, platform_fee_account, authority_pda, wsol_sa, token_program, system_program, receiver, event_authority, program
args: args JSON string

Files are split by epoch and at 2 GB: eEEEE-ix-<name>-tNN-SSSS.parquet. Large integers stay exact: u128 is a decimal string. All decoded types.

Get OKX DEX Router data for your range.

Select an epoch range and get a firm price. You pay only when you send the job.

Get a price