DeFi Chain Metrics API - TVL, Fees, Volume for Agents avatar

DeFi Chain Metrics API - TVL, Fees, Volume for Agents

Pricing

Pay per usage

Go to Apify Store
DeFi Chain Metrics API - TVL, Fees, Volume for Agents

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

George Kioko

Maintained by Community

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

ChainNative TokenDeFi TVL SourceExplorer
EthereumETHDefiLlamaEtherscan
SolanaSOLDefiLlama--
BSCBNBDefiLlamaEtherscan v2
TronTRXDefiLlama--
BitcoinBTCDefiLlama--
ArbitrumARBDefiLlamaEtherscan v2

Available Metrics

#Metric KeyDescriptionUnitSource
1tvlTotal Value LockedUSDDefiLlama
2stablecoins_mcapStablecoin market cap on chainUSDDefiLlama
3chain_fees_24hTotal chain fees (24h)USDDefiLlama
4chain_revenue_24hChain revenue (24h)USDDefiLlama
5dex_volume_24hDEX trading volume (24h)USDDefiLlama
6perps_volume_24hPerpetuals volume (24h)USDHyperliquid / DefiLlama
7token_incentives_24hToken incentives / bribes (24h)USDDefiLlama
8app_revenue_24hApplication revenue (24h)USDDefiLlama
9app_fees_24hApplication fees (24h)USDDefiLlama
10active_addresses_24hActive addresses (24h)countEtherscan
11new_addresses_24hNew addresses (24h)countEtherscan
12transactions_24hTransaction count (24h)countEtherscan
13gas_used_24hGas used (24h)weiEtherscan
14token_priceNative token priceUSDDefiLlama / CoinGecko
15token_mcapNative token market capUSDCoinGecko
16token_volume_24hNative token trading volume (24h)USDCoinGecko
--bridged_tvlBridged TVLUSDUnavailable -- no free source
--net_inflowsNet bridge inflowsUSDUnavailable -- 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.

UsageMonthly 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 LR
A[Client / Trading Bot] -->|HTTP GET| B[Standby API Server]
B -->|Read| C[Apify Key-Value Store]
D[Refresh Loop] -->|Write every 5min| C
D -->|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:#fff
style C fill:#7c3aed,color:#fff
style D fill:#059669,color:#fff

Data flow:

  1. The Refresh Loop fetches metrics from 4 free data sources every 5 minutes
  2. Metrics are cached in an Apify Key-Value Store per chain
  3. The Standby API Server serves cached data instantly on HTTP GET requests
  4. Each successful /metrics call charges $0.005 via Apify pay-per-event billing

Input Configuration

ParameterTypeDefaultDescription
enabledChainsarrayAll 6 chainsWhich chains to fetch metrics for
refreshIntervalMsinteger300000 (5 min)How often to refresh data from sources
etherscanApiKeystring--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