DeFi yield screener
POST /api/defi-yieldsScreen DeFi yield pools (lending, LP, staking, vaults) across every chain from DefiLlama's free Yields dataset: filter by chain, project, token symbol, stablecoin-only, minimum TVL and minimum/maximum APY; sort by apy or tvl; limit up to 100. Send POST /api/defi-yields with no required fields (11 optional) and pay $0.002 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, fetchedAt, cached, filters, sort and 3 more.
Each row carries pool id, project, chain, symbol, TVL, total/base/reward APY, 1d/7d/30d APY change, 30d mean APY, IL risk, exposure (single/multi), reward tokens and DefiLlama's outlier flag. The ~11MB upstream document is fetched once per 5 minutes and served from an in-process cache, so answers are bounded and fast. Keyless public data.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
chain | string | no | Chain name as DefiLlama uses it (Ethereum, Base, Arbitrum, Solana, BSC, Optimism...). Case-insensitive, common aliases accepted. Omit for all chains. |
project | string | no | Project slug substring (aave-v3, uniswap-v3, morpho, pendle, curve-dex...). Case-insensitive. |
symbol | string | no | Token symbol filter, e.g. USDC or WETH-USDC; matches any leg of the pool symbol (case-insensitive). |
stablecoinOnly | boolean | no | true = only stablecoin pools. |
minTvlUsd | number | no | Minimum pool TVL in USD (default 10000; pass 0 for no floor). |
minApy | number | no | Minimum total APY in percent. |
maxApy | number | no | Maximum total APY in percent (drops headline outliers). |
exposure | string | no | "single" or "multi" asset exposure. |
excludeOutliers | boolean | no | Drop pools DefiLlama flags as APY outliers (default true). |
sort | string | no | "tvl" (default) or "apy", descending. |
limit | number | no | Rows to return (default 20, max 100). |
Example request
curl -i -X POST https://agent402.tools/api/defi-yields \
-H "Content-Type: application/json" \
-d '{"chain":"Base","stablecoinOnly":true,"minTvlUsd":1000000,"sort":"apy","limit":5}'
Without payment this returns HTTP 402 Payment Required with the exact price for defi-yields; any x402 v2 or MPP client pays it and retries.
Example response
{
"source": "defillama-yields",
"fetchedAt": "2026-08-22T12:00:00.000Z",
"cached": true,
"filters": {
"chain": "Base",
"project": null,
"symbol": null,
"stablecoinOnly": true,
"minTvlUsd": 1000000,
"minApy": null,
"maxApy": null,
"exposure": null,
"excludeOutliers": true
},
"sort": "apy",
"matched": 42,
"count": 1,
"pools": [
{
"pool": "54e9b138-3146-4c1f-8dce-1cb948f5ef96",
"chain": "Base",
"project": "morpho-v1",
"symbol": "USDC",
"tvlUsd": 25000000,
"apy": 6.1,
"apyBase": 4.9,
"apyReward": 1.2,
"apyPct1D": -0.04,
"apyPct7D": 0.5,
"apyPct30D": -0.05,
"apyMean30d": 5.8,
"stablecoin": true,
"ilRisk": "no",
"exposure": "single",
"poolMeta": null,
"rewardTokens": [],
"underlyingTokens": [
"0x8335..."
],
"volumeUsd1d": null,
"volumeUsd7d": null,
"outlier": false,
"prediction": {
"class": "Stable/Up",
"probability": 67
}
}
]
}
| Field | Type | Always present | In the example |
|---|---|---|---|
source | string | yes | defillama-yields |
fetchedAt | string | yes | 2026-08-22T12:00:00.000Z |
cached | boolean | yes | true |
filters | object | yes | 9 fields: chain, project, symbol, stablecoinOnly, minTvlUsd, minApy |
sort | string | yes | apy |
matched | number | yes | 42 |
count | number | yes | 1 |
pools | array of objects | yes | 1 item in the example |
From an MCP client
catalog.call {
"slug": "defi-yields",
"params": {
"chain": "Base",
"stablecoinOnly": true,
"minTvlUsd": 1000000,
"sort": "apy",
"limit": 5
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for defi-yields; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
- Every field is optional. An input the tool rejects returns an HTTP 4xx whose body carries
error,tool,expected,requiredandexample. - A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
GETorHEADto /api/defi-yields returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/defi-yields", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"chain": "Base",
"stablecoinOnly": true,
"minTvlUsd": 1000000,
"sort": "apy",
"limit": 5
}),
});
Related tools
DeFi yield pool history
POST /api/defi-yield-historyDaily APY and TVL history for one DeFi yield pool (DefiLlama pool id from defi-yields): per-day total/base/reward APY an…
Top DEX pools by TVL
POST /api/dex-top-poolsTop DEX pools (Uniswap, Sushi, Curve, Aerodrome, etc.) ranked by current TVL - filterable by chain and project. Sourced …
DeFi chain TVL history
POST /api/defi-chain-tvl-historyDaily TVL history for one chain (Ethereum, Base, Solana, Arbitrum...) or for all of DeFi (chain "all") from DefiLlama's …
DeFi TVL by chain
POST /api/defi-chainsBlockchains ranked by DeFi TVL from DefiLlama's free chain list: name, TVL in USD, share of total DeFi TVL, native token…
DeFi protocol profile
POST /api/defi-protocolProfile of one DeFi protocol by DefiLlama slug (aave-v3, uniswap-v3, lido, morpho-v1...): TVL rank among all protocols, …
DeFi protocols ranked by TVL
POST /api/defi-protocolsDeFi protocols ranked by current TVL from DefiLlama's free protocol list: filter by category (Lending, Dexs, Liquid Stak…