# DeFiLlama Chain-Wide TVL Lookup

> DeFiLlama Chain-Wide TVL Lookup is a paid API for AI agents from x402-seller-0ay3.onrender.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns the current total value locked (TVL) in USD across all DeFi protocols on a specified blockchain, sourced from DefiLlama.

## Facts

- Endpoint: GET https://x402-seller-0ay3.onrender.com/api/defi/tvl-chain
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defillama-chain-wide-tvl-lookup-ef1b533d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GNBnX2FOAqz4FCzniK-PW

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-chain-wide-tvl-lookup-ef1b533d
```

Example prompt: What's the total value locked across all DeFi protocols on Base right now? Give me the chain-wide TVL from DefiLlama.

## When to prefer this

Use this endpoint when you need aggregate, chain-wide TVL rather than TVL for a specific protocol. It is ideal for macro DeFi analysis, cross-chain comparisons, or monitoring the overall health of a blockchain's DeFi ecosystem. Prefer this over protocol-specific TVL endpoints when the question is about the entire chain rather than a single dApp.

## Known failure modes

- Invalid or unrecognized chain slug returns an error — use DefiLlama-compatible slugs like 'ethereum', 'base', 'arbitrum'
- Chain not indexed by DefiLlama returns null or empty TVL
- Upstream DefiLlama API downtime causes fetch failure
- Missing required 'chain' query parameter returns a validation error
- Payment not included or insufficient USDC results in HTTP 402

## How this service works

Current TVL (total value locked) of an entire blockchain (all protocols combined) — chain-wide TVL, source DefiLlama. Parameter: ?chain=<slug> (e.g. base, ethereum, arbitrum, solana).

## Output

A JSON object containing the chain slug, total TVL in USD as a number, the timestamp of the data point, when it was fetched, and the DefiLlama source URL used to retrieve it.

## 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",
     "required": [
      "chain"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "description": "DefiLlama chain slug (e.g. base, ethereum, arbitrum)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "as_of": "2026-09-01T00:00:00.000Z",
  "chain": "base",
  "source": "https://api.llama.fi/v2/historicalChainTvl/base",
  "tvl_usd": 5500000000,
  "fetched_at": "2026-09-01T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defillama-chain-wide-tvl-lookup-ef1b533d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-seller-0ay3.onrender.com](https://www.zero.xyz/host/x402-seller-0ay3.onrender.com/llms.txt)
