Exchange Inflow/Outflow Indicator Development
Exchange flow is one of the key on-chain metrics. Inflow of BTC/ETH to exchanges historically correlates with selling pressure: holders transfer coins to the exchange to sell. Outflow is a sign of accumulation: coins move to cold wallets or DeFi. An indicator that tracks these flows in real-time gives structural advantage over purely technical analysis.
Operating Principle
We track transactions between wallets marked as exchange addresses and external addresses.
Inflow = sum of transfers to exchange addresses for the period Outflow = sum of transfers from exchange addresses for the period Net flow = Inflow - Outflow
If net flow is positive — coins are going to the exchange (selling pressure). If negative — they are leaving (accumulation).
Data Sources
Two approaches: on-chain parsing and ready-made APIs.
On-chain parsing — most accurate, but resource-intensive:
- Full Bitcoin node (bitcoind) or Ethereum node (go-ethereum/geth)
- Own database of tagged addresses (exchange wallets)
- Block parsing and transaction filtering by addresses
Ready-made APIs (faster to develop):
| Provider | Coverage | Data Type |
|---|---|---|
| Glassnode API | BTC, ETH, + altcoins | On-chain metrics |
| CryptoQuant API | BTC, ETH, stablecoins | Exchange flows |
| Nansen API | EVM chains | Smart money + exchange flows |
| IntoTheBlock | Multi-chain | Flow + sentiment |
For production systems we recommend combining: Glassnode/CryptoQuant for aggregated data + own parsing for real-time.
Exchange Address Database
The accuracy of the indicator directly depends on the quality of the exchange address database. Sources:
- Public databases: Etherscan tags, Bitcoin Who's Who, WalletExplorer
- Heuristic clustering: wallets using the same xpub or interacting with known exchange addresses through co-spend analysis
- Official proof-of-reserves: many exchanges publish lists of their cold/hot wallet addresses
- Chainalysis / Elliptic databases (paid, maximum accuracy)
For BTC, UTXO clustering is used. For EVM chains — analysis of transaction patterns (batch withdrawals, characteristic of CEX).
System Architecture
Blockchain Node / API → Parser → Kafka/RabbitMQ → Aggregator → TimescaleDB/ClickHouse
↓
API Server (REST/WS)
↓
Frontend Dashboard
Parser filters transactions to/from known exchange addresses and records raw events.
Aggregator calculates metrics over time windows: 1h, 4h, 24h, 7d. Uses sliding window aggregation.
TimescaleDB — PostgreSQL with hypertables optimized for time-series. Faster than standard PostgreSQL for time-based aggregation queries.
Visualization and Metrics
Main chart — exchange flow (inflow/outflow/net) overlaid on price chart. Periods of high inflow often coincide with tops.
Exchange Balance — total balance of coins across all exchanges over time. Multi-year trend of declining BTC on exchanges — structurally bullish signal.
Large Transaction Alerts — transactions above a threshold (e.g., > 1000 BTC) highlighted as "whale movements".
Stablecoin flows — separate metric: inflow of stablecoins (USDT, USDC) to exchanges signals readiness to buy.
Anomaly Detection
Z-score anomalies: if current inflow deviates from rolling mean by 2+ standard deviations — this is an anomalous event. Alert in Telegram/Discord.
Correlation analysis: how historically did exchange inflow precede corrections for a specific asset? Calculate lag correlation for different time shifts.
Additional Metrics
- Realized Cap — market cap calculated at the price of the last movement of each coin. Derivative metric from flow data.
- SOPR (Spent Output Profit Ratio) — ratio of sale price to purchase price for moved coins. > 1 means coins are being sold at a profit on average.
- NUPL (Net Unrealized Profit/Loss) — aggregated unrealized profit/loss of all holders.
These metrics are calculated from the same raw transaction data and added to the dashboard as additional panels.
What We Develop
A complete system for collecting and visualizing exchange flows: integration with Glassnode/CryptoQuant API or own on-chain parsing, exchange address database, metric aggregation in ClickHouse/TimescaleDB, REST API for data access and React dashboard with real-time updates, alerts on anomalies and comparison between exchanges.







