# DefiLlama — Get summary of protocol fees and revenue with historical data

Get DefiLlama Protocol Fees Summary data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by DeFiLlama, pass parameters such as dataType, and retrieve structured data including defiLlama protocol identifier, protocol display name, chains, total24h, and total7d for compute p/f and p/s ratios, monitor revenue health, and chart historical monetization.

Documentation: https://openany.si/defillama/defillama-get-summary-of-protocol-fees-and-revenue-with-historical-data/757e1f94-2682-4e3f-8943-8a6b7c946d33/
API ID: 757e1f94-2682-4e3f-8943-8a6b7c946d33
Provider: defillama
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/defillama/summary/fees/{protocol}
Page update time: 2026-12-03T02:39:15.488Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:39:13.345Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## DefiLlama Protocol Fees Summary API

Provide a `protocol` slug and optional `dataType` query parameter (defaults to `dailyFees`). The response returns protocol metadata, `total24h`, `total7d`, `totalAllTime`, `change_1d`, `chains`, `childProtocols` and historical chart arrays.

## What You Can Build

- **Compute P/F and P/S ratios**: Pair annualized protocol fees with token market cap from the Protocol Historical TVL API.
- **Monitor revenue health**: Track change\_1d and latestFetchIsOk in automated protocol financial dashboards.
- **Chart historical monetization**: Plot totalDataChart and totalDataChartBreakdown across protocol versions and chains.

## Returned Data

| Field | Meaning |
| --- | --- |
| `id` | DefiLlama protocol identifier |
| `displayName` | Protocol display name |
| `chains` | Array of blockchains where fees are tracked |
| `total24h` | Protocol fees or revenue over the past 24 hours in USD |
| `total7d` | Protocol fees or revenue over the past 7 days in USD |
| `totalAllTime` | Cumulative all-time fees or revenue in USD |
| `change_1d` | 1-day percentage change in fees or revenue |
| `latestFetchIsOk` | Boolean status indicating whether the latest upstream fetch succeeded |
| `totalDataChart` | Historical daily fee or revenue chart array |
| `totalDataChartBreakdown` | Historical daily fee breakdown by chain or child protocol |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DefiLlama — Get summary of protocol fees and revenue with historical data request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "protocol": {
          "type": "string",
          "description": "protocol slug"
        }
      },
      "required": [
        "protocol"
      ]
    },
    "query": {
      "type": "object",
      "properties": {
        "dataType": {
          "type": "string",
          "description": "Desired data type, dailyFees by default.",
          "enum": [
            "dailyFees",
            "dailyRevenue",
            "dailyHoldersRevenue"
          ]
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "address": {
      "type": "string"
    },
    "audit_links": {
      "type": "null"
    },
    "audits": {
      "type": "null"
    },
    "category": {
      "type": "null"
    },
    "chains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "change_1d": {
      "type": "number"
    },
    "childProtocols": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {}
      }
    },
    "cmcId": {
      "type": "string"
    },
    "defillamaId": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "disabled": {
      "type": "null"
    },
    "displayName": {
      "type": "string"
    },
    "forkedFrom": {
      "type": "null"
    },
    "gecko_id": {
      "type": "string"
    },
    "github": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "governanceID": {
      "type": "null"
    },
    "id": {
      "type": "string"
    },
    "latestFetchIsOk": {
      "type": "boolean"
    },
    "linkedProtocols": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "logo": {
      "type": "string"
    },
    "methodology": {
      "type": "null"
    },
    "methodologyURL": {
      "type": "null"
    },
    "module": {
      "type": "null"
    },
    "name": {
      "type": "string"
    },
    "parentProtocol": {
      "type": "null"
    },
    "previousNames": {
      "type": "null"
    },
    "protocolType": {
      "type": "string"
    },
    "referralUrl": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "symbol": {
      "type": "string"
    },
    "total24h": {
      "type": "integer"
    },
    "total48hto24h": {
      "type": "integer"
    },
    "total7d": {
      "type": "integer"
    },
    "totalAllTime": {
      "type": "integer"
    },
    "totalDataChart": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "integer"
        }
      }
    },
    "totalDataChartBreakdown": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "object",
              "properties": {
                "Hyperliquid L1": {
                  "type": "object",
                  "properties": {
                    "Hyperliquid Spot Orderbook": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          ]
        }
      }
    },
    "treasury": {
      "type": "null"
    },
    "twitter": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "versionKey": {
      "type": "null"
    }
  }
}
```

## Request example
Scenario: Official example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/defillama/summary/fees/derive?dataType=dailyFees' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "address": "hyperliquid:0x0d01dc56dcaaca66ad901c959b4011ec",
  "audit_links": null,
  "audits": null,
  "category": null,
  "chains": [
    "Hyperliquid L1"
  ],
  "change_1d": 7.47,
  "childProtocols": [
    {}
  ],
  "cmcId": "32196",
  "defillamaId": "parent#hyperliquid",
  "description": "Hyperliquid is a decentralized perpetual exchange with best-in-class speed, liquidity, and price",
  "disabled": null,
  "displayName": "Hyperliquid",
  "forkedFrom": null,
  "gecko_id": "hyperliquid",
  "github": [
    "hyperliquid-dex"
  ],
  "governanceID": null,
  "id": "parent#hyperliquid",
  "latestFetchIsOk": true,
  "linkedProtocols": [
    "Hyperliquid",
    "Hyperliquid Spot Orderbook"
  ],
  "logo": "https://icons.llama.fi/hyperliquid.png",
  "methodology": null,
  "methodologyURL": null,
  "module": null,
  "name": "Hyperliquid",
  "parentProtocol": null,
  "previousNames": null,
  "protocolType": "protocol",
  "referralUrl": "https://app.hyperliquid.xyz/join/DEFILLAMAO",
  "slug": "hyperliquid",
  "symbol": "HYPE",
  "total24h": 4890250,
  "total48hto24h": 4550411,
  "total7d": 26184696,
  "totalAllTime": 499292857,
  "totalDataChart": [
    [
      1734912000,
      1472923
    ]
  ],
  "totalDataChartBreakdown": [
    [
      1734912000,
      {
        "Hyperliquid L1": {
          "Hyperliquid Spot Orderbook": 1472923
        }
      }
    ]
  ],
  "treasury": null,
  "twitter": "HyperliquidX",
  "url": "https://hyperliquid.xyz",
  "versionKey": null
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### What is the default dataType parameter?
dataType defaults to dailyFees when omitted.

### Where can I find valid protocol slugs?
List protocols with fee tracking via the DefiLlama All Protocol Fees API.

### What does latestFetchIsOk indicate?
It indicates whether DefiLlama’s latest adapter data collection for that protocol succeeded.

### Are child or linked protocols included in the response?
Yes. The response includes childProtocols and linkedProtocols arrays when applicable.

### Why might methodology or category be null for some parent protocols?
Parent protocol aggregates can leave single-adapter fields like methodology or category null while keeping totals populated.

### How do I compare fees across all protocols on one chain?
Use the DefiLlama Chain Protocol Fees API with the target chain name.

## Available implementations
- defillama: https://openany.si/defillama/defillama-get-summary-of-protocol-fees-and-revenue-with-historical-data/757e1f94-2682-4e3f-8943-8a6b7c946d33/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
