DefiLlama API: List top blockchains by TVL
Lists blockchains ranked by the total value locked in their DeFi apps on DefiLlama, with one-day and seven-day TVL changes, DeFi project counts and chain token symbols.
Unofficial. Not affiliated with or endorsed by DefiLlama.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Max Results optional
max_results Maximum number of top blockchains to return, for example 20.
200
Whole number from 1 to 200. Default
20.
Input as JSON
{ "max_results": 200}Output
{ "blockchains": [ { "rank": 1, "tvl_usd": 53108335050, "page_url": "https://defillama.com/chain/ethereum" , "chain_name": "Ethereum", "defi_projects": 2032, "change_1d_percent": -0.1698818443182991, "change_7d_percent": -2.6204888468664813, "native_token_symbol": "ETH" }, { "rank": 2, "tvl_usd": 6421423324, "page_url": "https://defillama.com/chain/solana" , "chain_name": "Solana", "defi_projects": 643, "change_1d_percent": -3.197296255971719, "change_7d_percent": -0.43208119414242924, "native_token_symbol": "SOL" }, { "rank": 3, "tvl_usd": 6219474904, "page_url": "https://defillama.com/chain/base" , "chain_name": "Base", "defi_projects": 1125, "change_1d_percent": -0.7163654151087694, "change_7d_percent": -3.5663736335965126, "native_token_symbol": null } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"defillama.com/list_top_blockchains","input":{"max_results":200}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "defillama.com/list_top_blockchains" , "input": { "max_results": 200 }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "defillama.com/list_top_blockchains" , "input": { "max_results": 200 } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run defillama.com/list_top_blockchains# with {"max_results":200}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "properties": { "max_results": { "type": "integer", "default": 20, "maximum": 200, "minimum": 1, "description": "Maximum number of top blockchains to return, for example 20." } }}Output schema
{ "type": "object", "required": [ "blockchains" ], "properties": { "blockchains": { "type": "array", "items": { "type": "object", "required": [ "rank", "chain_name", "tvl_usd", "change_1d_percent", "change_7d_percent", "defi_projects", "native_token_symbol", "page_url" ], "properties": { "rank": { "type": "integer", "description": "Position in the TVL ranking, starting at 1." }, "tvl_usd": { "type": "number", "description": "Total value locked in US dollars." }, "page_url": { "type": "string", "description": "Chain details page." }, "chain_name": { "type": "string", "description": "Blockchain name." }, "defi_projects": { "type": "integer", "description": "Number of DeFi projects." }, "change_1d_percent": { "type": [ "number", "null" ], "description": "Reported one-day TVL percentage change, or null if unavailable." }, "change_7d_percent": { "type": [ "number", "null" ], "description": "Reported seven-day TVL percentage change, or null if unavailable." }, "native_token_symbol": { "type": [ "string", "null" ], "description": "Chain token symbol, or null when none is listed." } }, "additionalProperties": false }, "minItems": 1 } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
defillama.com/list_top_blockchains- Returns
- rank, chain name, TVL in USD, 1d and 7d change, DeFi project count, token symbol, chain page URL
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method defillama.com/list_top_blockchains with the inputs above.
Ask your agent
- Which blockchains have the most total value locked in DeFi right now? Give me the top 10.
- Pull the top 50 chains ranked by TVL from DefiLlama, including their 1-day and 7-day changes.
- I need a ranking of L1s and L2s by DeFi TVL with the number of protocols on each and their native token tickers.
- Show me DefiLlama's chain leaderboard by locked value: the top 25 networks.
- How has TVL moved over the past week across the biggest DeFi chains? List the top 100 with weekly percentage change.
See more
All DefiLlama methodsGets a DeFi project's current TVL, 1-day and 7-day changes, chain breakdown, token information and daily TVL history from DefiLlama. Parent projects combine their listed versions.
defillama.com/get_defi_projectLists DefiLlama stablecoins ranked by circulating supply in US dollars. Each coin comes with its peg, price, weekly supply change and chain count. You can filter by peg.
defillama.com/list_stablecoinsFinds the highest-APY DeFi pools on DefiLlama for a token symbol or name, optionally filtered by chain and minimum pool size.
defillama.com/list_best_yieldsLists Twitch games and categories ranked by current live viewers, with content tags, box art and category links.
twitch.tv/list_top_categoriesLists MyAnimeList's top anime in rank order for a selected ranking (all, airing, upcoming, TV, movies or most popular), with English title, score, type, episodes, airing dates and members.
myanimelist.net/list_top_animeLists the most-watched live Twitch streams, optionally within a category and language. All-category results are limited to 30 streams; category results allow up to 100.
twitch.tv/list_top_streamsLists the largest cryptocurrencies on CoinMarketCap ranked by market cap. Each coin comes with its price, changes, volume and supply in the chosen currency.
coinmarketcap.com/list_top_coinsLists the current Bilibili ranking overall or in a selected category, in rank order. The Movies ranking does not provide uploader, likes, length or BV numbers.
bilibili.com/list_popular_videos