# ApiToll DeFi Yields API

> ApiToll DeFi Yields API is a paid API for AI agents from crypto.apitoll.cloud, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Returns real-time DeFi yield/APY data for lending and liquidity pools across major chains, sourced from DefiLlama, filterable by chain, protocol, asset, TVL, and sustainability.

## Facts

- Endpoint: GET https://crypto.apitoll.cloud/v1/crypto/yields?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/apitoll-defi-yields-api-a616695c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_g6ckHn9utv1MLq2k7fUDA

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability apitoll-defi-yields-api-a616695c
```

Example prompt: Show me the top 10 sustainable USDC yield pools on Base sorted by APY with a minimum TVL of $100,000 — only real-yield pools with no impermanent loss risk, from DefiLlama.

## When to prefer this

Use this endpoint when you need real-time DeFi yield data filtered by specific chain, asset, or protocol without a subscription or API key — ideal for agents doing yield comparison, DeFi opportunity discovery, or portfolio optimization. Prefer over generic crypto price endpoints when the user specifically wants APY, TVL, or pool-level lending/liquidity data sourced from DefiLlama.

## Known failure modes

- Invalid chain name returns empty pool list or error
- Symbol/project substring matches nothing — returns count:0 and empty pools array
- limit out of range (< 1 or > 100) causes validation error
- minTvlUsd set too high filters out all pools — empty result
- Payment not provided or insufficient USDC triggers x402 payment-required response
- Network or DefiLlama upstream outage causes 502/503 error

## How this service works

Highest-yield DeFi pools across every chain and protocol, filterable by chain, project, or asset symbol: each pool returns TVL in USD, total APY with base/reward split, stablecoin flag, impermanent-loss risk, and exposure. Sort by APY or TVL, and set sustainable=true to exclude IL-risky pure reward-emission farms. Find where to earn yield on USDC, ETH, SOL and more. Sourced from DefiLlama.

## Output

A JSON object containing a count of matching pools, an array of pool records (each with APY, base APY, reward APY, 30-day mean APY, TVL, chain, protocol, symbol, IL risk, stablecoin flag, exposure type, outlier flag, and predicted class), the data source (DefiLlama), applied filters, and total matching pool count before limit.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "sort": "apy",
   "chain": "Ethereum",
   "limit": 10,
   "symbol": "USDC",
   "minTvlUsd": 100000,
   "sustainable": true
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "sort": {
       "enum": [
        "tvl",
        "apy"
       ],
       "type": "string",
       "description": "Sort key (default tvl)."
      },
      "chain": {
       "type": "string",
       "description": "Filter to one chain (exact, case-insensitive): Ethereum, Solana, Base, Arbitrum…"
      },
      "limit": {
       "type": "integer",
       "maximum": 100,
       "minimum": 1,
       "description": "Max pools returned (1–100, default 20)."
      },
      "symbol": {
       "type": "string",
       "description": "Filter by pool asset substring: USDC, ETH, SOL…"
      },
      "project": {
       "type": "string",
       "description": "Filter by protocol/project substring: aave, lido, uniswap…"
      },
      "minTvlUsd": {
       "type": "number",
       "description": "Minimum pool TVL in USD (default 10000 to hide dust)."
      },
      "sustainable": {
       "type": "boolean",
       "description": "When true, keep only real-yield pools: no impermanent-loss risk, an organic base APY that outweighs reward-token emissions, and a plausible APY (drops transient spikes)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "count": {
       "type": "number"
      },
      "pools": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "apy": {
          "type": "number"
         },
         "pool": {
          "type": "string"
         },
         "chain": {
          "type": "string"
         },
         "ilRisk": {
          "type": "string"
         },
         "symbol": {
          "type": "string"
         },
         "tvlUsd": {
          "type": "number"
         },
         "apyBase": {
          "type": "number"
         },
         "outlier": {
          "type": "boolean"
         },
         "project": {
          "type": "string"
         },
  
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "pools": [
   {
    "apy": 5.12,
    "pool": "abc",
    "chain": "Base",
    "ilRisk": "no",
    "symbol": "USDC",
    "tvlUsd": 12500000,
    "apyBase": 4.9,
    "outlier": false,
    "project": "aave-v3",
    "exposure": "single",
    "apyReward": 0.22,
    "apyMean30d": 5.03,
    "stablecoin": true,
    "predictedClass": "Stable/Up"
   }
  ],
  "source": {
   "name": "DefiLlama"
  },
  "filters": {
   "sort": "apy",
   "chain": "base",
   "symbol": "usdc",
   "sustainable": true
  },
  "totalMatching": 42
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apitoll-defi-yields-api-a616695c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from crypto.apitoll.cloud](https://www.zero.xyz/host/crypto.apitoll.cloud/llms.txt)
