Skip to main content
In progress. This table is not served yet. The page documents it as it lands.
facts.dex_trades_volume holds one row per swap, in token amounts rather than dollars. Instead of signing the amounts, each row names the token the trader handed over in token_in_id and the token they got back in token_out_id, both amounts positive. Every swap keeps its row: if the pool is missing from the registry, app_id is left empty rather than the swap being dropped. log_index is the swap event’s position within its block on EVM chains; chains that are not EVM put their own event position in the same column.

Columns

ColumnTypeDescription
block_timestampTIMESTAMPThe time when the block containing this swap was included.
transaction_hashSTRINGHash of the transaction containing the swap.
log_indexINT64Position of the swap event within its block.
dex_pool_idSTRINGPool the swap executed in, keyed like dimensions.dex_pools.
app_idSTRINGThe app operating the pool, read from the pool registry table. Empty when that table does not carry the pool.
chain_idSTRINGChain the swap executed on.
project_idSTRINGProject the operating app belongs to.
token_in_idSTRINGToken the trader handed to the pool, keyed like dimensions.tokens.
token_out_idSTRINGToken the trader received from the pool.
fee_rateBIGNUMERICFee charged on this swap, as a decimal fraction of its size.
amount_inBIGNUMERICAmount of token_in_id handed over, in whole token units, always positive.
amount_outBIGNUMERICAmount of token_out_id received, in whole token units, always positive.

Sample queries

Put a filter on block_timestamp in every query. The table is partitioned on it, and leaving the filter out reads every day we hold.
Read one pool’s swaps on a single day. Amounts are in whole token units, so a dollar value means joining a price yourself.

Notes

fee_rate describes the individual swap. On most venues it is the same as the pool’s fixed fee_tier, so every trade in the pool carries the same value. Where the venue can change its fee, the rate is set swap by swap and two trades in the same pool can differ. This table carries token amounts and no dollar column. The daily tables apply our token prices once, in one place, which is what makes their pool, app and project totals agree with each other. For a dollar figure on an individual swap, join whichever price you trust. Metrics covers daily pool volume, fees and TVL.