# GET /defi/yields: $0.01 per call

Best DeFi yields for a token and chain, ranked by risk-adjusted APY (sustainable APY, discounted for risk): APY (base vs rewards), TVL, 30-day average, impermanent-loss risk, audits and past hacks of the protocol, with a 0-100 risk score and plain risk notes per pool. E.g. ?token=USDC&chain=base&minTvlUsd=1000000. Filters: project, stablecoinOnly, noImpermanentLoss, sort.

- **Price:** $0.01 in USDC, the same on Base, Solana, Polygon, Arbitrum. Failed calls are never charged.
- **Free trial:** yes, 20 free calls a day from Claude, Cursor or any MCP client ([set-up](/mcp/setup)).
- **Answers cached for:** 10 min
- **Data sources:** DefiLlama yields, protocols and hacks (free)
- **Lane:** Crypto & on-chain ([OpenAPI](/openapi/crypto.json))
- **Live health:** [status page](/status)

## Free sample

See an answer for the demo input first, free (no payment, 10 a minute): [https://aayatai.com/sample/defi-yields](/sample/defi-yields). It is a stored real answer when we have one, otherwise an example marked `"kind": "illustrative"`.

```bash
curl "https://aayatai.com/sample/defi-yields"
```

## 1. See the price (free)

Call it without paying: you get `402 Payment Required` and a `PAYMENT-REQUIRED` header with the exact price and where to pay.

```bash
curl -i "https://aayatai.com/defi/yields?token=USDC&chain=base&minTvlUsd=1000000&sort=risk-adjusted&limit=10"
```

## 2. Pay and call (TypeScript)

```bash
npm install @x402/fetch @x402/evm viem
```

```ts
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

// A wallet used only by your agent, holding a little USDC on Base.
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});

const res = await pay("https://aayatai.com/defi/yields?token=USDC&chain=base&minTvlUsd=1000000&sort=risk-adjusted&limit=10");
console.log(await res.json());
```

## 3. Or as an MCP tool

```ts
// MCP server: https://aayatai.com/mcp (Streamable HTTP). With the x402 MCP client (see /start):
const result = await client.callTool("defi-yields", {"token":"USDC","chain":"base","minTvlUsd":1000000,"sort":"risk-adjusted","limit":10});
```

## Inputs

- `token` (string): Token symbol in the pool, e.g. USDC, ETH, SOL (optional).
- `chain` (string; one of `all`, `base`, `solana`, `ethereum`, `bsc`, `arbitrum`, `polygon`, `optimism`, `avalanche`; default `all`): Blockchain: all, base, solana, ethereum, bsc, arbitrum, polygon, optimism, avalanche.
- `project` (string): DefiLlama project slug, e.g. aave-v3, morpho-blue (optional).
- `minTvlUsd` (number; default `1000000`): Minimum pool TVL in USD.
- `stablecoinOnly` (boolean; default `false`): Only stablecoin pools.
- `noImpermanentLoss` (boolean; default `false`): Only pools without impermanent-loss risk.
- `sort` (string; one of `risk-adjusted`, `apy`, `tvl`; default `risk-adjusted`): Ranking.
- `limit` (integer; default `10`): Pools to return.

Bad inputs are rejected with HTTP 400 before any payment is asked for.

## Example answer

```json
{
  "matched": 42,
  "pools": [
    {
      "pool": "7e0661bf-8cf3-45e6-9424-31916d4c7b84",
      "project": "aave-v3",
      "protocol": "Aave V3",
      "category": "Lending",
      "chain": "Base",
      "symbol": "USDC",
      "tvlUsd": 180000000,
      "apy": 4.8,
      "apyBase": 4.8,
      "apyReward": null,
      "apyMean30d": 5.1,
      "apyChange7d": -0.2,
      "stablecoin": true,
      "ilRisk": "no",
      "exposure": "single",
      "audits": 2,
      "lastHack": null,
      "risk": {
        "score": 0,
        "level": "low",
        "notes": []
      },
      "riskAdjustedApy": 4.8,
      "url": "https://defillama.com/yields/pool/7e0661bf-8cf3-45e6-9424-31916d4c7b84"
    }
  ],
  "filters": {
    "token": "USDC",
    "chain": "base",
    "minTvlUsd": 1000000
  },
  "source": "DefiLlama",
  "disclaimer": "",
  "checkedAt": "2026-09-28T12:00:00.000Z"
}
```

## Related

- [GET /token/price](/services/token-price) ($0.005): Live price of any token on Base, Solana, Ethereum, BNB, Arbitrum, Polygon, Optimism or Avalanche from DEX data: USD price, total liquidity, 24h volume, buys/sel
- [GET /token/safety](/services/token-safety) ($0.02): Rug-pull and scam check for any token on Base, Solana, Ethereum, BNB, Arbitrum, Polygon, Optimism or Avalanche.
- [GET /token/report/cached](/services/token-report-cached) ($0.05): Full token report, cached tier (answers up to 15 minutes old, half price): safety (honeypot, taxes, owner powers), holders (concentration, exchange/fund/locked 
- [GET /token/report](/services/token-report) ($0.10): Full token report, live: safety (honeypot, taxes, owner powers), holders (concentration, exchange/fund/locked share), liquidity (depth, locks, pools), price act
- [GET /token/report/deep](/services/token-report-deep) ($0.25): Deep token report: everything in /token/report (safety (honeypot, taxes, owner powers), holders (concentration, exchange/fund/locked share), liquidity (depth, l
- [GET /token/new](/services/token-new) ($0.01): New token launches with real liquidity: tokens whose first DEX pool opened in the last hour (up to 24h) with at least $10k liquidity (adjustable), newest first,
- [GET /token/whales](/services/token-whales) ($0.02): Whale and exchange flows for a token on Base, Ethereum, Arbitrum, Optimism or Polygon, from its latest ~250 transfers: large transfers, deposits/withdrawals per
- [GET /wallet](/services/wallet) ($0.01): Wallet profile on Base, Ethereum or Solana: native balance, token holdings with USD values (top 25), total portfolio value, whether it is a contract, ENS name, 

New here? [Getting started in 60 seconds](/start). All services: [Aayat AI](/).