OQ — D22 · DEX & Trading
25 typed tables generated from the OKX DEX v3 IDL — 6 event tables and 19 instruction tables. Every column name comes from the program's own interface definition.
- Tables
- 25
- Event tables
- 6
- Instruction tables
- 19
- Account types
- 1
Program ID
proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3uOne table per event declared in the IDL. The fully qualified name is on the left, the short alias on the right — both resolve to the same physical table.
okx_okx_v3_solana.okx_okx_v3_evt_swap_cpi_event2okx_okx_v3.swap_cpi_event2okx_okx_v3_solana.okx_okx_v3_evt_swap_eventokx_okx_v3.swap_eventokx_okx_v3_solana.okx_okx_v3_evt_swap_tob_v2_cpi_event2okx_okx_v3.swap_tob_v2_cpi_event2okx_okx_v3_solana.okx_okx_v3_evt_swap_toc_v2_cpi_event2okx_okx_v3.swap_toc_v2_cpi_event2okx_okx_v3_solana.okx_okx_v3_evt_swap_with_fees_cpi_event2okx_okx_v3.swap_with_fees_cpi_event2okx_okx_v3_solana.okx_okx_v3_evt_swap_with_fees_cpi_event_enhanced2okx_okx_v3.swap_with_fees_cpi_event_enhanced2
One table per instruction. OnchainQueries also exposes verified account_<name> aliases for instruction account columns when the bundled IDL and the live schema agree.
okx_okx_v3_solana.okx_okx_v3_call_claimokx_okx_v3.call_claimokx_okx_v3_solana.okx_okx_v3_call_claim_cashback_pumpfunokx_okx_v3.call_claim_cashback_pumpfunokx_okx_v3_solana.okx_okx_v3_call_claim_cashback_pumpswapokx_okx_v3.call_claim_cashback_pumpswapokx_okx_v3_solana.okx_okx_v3_call_create_token_accountokx_okx_v3.call_create_token_accountokx_okx_v3_solana.okx_okx_v3_call_create_token_account_with_seedokx_okx_v3.call_create_token_account_with_seedokx_okx_v3_solana.okx_okx_v3_call_init_token_ledgerokx_okx_v3.call_init_token_ledgerokx_okx_v3_solana.okx_okx_v3_call_proxy_swapokx_okx_v3.call_proxy_swapokx_okx_v3_solana.okx_okx_v3_call_set_token_ledgerokx_okx_v3.call_set_token_ledgerokx_okx_v3_solana.okx_okx_v3_call_swapokx_okx_v3.call_swapokx_okx_v3_solana.okx_okx_v3_call_swap_tobokx_okx_v3.call_swap_tobokx_okx_v3_solana.okx_okx_v3_call_swap_tob_enhancedokx_okx_v3.call_swap_tob_enhancedokx_okx_v3_solana.okx_okx_v3_call_swap_tob_v2okx_okx_v3.call_swap_tob_v2okx_okx_v3_solana.okx_okx_v3_call_swap_tob_with_receiverokx_okx_v3.call_swap_tob_with_receiverokx_okx_v3_solana.okx_okx_v3_call_swap_tob_with_receiver_token_ledgerokx_okx_v3.call_swap_tob_with_receiver_token_ledgerokx_okx_v3_solana.okx_okx_v3_call_swap_tob_with_token_ledgerokx_okx_v3.call_swap_tob_with_token_ledgerokx_okx_v3_solana.okx_okx_v3_call_swap_tocokx_okx_v3.call_swap_tocokx_okx_v3_solana.okx_okx_v3_call_swap_toc_v2okx_okx_v3.call_swap_toc_v2okx_okx_v3_solana.okx_okx_v3_call_wrap_unwrapokx_okx_v3.call_wrap_unwrapokx_okx_v3_solana.okx_okx_v3_call_wrap_unwrap_with_receiverokx_okx_v3.call_wrap_unwrap_with_receiver
Typed parameters keep values out of the SQL text. Save the file, then pass each value with its type.
SELECT date_trunc('hour', ts) AS hour, count(*) AS eventsFROM okx_okx_v3_solana.okx_okx_v3_evt_swap_cpi_event2WHERE ts >= {{start_time}}GROUP BY hourORDER BY hour;query sql \ --file okx_okx_v3.sql \ --param 'start_time:timestamp=2026-08-01 00:00:00' \ --output ./resultsOnchainQueries selects an engine, queues the query, and downloads checksum-verified Parquet parts plus a manifest. See the CLI guide.
Pro includes every engine class and 50,000 query credits a month.