DefiLlama API: Get DeFi project
Gets 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.
Unofficial. Not affiliated with or endorsed by DefiLlama.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Project, required
project Project name, DefiLlama project link, or slug, for example Aave.
Lido
- History Period optional
history_period How much daily TVL history to include, for example last_30_days.
all_time
One of
last_30_days,last_year,all_time. Defaultlast_30_days.
Input as JSON
{ "project": "Lido", "history_period": "all_time"}Output
{ "chains": [ "Ethereum", "Solana", "Terra" ], "website": "https://lido.fi/" , "category": "Liquid Staking", "tvl_history": [ { "date": "2020-12-19", "tvl_usd": 1484680 }, { "date": "2020-12-20", "tvl_usd": 2697598 }, { "date": "2020-12-21", "tvl_usd": 3410253 } ], "project_name": "Lido", "token_symbol": "LDO", "tvl_by_chain": [ { "chain": "Ethereum", "tvl_usd": 26325024822.21351 }, { "chain": "Solana", "tvl_usd": 6083551.77746 }, { "chain": "Terra", "tvl_usd": 0 } ], "defillama_link": "https://defillama.com/protocol/lido" , "defillama_slug": "lido", "current_tvl_usd": 26331108373, "change_1d_percent": 0.2600612831057614, "change_7d_percent": -2.9147246775027003, "token_market_cap_usd": 362310450.207509}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"defillama.com/get_defi_project","input":{"project":"Lido","history_period":"all_time"}}' # 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/get_defi_project" , "input": { "project": "Lido", "history_period": "all_time" }})# 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/get_defi_project" , "input": { "project": "Lido", "history_period": "all_time" } }), 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/get_defi_project# with {"project":"Lido","history_period":"all_time"}"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", "required": [ "project" ], "properties": { "project": { "type": "string", "description": "Project name, DefiLlama project link, or slug, for example Aave." }, "history_period": { "enum": [ "last_30_days", "last_year", "all_time" ], "type": "string", "default": "last_30_days", "description": "How much daily TVL history to include, for example last_30_days." } }}Output schema
{ "type": "object", "required": [ "project_name", "category", "chains", "current_tvl_usd", "change_1d_percent", "change_7d_percent", "tvl_by_chain", "token_symbol", "token_market_cap_usd", "website", "defillama_link", "tvl_history", "defillama_slug" ], "properties": { "chains": { "type": "array", "items": { "type": "string" }, "description": "Chains with TVL, largest first." }, "website": { "type": [ "string", "null" ], "description": "Project website." }, "category": { "type": [ "string", "null" ], "description": "Project category." }, "tvl_history": { "type": "array", "items": { "type": "object", "required": [ "date", "tvl_usd" ], "properties": { "date": { "type": "string", "format": "date" }, "tvl_usd": { "type": "number" } }, "additionalProperties": false }, "description": "Daily total TVL in US dollars, oldest date first." }, "project_name": { "type": "string", "description": "Project name." }, "token_symbol": { "type": [ "string", "null" ], "description": "Project token symbol, or null if there is no token." }, "tvl_by_chain": { "type": "array", "items": { "type": "object", "required": [ "chain", "tvl_usd" ], "properties": { "chain": { "type": "string" }, "tvl_usd": { "type": "number" } }, "additionalProperties": false }, "description": "TVL by chain in US dollars, largest first; borrowed, pool2, and staking extras are excluded." }, "defillama_link": { "type": "string", "description": "Project page on DefiLlama." }, "defillama_slug": { "type": "string", "description": "Project slug on DefiLlama.", "x-fous-developer": true }, "current_tvl_usd": { "type": "number", "description": "Latest total value locked in US dollars." }, "change_1d_percent": { "type": [ "number", "null" ], "description": "Percentage change from the observation one day earlier, if available." }, "change_7d_percent": { "type": [ "number", "null" ], "description": "Percentage change from the observation seven days earlier, if available." }, "token_market_cap_usd": { "type": [ "number", "null" ], "description": "Token market capitalization in US dollars, or null if unavailable." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
defillama.com/get_defi_project- Returns
- project name, category, current TVL, 1d/7d change, TVL by chain, token symbol and market cap, website, daily TVL history
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/get_defi_project with the inputs above.
Ask your agent
- What's Uniswap's current TVL and how much has it moved over the last day and week?
- Pull up the DefiLlama page for Lido and give me its TVL broken down by chain, plus the token's market cap.
- I need the full all-time daily TVL history for Curve Finance so I can chart it.
- How is GMX's locked value split across Arbitrum and Avalanche right now, and what did its TVL look like over the past year?
- Check DefiLlama for Pendle: category, website, token symbol, and the last 30 days of TVL data.
See more
All DefiLlama methodsLists 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.
defillama.com/list_top_blockchainsFinds 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 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_stablecoinsGets an Amazon product's current listed price and lifetime price statistics from CamelCamelCamel (Amazon and third-party new), with dated Amazon low/high points and a comparison to the average. Takes a product name, an Amazon or CamelCamelCamel link, or an ASIN, for eight Amazon stores.
camelcamelcamel.com/get_price_historyGets a Product Hunt product profile by product name or Product Hunt link: tagline, description, website, topics, review rating, followers, the five most recent reviews, recent launches with day rank and upvotes, and alternatives.
producthunt.com/get_productLists CoinGecko crypto sectors by market cap with daily change, volume, leading coins and category pages, optionally filtered by name or link.
coingecko.com/list_crypto_categoriesGets a coin's daily prices and price change over the last 7, 30, 90 or 365 days, with UTC dates. Today's price may change.
coingecko.com/get_coin_price_historyGets a cryptocurrency's price, changes, supply, market cap, volume and all-time high in a chosen currency. If a name or symbol is shared, returns the coin with the largest market cap.
coinmarketcap.com/get_coin_price