Skip to content
OnchainQueries

OQ — D03 · DEX & Trading

19 typed tables generated from the DFlow Aggregator v4 IDL — 2 event tables and 17 instruction tables. Every column name comes from the program's own interface definition.

Tables
19
Event tables
2
Instruction tables
17
Account types
1

Program ID

DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH
OQ — D03·1Event tables

One 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.

  • dflow_aggregator_v4_solana.dflow_aggregator_v4_evt_fee_eventdflow_aggregator_v4.fee_event
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_evt_swap_eventdflow_aggregator_v4.swap_event
OQ — D03·2Instruction tables

One table per instruction. OnchainQueries also exposes verified account_<name> aliases for instruction account columns when the bundled IDL and the live schema agree.

17/17
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_close_empty_token_accountdflow_aggregator_v4.call_close_empty_token_account
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_close_orderdflow_aggregator_v4.call_close_order
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_create_referral_token_account_idempotentdflow_aggregator_v4.call_create_referral_token_account_idempotent
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_fill_orderdflow_aggregator_v4.call_fill_order
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_init_market_ledger_idempotentdflow_aggregator_v4.call_init_market_ledger_idempotent
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_open_orderdflow_aggregator_v4.call_open_order
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_swapdflow_aggregator_v4.call_swap
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_swap2dflow_aggregator_v4.call_swap2
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_swap2_with_destinationdflow_aggregator_v4.call_swap2_with_destination
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_swap2_with_destination_nativedflow_aggregator_v4.call_swap2_with_destination_native
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_swap_with_destinationdflow_aggregator_v4.call_swap_with_destination
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_swap_with_destination_nativedflow_aggregator_v4.call_swap_with_destination_native
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_transfer_feedflow_aggregator_v4.call_transfer_fee
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_transfer_soldflow_aggregator_v4.call_transfer_sol
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_transfer_to_sponsordflow_aggregator_v4.call_transfer_to_sponsor
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_unwrap_soldflow_aggregator_v4.call_unwrap_sol
  • dflow_aggregator_v4_solana.dflow_aggregator_v4_call_wrap_soldflow_aggregator_v4.call_wrap_sol
OQ — D03·3Example

Typed parameters keep values out of the SQL text. Save the file, then pass each value with its type.

dflow_aggregator_v4.sql
SELECT  date_trunc('hour', ts) AS hour,  count(*) AS eventsFROM dflow_aggregator_v4_solana.dflow_aggregator_v4_evt_swap_eventWHERE ts >= {{start_time}}GROUP BY hourORDER BY hour;
shell
query sql \  --file dflow_aggregator_v4.sql \  --param 'start_time:timestamp=2026-08-01 00:00:00' \  --output ./results

OnchainQueries 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.