DeFi Chain Metrics API - TVL, Fees, Volume for Agents
Pricing
Pay per usage
DeFi Chain Metrics API - TVL, Fees, Volume for Agents
Real-time DeFi chain metrics for crypto trading agents. 16 metrics across 6 chains. Pay-per-call at $0.005. Data from DefiLlama, CoinGecko, Hyperliquid, Etherscan.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
George Kioko
Actor stats
0
Bookmarked
1
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
DeFi Chain Metrics API
Real-time TVL, fees, volume, and on-chain data for 6 blockchains. Built for trading agents and DeFi dashboards.
A pay-per-call DeFi data API that serves blockchain metrics instantly via HTTP. No subscriptions, no rate-limit walls -- just $0.005 per API call with data refreshed every 5 minutes from DefiLlama, CoinGecko, Hyperliquid, and Etherscan.
What It Does
- 16 real-time metrics per chain: TVL, stablecoin market cap, fees, revenue, DEX volume, perps volume, token price, market cap, and more
- 6 major blockchains covered: Ethereum, Solana, BSC, Tron, Bitcoin, Arbitrum
- Sub-second responses via Apify Standby mode -- data is pre-cached and served instantly
- Built for automation -- trading bots, DeFi dashboards, portfolio trackers, and AI agents can query structured JSON without scraping
Supported Chains
| Chain | Native Token | DeFi TVL Source | Explorer |
|---|---|---|---|
| Ethereum | ETH | DefiLlama | Etherscan |
| Solana | SOL | DefiLlama | -- |
| BSC | BNB | DefiLlama | Etherscan v2 |
| Tron | TRX | DefiLlama | -- |
| Bitcoin | BTC | DefiLlama | -- |
| Arbitrum | ARB | DefiLlama | Etherscan v2 |
Available Metrics
| # | Metric Key | Description | Unit | Source |
|---|---|---|---|---|
| 1 | tvl | Total Value Locked | USD | DefiLlama |
| 2 | stablecoins_mcap | Stablecoin market cap on chain | USD | DefiLlama |
| 3 | chain_fees_24h | Total chain fees (24h) | USD | DefiLlama |
| 4 | chain_revenue_24h | Chain revenue (24h) | USD | DefiLlama |
| 5 | dex_volume_24h | DEX trading volume (24h) | USD | DefiLlama |
| 6 | perps_volume_24h | Perpetuals volume (24h) | USD | Hyperliquid / DefiLlama |
| 7 | token_incentives_24h | Token incentives / bribes (24h) | USD | DefiLlama |
| 8 | app_revenue_24h | Application revenue (24h) | USD | DefiLlama |
| 9 | app_fees_24h | Application fees (24h) | USD | DefiLlama |
| 10 | active_addresses_24h | Active addresses (24h) | count | Etherscan |
| 11 | new_addresses_24h | New addresses (24h) | count | Etherscan |
| 12 | transactions_24h | Transaction count (24h) | count | Etherscan |
| 13 | gas_used_24h | Gas used (24h) | wei | Etherscan |
| 14 | token_price | Native token price | USD | DefiLlama / CoinGecko |
| 15 | token_mcap | Native token market cap | USD | CoinGecko |
| 16 | token_volume_24h | Native token trading volume (24h) | USD | CoinGecko |
| -- | bridged_tvl | Bridged TVL | USD | Unavailable -- no free source |
| -- | net_inflows | Net bridge inflows | USD | Unavailable -- no free source |
API Endpoints
This is a Standby API actor. Once running, it exposes these HTTP endpoints:
Get all metrics for a chain
$curl "https://gNoYlHf0L3druPJjI.apify.actor/metrics?chain=ethereum&token=YOUR_TOKEN"
Get a single metric
$curl "https://gNoYlHf0L3druPJjI.apify.actor/metrics?chain=ethereum&metric=tvl&token=YOUR_TOKEN"
List all chains and their data status
$curl "https://gNoYlHf0L3druPJjI.apify.actor/chains?token=YOUR_TOKEN"
Health check
$curl "https://gNoYlHf0L3druPJjI.apify.actor/health?token=YOUR_TOKEN"
Response Format
Full chain response (/metrics?chain=ethereum)
{"chain": "ethereum","chain_name": "Ethereum","updated_at": "2026-04-04T05:31:48.331Z","metrics": {"tvl": {"value": 52820000000,"formatted": "$52.82B","unit": "USD"},"stablecoins_mcap": {"value": 165560000000,"formatted": "$165.56B","unit": "USD"},"chain_fees_24h": {"value": 46010000,"formatted": "$46.01M","unit": "USD","change_1d": -5.2},"dex_volume_24h": {"value": 4460000000,"formatted": "$4.46B","unit": "USD","change_1d": 12.1},"token_price": {"value": 2050,"formatted": "$2.05K","unit": "USD"},"token_mcap": {"value": 247650000000,"formatted": "$247.65B","unit": "USD"},"perps_volume_24h": {"value": 2120000000,"formatted": "$2.12B","unit": "USD","source": "hyperliquid"}},"cache_age_seconds": 45,"is_stale": false}
Single metric response (/metrics?chain=ethereum&metric=tvl)
{"chain": "ethereum","chain_name": "Ethereum","metric": "tvl","value": 52340000000,"formatted": "$52.34B","unit": "USD","updated_at": "2026-04-03T12:00:00.000Z","cache_age_seconds": 45,"is_stale": false}
Pricing
$0.005 per API call -- pay-per-event via Apify platform billing.
| Usage | Monthly Cost |
|---|---|
| 100 calls/day | $15/month |
| 500 calls/day | $75/month |
| 1,000 calls/day | $150/month |
| 5,000 calls/day | $750/month |
No subscriptions. No minimum commitment. You only pay for what you use.
Why Not Just Use DefiLlama?
DefiLlama Pro API costs $300/month for unlimited access. This API serves the same underlying data per-call at $0.005.
A trading agent making 1,000 calls/day pays ~$150/month -- 50% cheaper with no commitment. If you only need 100 calls/day, you pay just $15/month instead of $300.
For AI agents and bots that need structured blockchain metrics on demand, per-call pricing beats flat subscriptions every time.
Architecture
graph LRA[Client / Trading Bot] -->|HTTP GET| B[Standby API Server]B -->|Read| C[Apify Key-Value Store]D[Refresh Loop] -->|Write every 5min| CD -->|Fetch| E[DefiLlama API]D -->|Fetch| F[CoinGecko API]D -->|Fetch| G[Hyperliquid API]D -->|Fetch| H[Etherscan v2 API]style B fill:#2563eb,color:#fffstyle C fill:#7c3aed,color:#fffstyle D fill:#059669,color:#fff
Data flow:
- The Refresh Loop fetches metrics from 4 free data sources every 5 minutes
- Metrics are cached in an Apify Key-Value Store per chain
- The Standby API Server serves cached data instantly on HTTP GET requests
- Each successful
/metricscall charges$0.005via Apify pay-per-event billing
Input Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
enabledChains | array | All 6 chains | Which chains to fetch metrics for |
refreshIntervalMs | integer | 300000 (5 min) | How often to refresh data from sources |
etherscanApiKey | string | -- | Free API key from etherscan.io for on-chain metrics |
Use Cases
- Crypto trading bots -- feed TVL and volume data into signal models
- DeFi dashboards -- display real-time chain metrics without managing data pipelines
- Portfolio trackers -- monitor token prices and market caps across chains
- AI agents -- structured JSON responses ready for LLM tool-use and function calling
- Research -- compare chain fees, revenue, and activity across L1s and L2s
Keywords
DeFi data API, blockchain metrics API, TVL API, crypto trading data, chain fees API, DeFi dashboard data, on-chain analytics, Ethereum metrics, Solana metrics, BSC metrics, Bitcoin DeFi, Arbitrum data, DefiLlama alternative, crypto market data API, real-time blockchain data