# DefiLlama TVL/Yields Gateway

> DefiLlama TVL/Yields Gateway is a paid API for AI agents from x402.shizu.me, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Proxies DefiLlama TVL and yield data through a metered gateway with rate-limit pooling and 300-second caching to prevent upstream 429 errors

## Facts

- Endpoint: GET https://x402.shizu.me/gw/defillama
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defillama-tvl-yields-gateway-01de09d5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iP6v4TLWyYX9Y0AsSNJ8Y

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 defillama-tvl-yields-gateway-01de09d5
```

Example prompt: Pull the current TVL for Uniswap from DefiLlama — use the path /protocol/uniswap — without worrying about rate limits.

## When to prefer this

Use this endpoint when your agent loop needs to poll DefiLlama TVL or yield data repeatedly and risks hitting upstream rate limits (429s). The 300-second cache and shared rate-limit budget make it ideal for high-frequency DeFi monitoring workflows where freshness within 5 minutes is acceptable.

## Known failure modes

- Upstream DefiLlama path not found — returns upstream 404 wrapped in error
- Invalid path format causes routing failure
- DefiLlama upstream outage propagates after cache expires
- Stale cache data up to 300 seconds old returned instead of live data
- Payment failure if USDC balance insufficient for $0.002 per call

## How this service works

Call DefiLlama TVL/yields through our metered gateway: our rate-limit budget and a 300s cache absorb your polling, so your loop never sees a 429. Inputs: path (upstream path, e.g. /ping) and q (raw query string). Returns the upstream JSON under 'data'.

## Output

Returns a JSON object with a 'data' field containing the upstream DefiLlama API response (TVL figures, yield pool data, protocol stats, etc.) as-is, served from a 300-second cache when available.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "method"
   ],
   "properties": {
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "path",
      "q"
     ],
     "properties": {
      "q": {
       "type": "string"
      },
      "path": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "path": "/ping",
  "upstream": "defillama"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defillama-tvl-yields-gateway-01de09d5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.shizu.me](https://www.zero.xyz/host/x402.shizu.me/llms.txt)
