DeFiLlama API

The DeFiLlama API reads the total value locked of every blockchain DeFiLlama tracks and returns it as one row per chain. Each row is the chain name, its current TVL in US dollars, the native token symbol, and — the part that makes it useful downstream — the CoinGecko and CoinMarketCap ids you join against to attach a price.

It reads DeFiLlama's free public chains surface, ranked by TVL, or filtered to just the chains you name. This is deliberately the chain-level view: DeFiLlama keeps historical series and the full protocol-by-protocol breakdown behind a paid Pro key, and this does not pretend to reach them. Every call is a keyless HTTP fetch carried over our TLS tier through a residential exit, so polling it on a schedule never leans on your own IP. For the traditional-finance side of the same dashboard, the SEC EDGAR API sits beside it.

$0.0003 per delivered chain, up to 200 chains per run. Nothing delivered means nothing charged.

How the DeFiLlama API works

This is the simplest collector we run: one request to DeFiLlama's /v2/chains endpoint, parsed into a sorted table. There is no browser, no key and no pagination to manage.

Every run returns inline — there is no queue for this one — so it slots cleanly into a cron job or a dashboard refresh.

Inputs

Both inputs are optional: chains filters to a named list (leave it empty for all chains ranked by TVL), and max_results caps the run at up to 200 chains.

What one chain looks like

Each chain is one row: rank by TVL, chain, tvl in US dollars, the token_symbol, the EVM chain_id where one applies, and the gecko_id and cmc_id join keys.

What the DeFiLlama API costs

$0.0003 per delivered chain ($0.30 per 1,000). Nothing delivered means nothing charged, and the $2 monthly free credit covers roughly 6,666 chains here. Volume tiers take up to 30% off.

$0.0003 per delivered chain — 30 cents per 1,000 rows. Because the whole tracked universe is a couple of hundred chains, a full snapshot is a fraction of a cent; the cost only becomes real if you store a snapshot every few minutes for a long time, and even then it is rounding error.

There is no subscription and no DeFiLlama Pro key involved, and a chain name that does not resolve is simply not returned or billed.

vs the DeFiLlama Pro API

DeFiLlama's own free endpoints are generous, and if you only ever need a live TVL number you can call /v2/chains yourself. Their paid Pro API is where history, per-protocol TVL, yields and higher rate limits live — a different product for a different job.

This collector sits on the free chain surface and does one thing well: hand you every chain's current TVL as clean, join-ready rows under one bill and one API key shared with every other collector you use. It is not a route around Pro — if you need historical series or protocol-level data, Pro is the correct tool and we say so plainly.

vs fetching the endpoint yourself

Fetching one public JSON endpoint is genuinely a one-liner, so the honest pitch here is narrow. What you get by routing it through us is uniformity: the same typed-row shape, the same failed-rows-never-billed accounting and the same key as the twenty other sources in your pipeline, plus a residential exit under the request so a tight polling loop is not your own address knocking repeatedly.

If DeFiLlama is the only source you touch, calling it directly is fine. The value shows up once it is one reader among many. The residential proxies that carry it are available on their own, too.

What people build with it

Rank chains by capital

Pull the full list ranked by TVL for a leaderboard or a market-overview panel, refreshed as often as your dashboard repaints.

Join TVL to price

Use gecko_id or cmc_id to attach a live token price to each chain's TVL from your own market-data feed, without matching on chain names by hand.

Watch a shortlist

Filter to the handful of chains you actually deploy on and store their TVL over time to see capital rotate between them.

Limits and honesty

This is chain-level TVL and nothing more. There is no historical series here, no per-protocol split and no yield data — DeFiLlama gates those behind Pro, and this collector reads only the free chains endpoint. The 200-row cap comfortably covers the entire tracked set, so it is a safety belt rather than a real constraint.

TVL figures are DeFiLlama's own estimates and inherit their methodology and revisions; treat them as the source's view, not an audited ledger. Nothing here is financial advice.

FAQ

Is the DeFiLlama API free?

DeFiLlama's chains endpoint is free and keyless, and here it falls under the $2-a-month free allowance — roughly 6,600 chain rows at $0.0003 each — before pay-as-you-go kicks in with no subscription.

Do I need a DeFiLlama Pro API key?

No. This reads the free public chains surface, so there is no Pro key and no DeFiLlama account — you authenticate only with your QuantumProxies key. If you need history or per-protocol data, that genuinely does require DeFiLlama Pro, which this collector does not cover.

How much does it cost?

$0.0003 per delivered chain, 30 cents per 1,000, with no monthly fee. A full snapshot of every tracked chain costs a fraction of a cent, and GET /v1/scraper/collectors reports the price your key pays.

Can I get historical TVL or per-protocol data?

Not from this collector. It returns each chain's current TVL only. Historical time series and protocol-level breakdowns are Pro-gated on DeFiLlama's side, and we do not claim to deliver them here.

Related scrapers