# DeFiLlama Protocol TVL by Chain

> DeFiLlama Protocol TVL by Chain is a paid API for AI agents from opportunity-api-production.up.railway.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Returns total and per-chain TVL (in USD) for any DeFi protocol by slug, including category and URL metadata from DeFiLlama.

## Facts

- Endpoint: GET https://opportunity-api-production.up.railway.app/api/protocol-tvl
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defillama-protocol-tvl-by-chain-8533f683
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_f7nk4HztIFei9ZdGtU7Io

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-protocol-tvl-by-chain-8533f683
```

Example prompt: What's the current TVL of Aave broken down by chain? I want to see the total USD locked and how it's split across each network.

## When to prefer this

Use this endpoint when you need current TVL figures for a specific DeFi protocol — especially per-chain breakdowns — sourced from DeFiLlama. Prefer this over general market APIs when TVL (not price or volume) is the core metric, or when you need chain-level granularity for a named protocol.

## Known failure modes

- Invalid or unknown protocol slug returns an error or empty result
- Misspelled slug (e.g. 'aave-v2' vs 'aave') may return no data
- DeFiLlama upstream outage causes data unavailability
- Payment of $0.01 USDC not settled causes 402 rejection

## How this service works

TVL of any DeFi protocol broken down by chain (DeFiLlama): total + per-chain USD, category, url. Param: protocol (slug from defillama.com/protocol/<slug>, e.g. aave, uniswap, aerodrome).

## Output

Returns the protocol's total TVL in USD plus a per-chain breakdown, along with the protocol's category (e.g. Lending, DEX) and its DeFiLlama URL.

## 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": [
      "protocol"
     ],
     "properties": {
      "protocol": {
       "type": "string",
       "description": "protocol slug, e.g. aave, uniswap, aerodrome"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defillama-protocol-tvl-by-chain-8533f683/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from opportunity-api-production.up.railway.app](https://www.zero.xyz/host/opportunity-api-production.up.railway.app/llms.txt)
