# DeFi Chain TVL History

> DeFi Chain TVL 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 total value locked (TVL) time-series data for a specific blockchain or all DeFi chains combined, sourced from DefiLlama

## Facts

- Endpoint: POST https://agent402.tools/api/defi-chain-tvl-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/defi-chain-tvl-history-d907ec7a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5X4OeQQb2ZaucVB9cZ2hd

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 defi-chain-tvl-history-d907ec7a -d '<json body>'
```

Example prompt: Pull the last 30 days of TVL history for Base chain so I can see how total value locked has been trending — include the percentage change and summary stats.

## When to prefer this

Use this endpoint when you need historical TVL time-series data for DeFi chains to perform trend analysis, build dashboards, monitor ecosystem growth, or compare chain-level liquidity over time. Prefer this over generic blockchain explorers when you specifically need TVL (not transaction counts or price data) aggregated across all protocols on a chain, with built-in summary statistics. It is ideal for agents that need DeFi macro-level data without managing DefiLlama API keys or authentication.

## Known failure modes

- Invalid chain name not recognized by DefiLlama returns an error or empty dataset
- Requesting more than 3650 days exceeds the maximum range and may return an error
- Network timeout if DefiLlama upstream is slow or unavailable
- Chain with very recent launch may have fewer data points than requested days
- Misspelled chain name (e.g. 'ethereum' vs 'Ethereum') may return no results if casing is strict

## How this service works

Daily total value locked history for one chain or for all of DeFi, up to ten years of points, with latest, first, minimum, maximum and mean and the change over the window. Use it when an agent is charting a chain's growth or checking whether a TVL move is new or a return to trend.

## Output

Returns a JSON object containing the chain name, a time-ordered array of {date, tvlUsd} data points, summary statistics (min, max, mean, first, latest, changePct), the data source identifier ('defillama-chain-tvl'), a fetchedAt timestamp, the count of returned points, and the total points available. Data is sourced from DefiLlama.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "days": {
   "type": "number",
   "description": "Most recent days to return (default 90, max 3650)."
  },
  "chain": {
   "type": "string",
   "description": "Chain name as DefiLlama spells it (Ethereum, Base, Solana, Arbitrum, Optimism, BSC...) or \"all\" for total DeFi TVL. Default \"all\"."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "Base",
  "count": 2,
  "points": [
   {
    "date": "2026-08-21",
    "tvlUsd": 5242607753
   },
   {
    "date": "2026-08-22",
    "tvlUsd": 5432285625
   }
  ],
  "source": "defillama-chain-tvl",
  "summary": {
   "max": 5432285625,
   "min": 5242607753,
   "mean": 5337446689,
   "first": 5242607753,
   "latest": 5432285625,
   "changePct": 3.6
  },
  "fetchedAt": "2026-08-22T12:00:00.000Z",
  "totalPoints": 1165
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-chain-tvl-history-d907ec7a/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)
