DEX Trades

Enriched swap events across 6 chains with token symbols, USD amounts, and protocol attribution.

6 tables in this category.

Tables

View NameDatabaseSourceORDER BY
agent.ethereum_dex_tradesagentdex_ethereum.tradesblock_time, tx_hash, evt_index
agent.base_dex_tradesagentdex_base.tradesblock_time, tx_hash, evt_index
agent.arbitrum_dex_tradesagentdex_arbitrum.tradesblock_time, tx_hash, evt_index
agent.bsc_dex_tradesagentdex_bnb.tradesblock_time, tx_hash, evt_index
agent.tron_dex_tradesagentdex_tron.tradesblock_time, tx_hash, evt_index
agent.hyperevm_dex_tradesagentdex_hyperevm.tradesblock_time, tx_hash, evt_index
  • agent.arbitrum_prices_day
  • agent.base_prices_day
  • agent.ethereum_erc20
  • agent.ethereum_fees_daily
  • agent.ethereum_prices_day
  • agent.hyperliquid_market_data
  • agent.hyperliquid_perp_meta

Sample Queries

1. Top 10 DEX protocols by volume today

SELECT project, sum(amount_usd) AS volume_usd
FROM agent.ethereum_dex_trades
WHERE block_date = today() - 1
GROUP BY project
ORDER BY volume_usd DESC
LIMIT 10

2. Uniswap V3 WETH/USDC trades in the last 24 hours

SELECT block_time, token_bought_symbol, token_sold_symbol,
       token_bought_amount, token_sold_amount, amount_usd
FROM agent.ethereum_dex_trades
WHERE project = 'uniswap' AND version = '3'
  AND token_pair = 'USDC-WETH'
  AND block_date >= today() - 1
ORDER BY block_time DESC
LIMIT 20

Table Schemas

agent.ethereum_dex_trades

Enriched DEX swap events with token symbols, decimals, USD amounts, and protocol attribution. One row per swap event. Combines decoded events from all supported DEX protocols on this chain.

Engine: MergeTree | Partition: toYYYYMM(block_date) | ORDER BY: block_time, tx_hash, evt_index

ColumnTypeDescription
blockchainStringBlockchain network name
projectStringProtocol name (lowercase): uniswap, sushiswap, curve, pancakeswap, aerodrome, etc.
versionStringProtocol version string: '1', '2', '3', 'v3', 'slipstream', etc.
block_monthDateUTC block month (partition key)
block_dateDatePartition key. Always filter on this column for performance.
block_timeDateTime64(3)UTC block timestamp
block_numberUInt64Block number
token_bought_symbolNullable(String)Symbol of token received
token_sold_symbolNullable(String)Symbol of token sent
token_pairStringAlphabetically sorted pair string (e.g., 'ETH-USDC'). Useful for GROUP BY.
token_bought_amountFloat64Human-readable amount (divided by token decimals). Null if decimals unknown.
token_sold_amountNullable(Float64)Human-readable amount (divided by token decimals). Null if decimals unknown.
token_bought_amount_rawUInt256Raw token received amount (pre-decimal)
token_sold_amount_rawNullable(UInt256)Raw token sent amount (pre-decimal)
amount_usdNullable(Float64)One-sided USD value of token_sold. Prices from CoinGecko hourly + DEX VWAP. Null for unpriced tokens.
token_bought_addressNullable(String)Bought token contract address
token_sold_addressNullable(String)Sold token contract address
takerStringEOA that initiated the swap transaction, not the router/aggregator contract
makerNullable(String)Liquidity pool address that provided the other side of the trade
project_contract_addressStringPool or router contract address
tx_hashStringTransaction hash
tx_fromStringTransaction sender (EOA)
tx_toStringTransaction recipient
evt_indexUInt32Event log index in transaction
💡 Tip
  • amount_usd is one-sided (token_sold value) following DefiLlama methodology — multiply by 2 for two-sided
  • Filter by project + version for protocol-specific analysis (e.g., project='uniswap', version='3')
  • taker is the EOA that initiated the swap, not the router contract
  • token_pair is alphabetically sorted (ETH-USDC not USDC-ETH) for consistent grouping
  • Use block_date for daily aggregations — it is the partition key
⚠️ Warning
  • No aggregator attribution — a swap routed through 1inch still shows as the underlying DEX
  • USD prices from CoinGecko hourly — illiquid or brand-new tokens may have null amount_usd
  • Does not include limit orders, RFQ fills, or off-chain matching

agent.base_dex_trades

Enriched DEX swap events with token symbols, decimals, USD amounts, and protocol attribution. One row per swap event. Combines decoded events from all supported DEX protocols on this chain.

Engine: MergeTree | Partition: toYYYYMM(block_date) | ORDER BY: block_time, tx_hash, evt_index

ColumnTypeDescription
blockchainStringBlockchain network name
projectStringProtocol name (lowercase): uniswap, sushiswap, curve, pancakeswap, aerodrome, etc.
versionStringProtocol version string: '1', '2', '3', 'v3', 'slipstream', etc.
block_monthDateUTC block month (partition key)
block_dateDatePartition key. Always filter on this column for performance.
block_timeDateTime64(3)UTC block timestamp
block_numberUInt64Block number
token_bought_symbolNullable(String)Symbol of token received
token_sold_symbolNullable(String)Symbol of token sent
token_pairStringAlphabetically sorted pair string (e.g., 'ETH-USDC'). Useful for GROUP BY.
token_bought_amountFloat64Human-readable amount (divided by token decimals). Null if decimals unknown.
token_sold_amountFloat64Human-readable amount (divided by token decimals). Null if decimals unknown.
token_bought_amount_rawUInt256Raw token received amount (pre-decimal)
token_sold_amount_rawUInt256Raw token sent amount (pre-decimal)
amount_usdNullable(Float64)One-sided USD value of token_sold. Prices from CoinGecko hourly + DEX VWAP. Null for unpriced tokens.
token_bought_addressStringBought token contract address
token_sold_addressStringSold token contract address
takerStringEOA that initiated the swap transaction, not the router/aggregator contract
makerNullable(String)Liquidity pool address that provided the other side of the trade
project_contract_addressStringPool or router contract address
tx_hashStringTransaction hash
tx_fromStringTransaction sender (EOA)
tx_toStringTransaction recipient
evt_indexUInt32Event log index in transaction
💡 Tip
  • amount_usd is one-sided (token_sold value) following DefiLlama methodology — multiply by 2 for two-sided
  • Filter by project + version for protocol-specific analysis (e.g., project='uniswap', version='3')
  • taker is the EOA that initiated the swap, not the router contract
  • token_pair is alphabetically sorted (ETH-USDC not USDC-ETH) for consistent grouping
  • Use block_date for daily aggregations — it is the partition key
⚠️ Warning
  • No aggregator attribution — a swap routed through 1inch still shows as the underlying DEX
  • USD prices from CoinGecko hourly — illiquid or brand-new tokens may have null amount_usd
  • Does not include limit orders, RFQ fills, or off-chain matching

agent.arbitrum_dex_trades

Enriched DEX swap events with token symbols, decimals, USD amounts, and protocol attribution. One row per swap event. Combines decoded events from all supported DEX protocols on this chain.

Engine: MergeTree | Partition: toYYYYMM(block_date) | ORDER BY: block_time, tx_hash, evt_index

ColumnTypeDescription
blockchainStringBlockchain network name
projectStringProtocol name (lowercase): uniswap, sushiswap, curve, pancakeswap, aerodrome, etc.
versionStringProtocol version string: '1', '2', '3', 'v3', 'slipstream', etc.
block_monthDateUTC block month (partition key)
block_dateDatePartition key. Always filter on this column for performance.
block_timeDateTime64(3)UTC block timestamp
block_numberUInt64Block number
token_bought_symbolNullable(String)Symbol of token received
token_sold_symbolNullable(String)Symbol of token sent
token_pairStringAlphabetically sorted pair string (e.g., 'ETH-USDC'). Useful for GROUP BY.
token_bought_amountFloat64Human-readable amount (divided by token decimals). Null if decimals unknown.
token_sold_amountFloat64Human-readable amount (divided by token decimals). Null if decimals unknown.
token_bought_amount_rawUInt256Raw token received amount (pre-decimal)
token_sold_amount_rawUInt256Raw token sent amount (pre-decimal)
amount_usdNullable(Float64)One-sided USD value of token_sold. Prices from CoinGecko hourly + DEX VWAP. Null for unpriced tokens.
token_bought_addressStringBought token contract address
token_sold_addressStringSold token contract address
takerStringEOA that initiated the swap transaction, not the router/aggregator contract
makerNullable(String)Liquidity pool address that provided the other side of the trade
project_contract_addressStringPool or router contract address
tx_hashStringTransaction hash
tx_fromStringTransaction sender (EOA)
tx_toStringTransaction recipient
evt_indexUInt64Event log index in transaction
💡 Tip
  • amount_usd is one-sided (token_sold value) following DefiLlama methodology — multiply by 2 for two-sided
  • Filter by project + version for protocol-specific analysis (e.g., project='uniswap', version='3')
  • taker is the EOA that initiated the swap, not the router contract
  • token_pair is alphabetically sorted (ETH-USDC not USDC-ETH) for consistent grouping
  • Use block_date for daily aggregations — it is the partition key
⚠️ Warning
  • No aggregator attribution — a swap routed through 1inch still shows as the underlying DEX
  • USD prices from CoinGecko hourly — illiquid or brand-new tokens may have null amount_usd
  • Does not include limit orders, RFQ fills, or off-chain matching

agent.bsc_dex_trades

Enriched DEX swap events with token symbols, decimals, USD amounts, and protocol attribution. One row per swap event. Combines decoded events from all supported DEX protocols on this chain.

Engine: MergeTree | Partition: toYYYYMM(block_date) | ORDER BY: block_time, tx_hash, evt_index

ColumnTypeDescription
blockchainStringBlockchain network name
projectStringProtocol name (lowercase): uniswap, sushiswap, curve, pancakeswap, aerodrome, etc.
versionStringProtocol version string: '1', '2', '3', 'v3', 'slipstream', etc.
block_monthDateUTC block month (partition key)
block_dateDatePartition key. Always filter on this column for performance.
block_timeDateTimeUTC block timestamp
block_numberUInt64Block number
token_bought_symbolNullable(String)Symbol of token received
token_sold_symbolNullable(String)Symbol of token sent
token_pairStringAlphabetically sorted pair string (e.g., 'ETH-USDC'). Useful for GROUP BY.
token_bought_amountFloat64Human-readable amount (divided by token decimals). Null if decimals unknown.
token_sold_amountFloat64Human-readable amount (divided by token decimals). Null if decimals unknown.
token_bought_amount_rawUInt256Raw token received amount (pre-decimal)
token_sold_amount_rawUInt256Raw token sent amount (pre-decimal)
amount_usdNullable(Float64)One-sided USD value of token_sold. Prices from CoinGecko hourly + DEX VWAP. Null for unpriced tokens.
token_bought_addressStringBought token contract address
token_sold_addressStringSold token contract address
takerStringEOA that initiated the swap transaction, not the router/aggregator contract
makerStringLiquidity pool address that provided the other side of the trade
project_contract_addressStringPool or router contract address
tx_hashStringTransaction hash
tx_fromStringTransaction sender (EOA)
tx_toStringTransaction recipient
evt_indexUInt64Event log index in transaction
💡 Tip
  • amount_usd is one-sided (token_sold value) following DefiLlama methodology — multiply by 2 for two-sided
  • This is the LARGEST dex_trades table (~4B rows) — always use tight block_date filters
  • PancakeSwap dominates BSC DEX volume — filter by project='pancakeswap' for protocol-specific analysis
  • taker is the EOA that initiated the swap, not the router contract
⚠️ Warning
  • No aggregator attribution — a swap routed through 1inch still shows as the underlying DEX
  • USD prices from CoinGecko hourly — illiquid or brand-new tokens may have null amount_usd
  • Does not include limit orders, RFQ fills, or off-chain matching

agent.tron_dex_trades

Enriched DEX swap events with token symbols, decimals, USD amounts, and protocol attribution. One row per swap event. Combines decoded events from all supported DEX protocols on this chain.

Engine: MergeTree | Partition: toYYYYMM(block_date) | ORDER BY: block_time, tx_hash, evt_index

ColumnTypeDescription
blockchainStringBlockchain network name
projectStringProtocol name (lowercase): uniswap, sushiswap, curve, pancakeswap, aerodrome, etc.
versionStringProtocol version string: '1', '2', '3', 'v3', 'slipstream', etc.
block_monthDateUTC block month (partition key)
block_dateDatePartition key. Always filter on this column for performance.
block_timeDateTime64(3)UTC block timestamp
block_numberUInt64Block number
token_bought_symbolNullable(String)Symbol of token received
token_sold_symbolNullable(String)Symbol of token sent
token_pairStringAlphabetically sorted pair string (e.g., 'ETH-USDC'). Useful for GROUP BY.
token_bought_amountFloat64Human-readable amount (divided by token decimals). Null if decimals unknown.
token_sold_amountFloat64Human-readable amount (divided by token decimals). Null if decimals unknown.
token_bought_amount_rawUInt256Raw token received amount (pre-decimal)
token_sold_amount_rawUInt256Raw token sent amount (pre-decimal)
amount_usdNullable(Float64)One-sided USD value of token_sold. Prices from CoinGecko hourly + DEX VWAP. Null for unpriced tokens.
token_bought_addressStringBought token contract address
token_sold_addressStringSold token contract address
takerStringEOA that initiated the swap transaction, not the router/aggregator contract
makerStringLiquidity pool address that provided the other side of the trade
project_contract_addressStringPool or router contract address
tx_hashStringTransaction hash
tx_fromStringTransaction sender (EOA)
tx_toStringTransaction recipient
evt_indexUInt32Event log index in transaction
💡 Tip
  • amount_usd is one-sided (token_sold value) following DefiLlama methodology
  • Tron addresses use base58 format (T...) not hex — keep this in mind for address filters
  • SunSwap dominates Tron DEX volume
⚠️ Warning
  • No aggregator attribution — a swap routed through 1inch still shows as the underlying DEX
  • USD prices from CoinGecko hourly — illiquid or brand-new tokens may have null amount_usd
  • Does not include limit orders, RFQ fills, or off-chain matching

agent.hyperevm_dex_trades

Enriched DEX swap events with token symbols, decimals, USD amounts, and protocol attribution. One row per swap event. Combines decoded events from all supported DEX protocols on this chain.

Engine: MergeTree | Partition: toYYYYMM(block_date) | ORDER BY: block_time, tx_hash, evt_index

ColumnTypeDescription
blockchainStringBlockchain network name
projectStringProtocol name (lowercase): uniswap, sushiswap, curve, pancakeswap, aerodrome, etc.
versionStringProtocol version string: '1', '2', '3', 'v3', 'slipstream', etc.
block_monthDateUTC block month (partition key)
block_dateDatePartition key. Always filter on this column for performance.
block_timeDateTime64(3)UTC block timestamp
block_numberUInt64Block number
token_bought_symbolStringSymbol of token received
token_sold_symbolStringSymbol of token sent
token_pairStringAlphabetically sorted pair string (e.g., 'ETH-USDC'). Useful for GROUP BY.
token_bought_amountFloat64Human-readable amount (divided by token decimals). Null if decimals unknown.
token_sold_amountFloat64Human-readable amount (divided by token decimals). Null if decimals unknown.
token_bought_amount_rawUInt256Raw token received amount (pre-decimal)
token_sold_amount_rawUInt256Raw token sent amount (pre-decimal)
amount_usdNullable(Float64)One-sided USD value of token_sold. Prices from CoinGecko hourly + DEX VWAP. Null for unpriced tokens.
token_bought_addressStringBought token contract address
token_sold_addressStringSold token contract address
takerStringEOA that initiated the swap transaction, not the router/aggregator contract
makerNullable(String)Liquidity pool address that provided the other side of the trade
project_contract_addressStringPool or router contract address
tx_hashStringTransaction hash
tx_fromStringTransaction sender (EOA)
tx_toStringTransaction recipient
evt_indexUInt32Event log index in transaction
💡 Tip
  • amount_usd is one-sided (token_sold value) following DefiLlama methodology
  • HyperEVM is the EVM-compatible layer on Hyperliquid — distinct from perp trading data
  • Newer chain — data starts from HyperEVM launch, coverage may be thinner than Ethereum
⚠️ Warning
  • No aggregator attribution — a swap routed through 1inch still shows as the underlying DEX
  • USD prices from CoinGecko hourly — illiquid or brand-new tokens may have null amount_usd
  • Does not include limit orders, RFQ fills, or off-chain matching