# DeFi Protocol Fees & DEX Volume Leaderboard

> DeFi Protocol Fees & DEX Volume Leaderboard is a paid API for AI agents from 2s.io, paid per call via x402, $0.0036/call, status unknown (last checked 2026-09-15).

Returns ranked leaderboards of DeFi protocol fees/revenue or DEX trading volumes (via DefiLlama), with 24h/7d/30d/1y breakdowns and month-over-month change.

## Facts

- Endpoint: GET https://2s.io/api/crypto/defi-fees
- Price: $0.0036/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-protocol-fees-dex-volume-leaderboard-fb7002c9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S_sT33dbWt5P9qQxGSZC9

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-dex-volume-leaderboard-fb7002c9
```

Example prompt: Show me the top 20 DeFi protocols ranked by fees generated in the last 24 hours, and also pull up the top DEX trading volume leaderboard sorted by 7-day volume.

## When to prefer this

Use this endpoint when you need ranked, up-to-date leaderboard data for DeFi protocol fees or DEX trading volumes sourced from DefiLlama, with multi-timeframe breakdowns (24h/7d/30d/1y) in a single call. Prefer this over building your own DefiLlama integration when you want pay-per-call access without an API key.

## Known failure modes

- Invalid 'kind' value (not 'fees' or 'dexs') returns an error
- Invalid 'sort' value (not 'total24h', 'total7d', 'total30d') returns an error
- Limit outside range 1–100 returns a validation error
- Payment not included or insufficient USDC triggers 402 response
- DefiLlama upstream unavailability may cause stale or missing data

## How this service works

Protocol fees/revenue or DEX trading volume leaderboards (via DefiLlama, free/keyless). kind=fees ranks protocols by fees generated; kind=dexs ranks DEXes by trading volume. Each row has 24h/7d/30d/1y totals + 1-month change, plus catalog totals. Sort by total24h/7d/30d. The protocol-economics layer.

## Output

A ranked list of DeFi protocols or DEXes with their fee/volume figures across 24h, 7d, 30d, and 1y timeframes, plus a 1-month percentage change and aggregate catalog totals. Each row represents one protocol or exchange with its numeric fee or volume metrics.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "kind": {
       "enum": [
        "fees",
        "dexs"
       ],
       "type": "string"
      },
      "sort": {
       "enum": [
        "total24h",
        "total7d",
        "total30d"
       ],
       "type": "string"
      },
      "limit": {
       "type": "integer",
       "maximum": 100,
       "minimum": 1
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-protocol-fees-dex-volume-leaderboard-fb7002c9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
