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

# CEX Flows

> Curated centralized exchange flow datasets across 29 chains on Dune

Dune's CEX (Centralized Exchange) tables identify known exchange addresses across 29 chains, track token flows in and out of exchanges, and detect user deposit addresses through on-chain consolidation pattern analysis.

<Info>
  **Maintained by:** Dune · **Refresh:** \~1 hour · **Chains:** 29 (addresses), 21 EVM (flows)
</Info>

<Card title="Get This Data" icon="database" href="https://dune.com/enterprise?dataset=cex-flows">
  Access CEX flow data via API, Datashare, or the Dune App.
</Card>

## Available Tables

<CardGroup cols={2}>
  <Card title="cex.flows" icon="database" href="/data-catalog/curated/cex-flows/flows">
    All token flows to/from identified CEX addresses on EVM chains
  </Card>

  <Card title="cex.addresses" icon="database" href="/data-catalog/curated/cex-flows/addresses">
    All identified CEX-controlled addresses across 29 chains (including non-EVM)
  </Card>

  <Card title="cex.deposit_addresses" icon="database" href="/data-catalog/curated/cex-flows/deposit_addresses">
    Programmatically detected user deposit addresses
  </Card>
</CardGroup>

## When to Use These Tables

* Monitor exchange inflows and outflows for market sentiment analysis
* Track specific token flows to/from exchanges
* Identify exchange-controlled addresses for compliance or analytics
* Detect user deposit addresses programmatically
* Analyze exchange reserve changes over time

## Coverage

**cex.addresses (29 chains):** Ethereum, BNB Chain, Avalanche C-Chain, Optimism, Arbitrum, Polygon, Bitcoin, Fantom, Aptos, Celo, Zora, zkSync, zkEVM, Linea, Solana, Scroll, Tron, Base, Mantle, Worldchain, Sei, Berachain, Ink, Katana, Kaia, Nova, opBNB, Unichain, Sui

**cex.flows (21 EVM chains):** Ethereum, BNB Chain, Avalanche C-Chain, Gnosis, Optimism, Arbitrum, Polygon, Base, Celo, Zora, zkSync, Scroll, Fantom, Linea, zkEVM, Berachain, Ink, Katana, Nova, opBNB, Unichain

**Exchanges:** Major centralized exchanges with identified hot wallets and deposit addresses. Additional exchanges can be added upon request for enterprise customers.

<Info>
  **Need coverage for additional exchanges?** We can add new exchange address identification upon request. [Contact our enterprise team →](https://dune.com/enterprise)
</Info>

## Query Performance

`cex.flows` uses `block_month` for incremental processing. Always filter on time range and optionally `blockchain`.

```sql theme={null}
-- ✅ Good: time-bounded with chain filter
SELECT * FROM cex.flows
WHERE blockchain = 'ethereum'
  AND block_time >= NOW() - INTERVAL '7' DAY
  AND cex_name = 'Binance'

-- ❌ Slow: no time filter
SELECT * FROM cex.flows
WHERE cex_name = 'Coinbase'
```

## Methodology

CEX tables are maintained by Dune ([source code](https://github.com/duneanalytics/spellbook)).

`cex.addresses` aggregates known CEX addresses from manually curated seed files across chain-specific models. Each address record includes who added it and when.

`cex.flows` joins identified CEX addresses with token transfer events to classify each transfer as an inflow (to exchange) or outflow (from exchange), enriched with token metadata and USD pricing.

`cex.deposit_addresses` uses on-chain heuristics to detect user-specific deposit addresses: it identifies addresses that receive tokens from external wallets and then consolidate those tokens to known CEX hot wallets — a pattern characteristic of exchange deposit addresses.

## Example Queries

**Daily CEX net flows by exchange (Ethereum):**

```sql theme={null}
SELECT
  date_trunc('day', block_time) AS day,
  cex_name,
  SUM(CASE WHEN flow_type = 'inflow' THEN amount_usd ELSE 0 END) AS inflows_usd,
  SUM(CASE WHEN flow_type = 'outflow' THEN amount_usd ELSE 0 END) AS outflows_usd,
  SUM(CASE WHEN flow_type = 'inflow' THEN amount_usd ELSE -amount_usd END) AS net_flow_usd
FROM cex.flows
WHERE blockchain = 'ethereum'
  AND block_time >= NOW() - INTERVAL '30' DAY
GROUP BY 1, 2
ORDER BY 1 DESC, 5 DESC
```

**Stablecoin flows to exchanges:**

```sql theme={null}
SELECT
  cex_name,
  token_symbol,
  SUM(CASE WHEN flow_type = 'inflow' THEN amount_usd ELSE 0 END) AS inflow_usd,
  SUM(CASE WHEN flow_type = 'outflow' THEN amount_usd ELSE 0 END) AS outflow_usd
FROM cex.flows
WHERE blockchain = 'ethereum'
  AND token_symbol IN ('USDT', 'USDC', 'DAI')
  AND block_time >= NOW() - INTERVAL '7' DAY
GROUP BY 1, 2
ORDER BY 3 DESC
```

## Related Tables

* `labels.addresses` — Broader address labeling beyond CEX
* `tokens.transfers` — Raw transfer data underlying CEX flow classification
* `staking_ethereum.deposits` — Staking data for CEX staking analysis

<CardGroup cols={2}>
  <Card title="Enterprise Data Solutions" icon="building" href="https://dune.com/enterprise">
    Need custom exchange coverage or dedicated support? Talk to our enterprise team.
  </Card>

  <Card title="Build Custom Models" icon="code" href="/api-reference/connectors/overview">
    Build private exchange flow analytics with the dbt Connector.
  </Card>
</CardGroup>
