DefiLlama

Client-executable: 67

DeFi analytics: protocol and chain TVL, token prices, stablecoins, yield pools, DEX and derivatives volumes, options, hacks, fees and revenue.

Get a free key

Independent service, not affiliated with DefiLlama. DefiLlama is a trademark of its owner.

What you can get

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/v2/metrics/aggregators — DEX aggregator volume metrics snapshot across protocols and chains.
GET/overview/aggregators — Aggregate DEX aggregator volume overview across all protocols and chains.
GET/overview/aggregators/{chain} — DEX aggregator volume overview scoped to a single chain.
GET/summary/aggregators/{protocol} — One DEX aggregator's volume breakdown and historical series.
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 — Aggregate bridge aggregator volume overview across all chains.
GET/overview/bridge-aggregators/{chain} — Bridge aggregator volume overview scoped to a single chain.
GET/summary/bridge-aggregators/{protocol} — One bridge aggregator's volume summary and history.
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]…]).
GET/v2/chart/{adapterType}/chain/{chain} — One chain's 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/overview/open-interest — Aggregate perpetuals open interest across protocols and chains.
GET/overview/open-interest/{chain} — Perpetuals open interest scoped to a single chain.
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/charts/{name} — One chain's lightweight per-series charts.
GET/cexs — Tracked centralized exchanges with inflow options metadata and CoinGecko volume lists.
GET/lite/v2/protocols — Lightweight v2 array of all protocols with current TVL, category, and chainTvls.
Options
GET/v2/metrics/options — Options volume and premiums metrics snapshot across protocols and chains.
GET/overview/options/{chain} — Options DEX volume and premiums overview scoped to a single chain.
GET/summary/options/{protocol} — One options protocol's volume, premiums, and history.
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/chain-breakdown — Oracle coverage per chain over time (heavy: multi-MB).
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/overview/fees — Aggregate fee and revenue history across all protocols (heavy: ~6 MB).
GET/overview/options — Aggregate options volume and premiums history (heavy payload).
GET/summary/dexs/{protocol} — One protocol's DEX volume, fees and revenue history (heavy: ~1.5 MB).
GET/summary/fees/{protocol} — One protocol's fees and revenue history (heavy: ~1.3 MB).
GET/v2/metrics/dexs — DEX volume metrics snapshot across protocols and chains (heavy).
GET/v2/metrics/fees — Protocol fees and revenue metrics snapshot across protocols and chains (heavy).
GET/overview/dexs/{chain} — DEX volume overview scoped to a single chain.
GET/overview/fees/{chain} — Protocol fees and revenue overview scoped to a single chain.
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/prices/first/{coins} — Earliest known price (and timestamp) for one or more coins.
GET/coins/chains — Chain identifiers accepted in coin keys ({chain}:{address}).
GET/coins/chart/{coins} — Price-history chart for one or more coin keys.
GET/coins/batchHistorical — Batch historical prices for several coins at several timestamps in one call.
GET/coins/percentage/{coins} — Normalized (percentage) prices across the requested coins.
GET/coins/block/{chain}/{timestamp} — Closest block height and timestamp on a chain for a given Unix timestamp.
Stablecoins
GET/stablecoins — All stablecoins with circulating supply per chain (heavy payload).
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).
GET/stablecoinchains — Per-chain circulating stablecoin totals (lightweight).
GET/stablecoinprices — Historical USD prices of all tracked stablecoins (heavy).
TVL
GET/protocols — All protocols with current TVL, chain breakdown and category (heavy: multi-MB payload).
GET/protocol/{name} — One protocol's full TVL history, token and chain breakdown (heavy payload).
GET/v2/chains — All chains with current TVL, token and stablecoin split.
GET/v2/historicalChainTvl/{chain} — Historical TVL of one chain, daily granularity since inception.
GET/v2/historicalChainTvl — Historical daily TVL of all chains combined (documented all-chains variant).
GET/tvl/{name} — Current TVL of one protocol as a bare number.
Yields
GET/yields/pools — All tracked yield pools with current APY, TVL, volume and risk fields.
GET/yields/chart/{pool} — APY/TVL history of one yield pool (pool id from /yields/pools).