# Agent402 DeFi Yield History

> Agent402 DeFi Yield History is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Returns historical daily APY and TVL data points for a specific DeFi liquidity pool over a configurable time window, sourced from DefiLlama.

## Facts

- Endpoint: POST https://agent402.tools/api/defi-yield-history
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-defi-yield-history-304bae60
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pXnxNHHS1n2cUVJBPdLEG

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 agent402-defi-yield-history-304bae60 -d '<json body>'
```

Example prompt: Pull the last 180 days of daily APY and TVL history for DefiLlama pool 54e9b138-3146-4c1f-8dce-1cb948f5ef96 so I can see how the yield has trended.

## When to prefer this

Choose this endpoint when you need structured daily time-series data for APY and TVL for a specific DeFi liquidity pool identified by its DefiLlama pool UUID. It is ideal for trend analysis, volatility assessment, and performance benchmarking over custom time windows up to 10 years. Prefer it over generic DeFi APIs when you already have the pool UUID (e.g., from the defi-yields endpoint on the same platform) and need rich summary statistics alongside raw data points.

## Known failure modes

- Invalid or unknown pool UUID returns an error or empty result
- Limit exceeds 3650 days and may be capped or rejected
- Pool has insufficient history for the requested window, returning fewer points than expected
- DefiLlama upstream unavailability causes stale or missing data
- Malformed UUID format causes a 400-level error

## How this service works

Daily APY and TVL history for one yield pool, up to ten years, with a summary of latest, minimum, maximum and mean APY and the TVL change over the window. Use it when an agent is judging whether a pool's current yield is typical or an outlier before allocating to it.

## Output

Returns a JSON object containing the pool UUID, a count of data points, an array of daily records (each with date, APY, APY base, APY reward, and TVL in USD), summary statistics for APY and TVL (min, max, mean, first, latest, changePct), the data source ('defillama-yields'), a fetchedAt timestamp, and the total number of historical points available.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "pool": {
   "type": "string",
   "description": "DefiLlama pool id (UUID) as returned by defi-yields."
  },
  "limit": {
   "type": "number",
   "description": "Most recent days to return (default 90, max 3650)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "pool": "54e9b138-3146-4c1f-8dce-1cb948f5ef96",
  "count": 2,
  "points": [
   {
    "apy": 3.6,
    "date": "2026-08-21",
    "tvlUsd": 548000000,
    "apyBase": null,
    "apyReward": 3.6
   },
   {
    "apy": 3.51,
    "date": "2026-08-22",
    "tvlUsd": 546610322,
    "apyBase": null,
    "apyReward": 3.51
   }
  ],
  "source": "defillama-yields",
  "summary": {
   "apy": {
    "max": 3.9,
    "min": 3.2,
    "mean": 3.6,
    "first": 3.9,
    "latest": 3.51,
    "changePct": -10
   },
   "tvlUsd": {
    "max": 580000000,
    "min": 540000000,
    "mean": 560000000,
    "first": 579045934,
    "latest": 546610322,
    "changePct": -5.6
   }
  },
  "fetchedAt": "2026-08-22T12:00:00.000Z",
  "totalPoints": 170
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-defi-yield-history-304bae60/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
