> ## 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

> Arc trading pools and their daily volume.

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. Arc pools appear in three tables.

* [`dimensions.dex_pools`](/docs/catalog/dex/registry): one row per pool.
* [`metrics_dex_pools`](/docs/catalog/dex/metrics): `trading_volume_daily`, one row per pool per day.
* [`metrics_dex_pools_by_pair`](/docs/catalog/dex/metrics): one row per pool and traded token pair per day, in `trading_volume_daily`.

Trading volume is a flow, so it adds up: a week of daily rows sums to the week, and a set of pools sums to the group. Volume rows land only on the days a pool saw trading.

Every column is documented at [DEX](/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.

**Top pools, one day**

**Rank Arc 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-10-14')
      and timestamp < timestamp('2026-10-15')
      and chain_id = 'arc'
    order by trading_volume desc
    limit 20
)

select
    pools.pool_display_name,
    top_pools.trading_volume
from top_pools
join `dimensions.dex_pools` as pools
    using (dex_pool_id)
order by top_pools.trading_volume desc
```

**Busiest pairs**

**Find the busiest traded token pairs on Arc, 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-10-12')
  and timestamp < timestamp('2026-10-19')
  and chain_id = 'arc'
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.