# DeFi Protocol Fees & Revenue Rankings (DefiLlama)

> DeFi Protocol Fees & Revenue Rankings (DefiLlama) is a paid API for AI agents from task-radar-x402.vercel.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-31).

Returns top protocol fee/revenue rankings (optionally filtered by chain or category) or time-series totals (24h/7d/30d/1y) for a specific protocol, sourced from DefiLlama.

## Facts

- Endpoint: GET https://task-radar-x402.vercel.app/api/fees?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-protocol-fees-revenue-rankings-defillama-6cbf8df2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0m7yWhNXD3zeDdrvKWyBi

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-protocol-fees-revenue-rankings-defillama-6cbf8df2
```

Example prompt: Show me the top 10 DeFi protocols ranked by fees on Base, filtered to the DEX category — pull fees (not revenue) from DefiLlama.

## When to prefer this

Use this endpoint when you need DeFi protocol fee or revenue data ranked across the ecosystem or for a specific protocol over time. Prefer this over general crypto price endpoints when the goal is protocol-level economic analysis (fees earned, revenue generated). Ideal for comparing protocol monetization, tracking DeFi category leaders, or monitoring a single protocol's revenue trends.

## Known failure modes

- Unknown protocol slug returns empty or error response
- Invalid chain or category filter returns no results
- Limit out of range (outside 1-100) may return default or error
- DefiLlama upstream outage causes stale or missing data
- Payment failure (insufficient USDC balance on Base) blocks the request

## How this service works

Protocol fees or revenue: top protocols ranking (optionally by chain/category), or one protocol's 24h/7d/30d/1y totals (DefiLlama). 0.02 USDC/call on Base.

## Output

Returns either a ranked list of protocols with their fee or revenue totals (filterable by chain and category, up to 100 results), or a single protocol's aggregated fee/revenue figures broken down by 24h, 7d, 30d, and 1y periods. Data is sourced live from DefiLlama.

## 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": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "type": {
       "type": "string",
       "description": "fees|revenue (default fees)"
      },
      "chain": {
       "type": "string",
       "description": "Filter ranking by chain e.g. Base (optional)"
      },
      "limit": {
       "type": "string",
       "description": "1-100 (default 25)"
      },
      "category": {
       "type": "string",
       "description": "Filter ranking by category e.g. Dexs (optional)"
      },
      "protocol": {
       "type": "string",
       "description": "Protocol slug e.g. uniswap (optional; omit for ranking)"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-protocol-fees-revenue-rankings-defillama-6cbf8df2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from task-radar-x402.vercel.app](https://www.zero.xyz/host/task-radar-x402.vercel.app/llms.txt)
