# DefiLlama Fee & Revenue Summary by Protocol

> DefiLlama Fee & Revenue Summary by Protocol 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 fee and revenue history for a single DeFi protocol identified by its slug, with optional data type and chart filtering.

## Facts

- Endpoint: GET https://defillama.use.x402atlas.com/fee-summary
- 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-fee-revenue-summary-by-protocol-805650a7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5TTKaF9rUPlSa7nseZFWg

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-fee-revenue-summary-by-protocol-805650a7
```

Example prompt: Pull the fee and revenue history for Uniswap from DefiLlama — just daily fees, and skip the aggregate chart data.

## When to prefer this

Use this endpoint when you need fee or revenue data for a specific DeFi protocol by slug, particularly when you want historical daily fee/revenue trends. Prefer over general TVL or price endpoints when the question is about protocol earnings or fee generation.

## Known failure modes

- Invalid or unrecognized protocol slug returns error or empty result
- Missing required 'protocol' query parameter causes validation error
- Invalid dataType value may return unexpected or empty data
- Network or upstream DefiLlama API downtime causes request failure
- Payment failure (insufficient USDC) blocks access

## How this service works

Fees & revenue summary by DefiLlama — fee and revenue history for one protocol by slug.

## Output

Returns a fee and revenue summary for the specified protocol including historical daily fees, daily revenue, and optional chart breakdowns depending on query parameters.

## 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": [
      "protocol"
     ],
     "properties": {
      "dataType": {
       "type": "string",
       "maxLength": 200,
       "description": "Optional data type (e.g. dailyFees, dailyRevenue)"
      },
      "protocol": {
       "type": "string",
       "pattern": "^[^/?#]+$",
       "maxLength": 100,
       "minLength": 1,
       "description": "Protocol slug (e.g. uniswap, aave)"
      },
      "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": {
        "name": {
         "type": "string",
         "description": "Protocol display name"
        },
        "total24h": {
         "type": "number",
         "description": "24h fees or revenue in USD, per dataType"
        },
        "totalAllTime": {
         "type": "number",
         "description": "All-time cumulative fees or revenue in USD"
        }
       },
       "description": "Raw DefiLlama fee summary 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": {
   "name": "Uniswap",
   "total24h": 1200000,
   "totalAllTime": 1230000000
  },
  "queried_at": "2026-07-01T12:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defillama-fee-revenue-summary-by-protocol-805650a7/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)
