DefiLlama yield pools
Yield pools across DeFi: chain, project, symbol, TVL, APY split into base and reward, 7-day base APY, 30-day mean, 1/7/30-day APY change, volume, stablecoin and impermanent-loss flags, exposure, outlier flag, DefiLlama's APY trend prediction, reward and underlying tokens. Filter and sort with every field the yields page offers. Pass next_page back as page. Also filter by impermanent-loss risk, outlier flag, pool label (pool_meta) and maximum TVL or APY. With pool, returns that one pool (item) and its daily history (date, TVL, APY, base and reward APY, 7-day base APY, 7-day impermanent loss).
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
chain | string | Only pools on this chain. Example: Ethereum |
project | string | Only this project slug (aave-v3, lido, curve-dex ...). |
symbol | string | Only pools holding this token symbol. Example: USDC |
stablecoin | true | false | true for stablecoin pools only, false for the rest. Example: true |
exposure | single | multi | single or multi. |
min_tvl | number | Minimum TVL in USD. Example: 1000000 |
min_apy | number | Minimum APY in percent. |
sort | tvl | apy | apy_base | apy_reward | apy_mean_30d | apy_change_7d | volume_1d | tvl (default), apy, apy_base, apy_reward, apy_mean_30d, apy_change_7d or volume_1d. Example: tvl |
order | asc | desc | asc or desc (default desc). Example: desc |
limit | integer | Results per page, 1-500 (default 50). Example: 50 |
page | integer | Page number, starting at 1. Example: 1 |
il_risk | yes | no | yes or no: only pools with (or without) impermanent-loss risk. |
outlier | true | false | true or false: only pools flagged (or not flagged) as APY outliers. |
pool_meta | string | Only pools whose label contains this text (e.g. a lock period or a fee tier). |
max_tvl | number | Maximum TVL in USD. |
max_apy | number | Maximum APY in percent. |
pool | string | One pool id (the pool of a result, e.g. 747c1d2a-c668-4682-b9f9-296708a3dd90): return that pool with its daily APY and TVL history instead of the list. |
days | integer | With pool: days of history (default 365; 0 for all). |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/defillama/v1/yields?chain=Ethereum" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/defillama/v1/yields",
params={"chain": "Ethereum"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/defillama/v1/yields");
url.searchParams.set("chain", "Ethereum");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).