Documentation Blog Free tools [email protected]Log in

DeFiLlama API

DeFiLlama publishes total value locked for every chain it tracks, but its free surface answers exactly one question — how much value sits on each blockchain right now — while history and the protocol breakdown sit behind a paid Pro key. This endpoint reads that free chains surface and returns one row per blockchain: current TVL in USD, the native token symbol and the CoinGecko and CoinMarketCap ids you need to join it against price feeds.

$0.0003 per delivered chain · $2 free every month · Failed runs never billed

POST /v1/scraper/collectors/defillama/run
$ curl $QD/defillama/run \
    -H "Authorization: Bearer $QD_API_KEY" \
    -d '{"max_results": 50}'
{ "status": "done", "count": 50,
  "results": [
    {
      "chain": "…",
      "tvl": …,
      "token_symbol": "…",
      "chain_id": … } ],
  "cost": 0.015 }
# 50 chains × $0.0003 · nothing delivered, nothing charged
$0.0003 / chain6,666 chains on the free $2 every month
Semantic inputchains, max_results — no URL lists
Up to 200chains per run, pagination handled for you
No browserread over HTTP/TLS — cheaper and faster than rendering

What a DeFiLlama API does

The chains endpoint is a ranking: every blockchain DeFiLlama covers, sorted by the dollar value locked in its DeFi protocols, or filtered to just the chains you name. Each row is already numeric — TVL as an integer, not a formatted string — and carries the gecko_id and cmc_id, the keys that let you put TVL next to a token's price without a fuzzy name match.

What this deliberately does not do is history or per-protocol detail: DeFiLlama gates the time series and the full protocol list behind Pro, so a page promising "TVL over time" from the free surface would be promising data that is not there. This returns the current, keyless snapshot honestly — the cross-chain league table — which is the part most datasets actually need as a daily column.

What one chain looks like

Every delivered chain carries these fields. Nullable means the source did not publish it — the field stays empty instead of being guessed.

FieldTypeWhat it holds
rankintegerTVL rank.
chainstringBlockchain name.
tvlintegerTotal value locked, USD.
token_symbolstring · nullableNative token symbol.
chain_idinteger · nullableEVM chain id when applicable.
gecko_idstring · nullableCoinGecko id (join key).
cmc_idstring · nullableCoinMarketCap id.

Inputs

The whole request. Anything you leave out falls back to the default shown in the catalog.

InputTypeRequiredWhat it does
chainsarraynoFilter to specific chains (Ethereum, Solana…). Empty = all, ranked by TVL.
max_resultsintegernoHow many chains to deliver at most (1–200). You pay only for delivered chains.

Pricing

DeFiLlama API pricing

$0.0003 per delivered chain. A run that delivers nothing costs nothing: blocked pages, challenges and retries are on us, and the $2 monthly allowance covers about 6,666 chains before you spend anything.

$0.0003per delivered chain$0.3 per 1,000 delivered chains
6,666 chainson the free allowance$2 every month, no card
Zero rowszero chargeblocks, captchas and retries are on us
−30%on volume tiersthe catalog returns your key's price

Pay as you go

$0/mo
  • $2 free credit / month
  • 60 requests / min
  • List unit prices

Starter

$19/mo
  • $15 free credit / month
  • 300 requests / min
  • 10% off unit prices

Scale

$299/mo
  • $250 free credit / month
  • 1,200 requests / min
  • 30% off unit prices

Same wallet, same key and same $2 monthly allowance as every other Data API. Prices are launch pricing read live from the billing config — GET /v1/scraper/collectors returns the price your key actually pays.

Integration

One POST, typed rows

Base URL https://api.quanticdata.io/v1, Bearer auth, the same key as every other Data API. Endpoint: POST /v1/scraper/collectors/defillama/run.

curl -X POST https://api.quanticdata.io/v1/scraper/collectors/defillama/run \
  -H "Authorization: Bearer $QD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"max_results":50}'

What people build with the DeFiLlama API

Three shapes of work this endpoint was designed around.

Cross-chain dashboards

Pull every chain ranked by TVL once a day and you have the table that shows where liquidity is concentrating, as rows rather than a scraped leaderboard.

Price-joined crypto datasets

The gecko_id on each row joins TVL straight onto CoinGecko price data, so value locked and token price live in the same table.

Chain watchlists

Name the chains you model — Ethereum, Solana, Arbitrum — and track just their TVL, skipping the long tail you do not care about.

DeFiLlama API versus rolling your own

The differences that actually cost time when you build this in-house.

DIY scraperThis collector
ScopeHistory and protocols need ProThe free chains surface, returned honestly
TVL valueA formatted string to parseAn integer in USD, ready to sum
Price joinMatch token names by handgecko_id and cmc_id on every row

FAQ

Questions we get about the DeFiLlama API.

Something else? Ask us →

Does this return TVL history or just the current value?

Current value only. DeFiLlama keeps historical time series behind its paid Pro key, so this reads the free chains endpoint and returns the TVL as it stands now, one row per chain. For a trend you sample it on a schedule and keep the snapshots yourself.

Can I get per-protocol TVL, like a single DEX?

No — the free surface is per chain, not per protocol. This returns the value locked across each blockchain; the protocol-level breakdown is part of what DeFiLlama gates behind Pro, so it is honestly out of scope here rather than half-delivered.

Do I need a DeFiLlama Pro API key?

No. The chains surface this reads is keyless, which is the whole point — you get the cross-chain TVL table without holding a Pro key or its rate budget.

How do I line TVL up with token prices?

Use the join keys on each row: gecko_id maps to CoinGecko and cmc_id to CoinMarketCap, so you attach price data by id instead of by matching chain names.

Is there a free DeFiLlama API?

Every account gets $2 of credit every month with no card, which is about 6,666 delivered chains on this endpoint at $0.0003 each. It renews monthly, and a run that delivers nothing is never billed — so a failed or blocked attempt does not eat the allowance.

How much does one run cost?

Multiply the rows you actually receive by $0.0003. A run capped at 200 chains — the maximum for this collector — costs $0.06 if every row comes back, and less when the source has fewer. Volume tiers take up to 30% off, and GET /v1/scraper/collectors returns the price your key actually pays.

Run the DeFiLlama API now

$2 of free credit every month, no card. Your key returns its own prices from GET /v1/scraper/collectors.

Get my free API key
Get my free API key