# DefiLlama Fees & Revenue by Chain

> DefiLlama Fees & Revenue by Chain is a paid API for AI agents from defillama.use.x402atlas.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns protocol fees and revenue data for a single blockchain chain via DefiLlama.

## Facts

- Endpoint: GET https://defillama.use.x402atlas.com/fees-chain
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defillama-fees-revenue-by-chain-e916797f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NwLgXAvXw7rf0lxwhuzuW

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-fees-revenue-by-chain-e916797f
```

Example prompt: Can you pull the DefiLlama fee and revenue data for Arbitrum, including the daily breakdown by protocol?

## When to prefer this

Use this endpoint when you need fee and revenue metrics scoped to a single blockchain chain rather than aggregated across all chains. Prefer this over options volume or TVL endpoints when the specific question is about economic activity (fees paid, revenue earned) on one chain. Ideal for chain-level financial performance comparisons in DeFi analytics.

## Known failure modes

- Invalid or unrecognized chain slug returns an error or empty result
- Missing required 'chain' query parameter causes a 400-level error
- Chain slug misspelling (e.g. 'eth' instead of 'ethereum') may return no data
- Temporary DefiLlama data unavailability may result in stale or missing charts
- Payment of $0.005 USDC not fulfilled causes 402 Payment Required response

## How this service works

Fees & revenue for one chain by DefiLlama — protocol fees and revenue on a single chain.

## Output

Returns an object containing protocol fees and revenue figures for the specified chain, including aggregate time-series data and optionally a per-protocol breakdown of daily fees and daily revenue.

## 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": [
      "chain"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "pattern": "^[^/?#]+$",
       "maxLength": 100,
       "minLength": 1,
       "description": "Chain slug (e.g. ethereum, arbitrum)"
      },
      "dataType": {
       "type": "string",
       "maxLength": 200,
       "description": "Optional data type (e.g. dailyFees, dailyRevenue)"
      },
      "excludeTotalDataChart": {
       "type": "string",
       "maxLength": 200,
       "description": "Optional true/false to exclude the aggregate data chart"
      },
      "excludeTotalDataChartBreakdown": {
       "type": "string",
       "maxLength": 200,
       "description": "Optional true/false to exclude the per-protocol chart breakdown"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "queried_at",
      "data"
     ],
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "total24h": {
         "type": "number",
         "description": "Aggregate 24h fees or revenue in USD, per dataType"
        },
        "protocols": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "name": {
            "type": "string"
           },
           "total24h": {
            "type": "number"
           }
          }
         }
        }
       },
       "description": "Raw DefiLlama per-chain fees overview payload",
       "additionalProperties": true
      },
      "queried_at": {
       "type": "string",
       "format": "date-time",
       "description": "When this bridge fetched the upstream data"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "total24h": 1230000,
   "protocols": [
    {
     "name": "Uniswap",
     "total24h": 120000
    }
   ]
  },
  "queried_at": "2026-07-01T12:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defillama-fees-revenue-by-chain-e916797f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defillama.use.x402atlas.com](https://www.zero.xyz/host/defillama.use.x402atlas.com/llms.txt)
