DefiLlama
Client-executable: 67
OpenAPI 3.1:
/openapi/defillama.jsonDeFi analytics: protocol and chain TVL, token prices, stablecoins, yield pools, DEX and derivatives volumes, options, hacks, fees and revenue.
Independent service, not affiliated with DefiLlama. DefiLlama is a trademark of its owner.
What you can get
- TVL for every tracked protocol and chain, current and historical
- Current, historical and first-seen USD prices for tokens by chain and address
- Stablecoin supply per chain and over time
- Yield pools with APY and TVL history
- DEX, derivatives and options volumes, fees, revenue and protocol hacks
First request
Example: GET /coins/prices/current/{coins}. Send your key in the X-Hub-Key header.
curl -sS -H "X-Hub-Key: $API_HUB_KEY" \
"https://openapihub.dev/run/defillama/coins/prices/current/coingecko:ethereum,coingecko:bitcoin"Response
The provider's JSON arrives unchanged in data. Abridged example; values change with the market.
{
"source": "defillama",
"status": 200,
"data": {
"coins": {
"coingecko:ethereum": {"price": 1814.53, "symbol": "ETH", "timestamp": 1794963882, "confidence": 0.999},
"coingecko:bitcoin": {"price": 64585.98, "symbol": "BTC", "timestamp": 1794963882, "confidence": 0.999}
}
}
}Limits and key
80 requests per second per key, bursts up to 160, 60 requests in flight. On 429, wait for Retry-After. Limits · Pricing · OpenAPI JSON
Get a free key in the Telegram bot: one key per account, issued in a few seconds.
Use cases
All endpoints
Aggregators
GET
/overview/aggregators — Aggregate DEX aggregator volume overview across all protocols and chains.Bridges
GET
/v2/metrics/bridges — Cross-chain bridge volume metrics across protocols and chains (bridges.llama.fi is paid).GET
/v2/metrics/bridge-aggregators — Bridge aggregator volume metrics snapshot across protocols and chains.GET
/overview/bridge-aggregators/{chain} — Bridge aggregator volume overview scoped to a single chain.Charts
GET
/v2/chart/{adapterType} — Aggregate full-history chart for one metric adapter ([[unixTs, value]…]).GET
/v2/chart/tvl/protocol/{p} — One protocol's full TVL history as compact pairs (?key=borrowed selects active loans).GET
/v2/chart/{adapterType}/protocol/{p} — One protocol's volume/fee/etc. history for an adapter ([[unixTs, value]…]).Derivatives
GET
/v2/metrics/derivatives — Perpetuals and derivatives volume metrics across all protocols and chains (/overview/derivatives is paid).GET
/v2/metrics/open-interest — Perpetuals open-interest metrics snapshot across protocols and chains.GET
/overview/aggregator-derivatives — Aggregate derivatives/perps aggregator volume overview across all chains.GET
/overview/aggregator-derivatives/{chain} — Derivatives aggregator volume overview scoped to a single chain.GET
/summary/aggregator-derivatives/{protocol} — One derivatives aggregator's volume summary and history.GET
/summary/open-interest/{protocol} — One derivatives protocol's open-interest summary and history.Ecosystem
GET
/v2/metrics/fork — Protocol fork TVL and dominance snapshot keyed by parent protocol (/forks is paid).GET
/hacks — Complete historical database of DeFi hacks and exploits with losses, techniques, and affected chains.GET
/langs — TVL breakdown across smart contract programming languages (Solidity, Rust, Vyper, Move, …).GET
/treasury/{protocol} — Detailed treasury holdings, token breakdown, and historical value for a single protocol.Lists
GET
/lite/protocols2 — Lightweight protocol list used by chart pickers and filters (audit-confirmed).GET
/lite/charts — All chains' lightweight per-series charts (tvl/staking/borrowed/liquidity-staking/treasury…).GET
/lite/v2/protocols — Lightweight v2 array of all protocols with current TVL, category, and chainTvls.Options
Oracles
GET
/v2/metrics/oracle — Oracle metrics snapshot powering the oracles page (the free path to oracle data — the documented /oracles list is paid).GET
/v2/chart/oracle/protocol-breakdown — Oracle TVS breakdown across oracle providers over time (heavy).Overview
GET
/overview/dexs — Aggregate DEX volume, fees and revenue history across all protocols (heavy: ~13 MB).GET
/v2/metrics/fees — Protocol fees and revenue metrics snapshot across protocols and chains (heavy).Prices
GET
/coins/prices/current/{coins} — Current USD price, symbol, timestamp and confidence for one or more coins.GET
/coins/prices/historical/{timestamp}/{coins} — USD price(s) of one or more coins at a point in time (or several timestamps).GET
/coins/batchHistorical — Batch historical prices for several coins at several timestamps in one call.GET
/coins/block/{chain}/{timestamp} — Closest block height and timestamp on a chain for a given Unix timestamp.Stablecoins
GET
/stablecoin/{id} — One stablecoin's full metadata and per-chain circulating history (heavy: ~20 MB for majors).GET
/stablecoincharts/all — Total circulating supply of all stablecoins combined, daily (heavy: multi-MB).GET
/stablecoincharts/{chain} — Total circulating stablecoin supply on one chain, daily (heavy: multi-MB).TVL
GET
/protocols — All protocols with current TVL, chain breakdown and category (heavy: multi-MB payload).GET
/v2/historicalChainTvl — Historical daily TVL of all chains combined (documented all-chains variant).Yields