DeFi Yield Search
DeFi yield screening for agents that allocate capital. One call searches the full DefiLlama yield universe (thousands of pools across every major chain, pre-filtered to TVL ≥ $50k so answers stay meaningful) with the filters that matter: chain (base, ethereum, arbitrum...), project (aave, morpho, aerodrome...), token symbol (USDC, ETH...), stablecoins_only for the risk-averse, and min_tvl_usd (default $100k) to skip ghost pools. Results rank by APY and carry the decomposition an allocator needs: total APY, base vs reward split (reward-heavy APY = emissions that can vanish), TVL and impermanent-loss risk flag. The pool set is cached server-side and refreshed every 15 minutes, so queries are fast. Includes the honest disclaimer: high APY usually means high risk, figures change constantly, not financial advice. Pairs with stablecoin-stats (peg check before entering a stable pool) and protocol-tvl (how big is the protocol behind the pool).
Call with x402
1. Send the request. 2. Receive 402 with accepts[]. 3. Sign the payment and retry with the X-PAYMENT header.
curl -X POST https://agentbit.app/v1/defi/yields \
-H 'Content-Type: application/json' \
-d '{"chain":"base","symbol":"USDC","stablecoins_only":true,"limit":5}'
Input schema
{
"type": "object",
"properties": {
"chain": {
"type": "string",
"description": "Filter by chain, e.g. base, ethereum, arbitrum"
},
"project": {
"type": "string",
"description": "Filter by protocol, e.g. aave-v3, morpho"
},
"symbol": {
"type": "string",
"description": "Filter by token symbol substring, e.g. USDC"
},
"stablecoins_only": {
"type": "boolean",
"description": "Only stablecoin pools"
},
"min_tvl_usd": {
"type": "number",
"description": "Minimum pool TVL (default 100000)"
},
"limit": {
"type": "integer",
"description": "Max pools returned (1-50, default 15)"
}
}
}Output schema
{
"type": "object",
"properties": {
"result_count": {
"type": "integer"
},
"pools": {
"type": "array",
"items": {
"type": "object",
"properties": {
"pool_id": {
"type": "string"
},
"chain": {
"type": "string"
},
"project": {
"type": "string"
},
"symbol": {
"type": "string"
},
"tvl_usd": {
"type": "number"
},
"apy": {
"type": "number"
},
"apy_base": {
"type": [
"number",
"null"
]
},
"apy_reward": {
"type": [
"number",
"null"
]
},
"stablecoin": {
"type": "boolean"
},
"il_risk": {
"type": [
"string",
"null"
]
}
}
}
},
"universe_size": {
"type": "integer"
},
"disclaimer": {
"type": "string"
}
}
}Code examples
// JavaScript (x402-fetch)
import { wrapFetchWithPayment } from "x402-fetch";
const fetchWithPay = wrapFetchWithPayment(fetch, wallet);
const r = await fetchWithPay("https://agentbit.app/v1/defi/yields", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"chain":"base","symbol":"USDC","stablecoins_only":true,"limit":5})
});
console.log(await r.json());
# Python (x402 client)
from x402.clients.requests import x402_requests
s = x402_requests(account)
r = s.post("https://agentbit.app/v1/defi/yields",
json={"chain":"base","symbol":"USDC","stablecoins_only":true,"limit":5})
print(r.json())
// PHP
$r = Http::withHeaders(['X-PAYMENT' => $signedPayment])
->post('https://agentbit.app/v1/defi/yields',
array (
'chain' => 'base',
'symbol' => 'USDC',
'stablecoins_only' => true,
'limit' => 5,
));
$data = $r->json();