# DeFi Top Protocols by 24h Fees

> DeFi Top Protocols by 24h Fees is a paid API for AI agents from x402-data-api.sigrunner.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-29).

Returns the top DeFi protocols ranked by 24-hour fees earned, including 7-day fees, 1-day change, and the market-wide total, sourced from DefiLlama.

## Facts

- Endpoint: GET https://x402-data-api.sigrunner.workers.dev/defi/fees-top?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-top-protocols-by-24h-fees-ad0eb1ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BEnPaZVG_QhXpMX459OXS

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-top-protocols-by-24h-fees-ad0eb1ad
```

Example prompt: Which DeFi protocols are earning the most in fees right now? Show me the top ones by 24-hour fees along with the total market fees.

## When to prefer this

Use this endpoint when you need a ranked, ready-to-use snapshot of top DeFi protocol fee revenue without building your own aggregation pipeline. It is ideal for agents that need quick protocol revenue context for investment analysis, DeFi dashboards, or market summaries, and is preferable over raw DefiLlama API calls because it pre-ranks, pre-formats, and includes market totals in one response.

## Known failure modes

- DefiLlama upstream data unavailable — may return empty or stale data
- Network timeout from the Cloudflare Worker — returns 5xx error
- Invalid limit parameter type — may return 400 or be silently ignored
- Rate limiting or payment failure via x402 — returns 402 Payment Required

## How this service works

Top DeFi protocols by 24h fees (DefiLlama): name, 24h/7d fees USD, 1d change, plus market total. No params. Use when an agent needs which protocols earn the most.

## Output

A JSON object containing an array of top DeFi protocols each with their name, 24h fees in USD, 7d fees in USD, and 1-day change percentage, plus a total24h_usd field representing the aggregate fee market total across all protocols.

## 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",
     "properties": {
      "limit": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "total24h_usd",
      "protocols"
     ],
     "properties": {
      "protocols": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "name",
         "fees24h_usd"
        ],
        "properties": {
         "name": {
          "type": "string"
         },
         "fees24h_usd": {
          "type": "integer"
         }
        }
       }
      },
      "total24h_usd": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "protocols": [
   {
    "name": "Tether",
    "fees24h_usd": 1000000
   }
  ],
  "total24h_usd": 66595988
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-top-protocols-by-24h-fees-ad0eb1ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-data-api.sigrunner.workers.dev](https://www.zero.xyz/host/x402-data-api.sigrunner.workers.dev/llms.txt)
