> ## Documentation Index
> Fetch the complete documentation index at: https://tokenterminal.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To query the Token Terminal data catalog, read https://tokenterminal.com/docs/catalog/agents-manual.md first. It is the whole catalog as one page: table naming grammar, key columns, partition and cluster rules, units, additivity, and the tables that are documented but not served yet.
> Never query a catalog table on a time bound alone. Also filter its cluster key, which you read from INFORMATION_SCHEMA.COLUMNS; an empty result means the object is a view, whose pruning contract is on its page. Compute is billed to the caller's own Google Cloud project.

# DEX

> Robinhood Chain trading pools, their daily volume, value locked and fees.

A decentralized exchange, or DEX, lets users swap one token for another against a pool: a contract holding a reserve of two tokens that anyone can trade with. Robinhood Chain pools appear in three tables.

* [`dimensions.dex_pools`](https://tokenterminal.com/docs/catalog/dex/registry): one row per pool. `fee_tier` records a pool's configurable fee level, so it is null on pools whose design fixes the fee.
* [`metrics_dex_pools`](https://tokenterminal.com/docs/catalog/dex/metrics): one table per measure, one row per pool per day.
* [`metrics_dex_pools_by_pair`](https://tokenterminal.com/docs/catalog/dex/metrics): one row per pool and traded token pair per day, in `trading_volume_daily`.

Trading volume and fees are flows, so they add up: a week of daily rows sums to the week, and a set of pools sums to the group. Value locked, in `metrics_dex_pools.tvl_daily`, is a level: the latest row is the answer, and summing it across days gives a meaningless number. Every pool gets a TVL row every day it exists; volume and fee rows land only on the days a pool saw trading.

Every column is documented at [DEX](https://tokenterminal.com/docs/catalog/dex/index.md).

## Sample queries

> [!WARNING]
>
> The daily pool tables are among the largest in the catalog. Bound `timestamp` and filter `chain_id` in every query; without them the query reads the whole table.

> [tab] Top pools, one day
>
> **Rank Robinhood Chain pools by trading volume on one day.** Reading the day from the volume table and joining the pool list afterwards keeps the join small.
>
> ```sql theme={null}
> with top_pools as (
>     select
>         dex_pool_id,
>         trading_volume
>     from `metrics_dex_pools.trading_volume_daily`
>     where timestamp >= timestamp('2026-08-20')
>       and timestamp < timestamp('2026-08-21')
>       and chain_id = 'robinhoodchain'
>     order by trading_volume desc
>     limit 20
> )
>
> select
>     pools.pool_display_name,
>     pools.fee_tier,
>     top_pools.trading_volume
> from top_pools
> join `dimensions.dex_pools` as pools
>     using (dex_pool_id)
> order by top_pools.trading_volume desc
> ```

> [tab] Busiest pairs
>
> **Find the busiest traded token pairs on Robinhood Chain, and how many pools each one trades in.** `dex_pair_id` joins the two token addresses and the chain in sorted address order, so the same two tokens produce the same identifier whichever way round the trade went.
>
> ```sql theme={null}
> select
>     dex_pair_id,
>     count(distinct dex_pool_id) as pools,
>     sum(trading_volume) as trading_volume
> from `metrics_dex_pools_by_pair.trading_volume_daily`
> where timestamp >= timestamp('2026-08-16')
>   and timestamp < timestamp('2026-08-23')
>   and chain_id = 'robinhoodchain'
> group by dex_pair_id
> order by trading_volume desc
> limit 20
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.