Tools · finance
Best DeFi yields by chain and token (DefiLlama)
Where a token earns the most: DefiLlama's yield pools filtered by chain (default Base), token symbol (USDC, ETH…), stablecoin-only and minimum TVL (default $1M), sorted by APY or TVL - with base vs reward APY, the 30-day mean, IL risk and a link per pool. Outliers are excluded unless asked. Pay-per-call via x402.
$0.001 per call, paid in USDC on Base or Solana with x402 — no account, no API key. POST https://fiatdock.com/v1/defi/yields (or GET with the same fields as query parameters) · MCP tool defi_yields. An answer the tool cannot produce is refused with 4xx/5xx and is not charged.
Inputs
| Field | Type | Description | Example |
|---|---|---|---|
chain | string | Chain as DefiLlama names it (Base, Ethereum, Arbitrum, Optimism, Polygon, Solana, …), default Base; "all" for every chain | "Base" |
symbol | string | Only pools holding this token symbol (e.g. USDC, ETH, cbBTC) | "USDC" |
stablecoinOnly | boolean | Only pools DefiLlama classifies as stablecoin pools (default false) | false |
minTvlUsd | number | Minimum pool TVL in USD (default 1,000,000) | 1000000 |
sort | one of apy, tvl | Order: apy (highest first, default) or tvl | "apy" |
includeOutliers | boolean | Include pools DefiLlama flags as statistical outliers (default false) | false |
limit | integer | How many pools, 1-50, default 10 | 10 |
Example
Request body
{"chain":"Base","symbol":"USDC"}
Answer (the published example)
{"query":{"chain":"Base","symbol":"USDC","stablecoinOnly":false,"minTvlUsd":1000000,"sort":"apy","includeOutliers":false},"matched":1,"count":1,"pools":[{"project":"morpho-blue","chain":"Base","symbol":"USDC","poolMeta":null,"tvlUsd":120000000,"apyPct":6.12,"apyBasePct":5.4,"apyRewardPct":0.72,"apyMean30dPct":5.9,"apyChange7dPct":0.3,"stablecoin":true,"ilRisk":"no","exposure":"single","outlier":false,"poolId":"0000-pool-id","url":"https://defillama.com/yields/pool/0000-pool-id"}],"source":"DefiLlama yields API (yields.llama.fi)","asOf":"2026-10-05T00:00:00.000Z","note":"apyPct = apyBasePct + apyRewardPct. Data, not financial advice."}
Call it
curl
# 1) ask: an unpaid call answers 402 with the exact price (free)
curl -i -X POST https://fiatdock.com/v1/defi/yields -H 'content-type: application/json' -d '{"chain":"Base","symbol":"USDC"}'
# 2) pay: any x402 client signs that 402 and resends — see Node or Python below
Node
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const pay = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:*", client: new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_PRIVATE_KEY)) }],
});
const r = await pay("https://fiatdock.com/v1/defi/yields", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"chain":"Base","symbol":"USDC"}),
});
console.log(r.status, await r.json());
Python
# pip install "x402[httpx,evm]"
import asyncio, json, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm.exact import register_exact_evm_client
async def main():
client = register_exact_evm_client(x402Client(), Account.from_key(os.environ["AGENT_PRIVATE_KEY"]))
async with x402HttpxClient(client) as http:
r = await http.post("https://fiatdock.com/v1/defi/yields", json=json.loads("{\"chain\":\"Base\",\"symbol\":\"USDC\"}"))
print(r.status_code, r.json())
asyncio.run(main())
MCP (Claude, Cursor, any MCP client)
{"mcpServers":{"fiatdock":{"command":"npx","args":["-y","fiatdock-mcp"],"env":{"AGENT_PRIVATE_KEY":"0x<your agent wallet key>"}}}}
// then call the tool "defi_yields" — the package pays each call from that wallet
The wallet needs USDC on Base. Prefer no install? The remote server https://fiatdock.com/mcp answers the 402 as tool output for an agent that signs its own payments.
Related tools
- Token safety check — $0.0045
- Token report (price + safety) — $0.0045
- Stablecoin supply and peg — $0.002
- Perp market + funding (Hyperliquid, Binance, Bybit) — $0.001
- Prediction markets (Polymarket) — $0.0045
- FX rates + conversion (live, with the ECB rate beside it) — $0.001
Machine-readable: OpenAPI · tools.json · llms.txt · /.well-known/x402