# DeFi Llama TVL Ranking

> DeFi Llama TVL Ranking is a paid API for AI agents from defi-llama-tvl-ranking.hergertsynthora.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-14).

Returns a live-ranked list of DeFi protocols by Total Value Locked (TVL), sourced from DeFi Llama, via a paid x402 API on Base.

## Facts

- Endpoint: POST https://defi-llama-tvl-ranking.hergertsynthora.com/service?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-llama-tvl-ranking-bb06f861
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IKuz4CiLjUydyAaQTmjIl

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-llama-tvl-ranking-bb06f861 -d '<json body>'
```

Example prompt: Pull the top 100 DeFi protocols ranked by total value locked from DeFi Llama right now and show me the list with their TVL figures.

## When to prefer this

Choose this endpoint when you need a live, ranked list of DeFi protocols by TVL from DeFi Llama with minimal setup, especially in agentic workflows on Base using x402 micropayments. Prefer this over direct DeFi Llama API access when you need a pay-per-call, no-subscription model. Best suited for on-demand TVL snapshots rather than historical trend analysis.

## Known failure modes

- Payment not included or insufficient — returns x402 Payment Required response
- Limit parameter exceeds 200 — may return error or capped results
- DeFi Llama upstream unavailable — result may contain an error field instead of protocols
- Invalid input type for limit — schema validation error

## How this service works

Live x402 resource on Base. POST /service; payment required responses use x402.

## Output

Returns a JSON object with an 'ok' boolean, a 'niche' field identifying the data source ('defi_llama_tvl_ranking'), and a 'result' object containing the ranked protocol list, total protocol count from the source, the data timestamp (as_of_utc), and the source identifier. Also includes a payment receipt with an ed25519 signature confirming the x402 micropayment.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "Service input as text or a JSON string; see the validated historical request example."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "required": [
   "ok",
   "niche"
  ],
  "properties": {
   "ok": {
    "type": "boolean"
   },
   "error": {
    "type": "string"
   },
   "niche": {
    "type": "string"
   },
   "result": {
    "type": "object",
    "properties": {
     "count": {
      "type": "number"
     },
     "error": {
      "type": "string"
     },
     "source": {
      "type": "string"
     },
     "as_of_utc": {
      "type": "string"
     },
     "protocols": {
      "type": "array"
     },
     "total_protocolos_fuente": {
      "type": "number"
     }
    }
   },
   "receipt": {
    "type": "object"
   }
  }
 },
 "example": {
  "ok": true,
  "niche": "defi_llama_tvl_ranking",
  "result": {},
  "receipt": {
   "alg": "ed25519"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-llama-tvl-ranking-bb06f861/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-llama-tvl-ranking.hergertsynthora.com](https://www.zero.xyz/host/defi-llama-tvl-ranking.hergertsynthora.com/llms.txt)
