# DeFi Fees & Revenue API
> Live data on the fees users pay to DeFi protocols and the revenue those protocols actually keep — the "which protocols earn money" view, a different layer from Total Value Locked. TVL is what is deposited; fees are what users pay to use a protocol; revenue is the slice the protocol or its token-holders retain. Powered by the public DeFiLlama fees feed, no key, nothing stored. The overview endpoint returns the whole-DeFi fee (or revenue) total for the last 24 hours, 7 days and 30 days plus every protocol ranked by what it earns, with its category and chains. The protocol endpoint returns a single protocol's fee and revenue figures side by side across 24h / 7d / 30d / all-time (e.g. Aave, Uniswap, Lido). The chain endpoint returns the fee or revenue total and top-earning protocols for one blockchain (Ethereum, Solana, Base). Switch any list between gross fees and retained revenue with a single metric parameter. This is the fees-and-revenue cut of DeFi — distinct from the TVL, DEX-volume, exchange-ticker and coin-markets APIs in the catalogue.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/defifees-api/..."
```

## Pricing
- **Free** (Free) — 15,000 calls/Mo, 3 req/s
- **Analyst** ($9/Mo) — 190,000 calls/Mo, 10 req/s
- **Pro** ($27/Mo) — 820,000 calls/Mo, 28 req/s
- **Scale** ($61/Mo) — 2,900,000 calls/Mo, 65 req/s

## Endpoints

### Overview

#### `GET /v1/overview` — Whole-DeFi fees/revenue total + ranked protocols

**Parameters:**
- `metric` (query, optional, string) — fees (default) or revenue Example: `fees`
- `limit` (query, optional, string) — Max protocols (1-500) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defifees-api/v1/overview?metric=fees&limit=50"
```

**Response:**
```json
{
    "data": {
        "note": "Gross fees paid by users (USD).",
        "metric": "fees",
        "source": "DeFiLlama",
        "total_d7": 417533537,
        "protocols": [
            {
                "d7": 114664159,
                "y1": 5940722926,
                "d30": 492275276,
                "h24": 16390683,
                "name": "Tether",
                "chains": [
                    "Off Chain"
                ],
                "category": "Stablecoin Issuer"
            },
            {
                "d7": 45101691,
                "y1": 2359846538,
                "d30": 193725799,
                "h24": 6403139,
                "name": "Circle USDC",
                "chains": [
                    "Ethereum",
                    "Off Chain"
                ],
                "category": "Stablecoin Issuer"
            },
            {
                "d7": 24083618,
                "y1": 998283502,
                "d30": 75580350,
                "h24": 2707459,
                "name": "Hyperliquid Perps",
                "chains": [
                    "Hyperliquid L1"
                ],
                "category": "Derivatives"
            },
            {
                "d7": 13854931,
                "y1": 450937163,
                "d30": 60737108,
                "h24": 2073964,
                "name": "Canton",
                "chains": [
                    "Canton"
                ],
                "category": "Chain"
            },
    
…(truncated, see openapi.json for full schema)
```

### Protocol

#### `GET /v1/protocol` — One protocol fees & revenue side by side

**Parameters:**
- `protocol` (query, required, string) — DeFiLlama protocol slug Example: `aave`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defifees-api/v1/protocol?protocol=aave"
```

**Response:**
```json
{
    "data": {
        "fees": {
            "d7": 15716537,
            "d30": 42220414,
            "h24": 957059,
            "all_time": 2193554169
        },
        "name": "Aave",
        "slug": "aave",
        "chains": [
            "Ethereum",
            "Polygon",
            "Avalanche",
            "Fantom",
            "Arbitrum",
            "OP Mainnet",
            "Metis",
            "Base",
            "Gnosis",
            "BSC",
            "Scroll",
            "ZKsync Era",
            "Linea",
            "Celo",
            "Sonic",
            "Soneium",
            "Plasma",
            "Mantle",
            "MegaETH",
            "X Layer"
        ],
        "source": "DeFiLlama",
        "revenue": {
            "d7": 1829316,
            "d30": 5469573,
            "h24": 127136,
            "all_time": 296844312
        },
        "category": null
    },
    "meta": {
        "timestamp": "2026-06-11T16:46:56.502Z",
        "request_id": "d7c10468-67a6-414b-b28a-1b396e3ab00f"
    },
    "status": "ok",
    "message": "Protocol retrieved successfully",
    "success": true
}
```

### Chain

#### `GET /v1/chain` — Fees/revenue total + top protocols for a chain

**Parameters:**
- `chain` (query, required, string) — DeFiLlama chain slug Example: `ethereum`
- `metric` (query, optional, string) — fees (default) or revenue Example: `fees`
- `limit` (query, optional, string) — Max protocols (1-200) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defifees-api/v1/chain?chain=ethereum&metric=fees&limit=25"
```

**Response:**
```json
{
    "data": {
        "chain": "ethereum",
        "metric": "fees",
        "source": "DeFiLlama",
        "total_d7": 88672703,
        "protocols": [
            {
                "d7": 4084593,
                "y1": 362893372,
                "d30": 15713231,
                "h24": 2222484,
                "name": "Ethena USDe",
                "chains": [
                    "Ethereum"
                ],
                "category": "Basis Trading"
            },
            {
                "d7": 1176000,
                "y1": 49511125,
                "d30": 4584370,
                "h24": 1158162,
                "name": "Chainlink Staking",
                "chains": [
                    "Ethereum"
                ],
                "category": "Services"
            },
            {
                "d7": 8167427,
                "y1": 769156005,
                "d30": 39452551,
                "h24": 1051359,
                "name": "Lido",
                "chains": [
                    "Ethereum"
                ],
                "category": "Liquid Staking"
            },
            {
                "d7": 7206952,
                "y1": 410755369,
                "d30": 31662587,
                "h24": 1022355,
                "name": "Sky Lending",
                "chains": [
                    "Ethereum"
                ],
                "category": "CDP"
            },
            {
                "d7": 13016640,
                "y1": 774822809,
       
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/defifees-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "metric=fees (gross paid by users, default) or metric=revenue (protocol's retained share). Dollar amounts are USD. protocol/chain are DeFiLlama slugs (aave, uniswap, ethereum, solana).",
        "source": "DeFiLlama fees & revenue (api.llama.fi/overview/fees & /summary/fees, live)",
        "service": "defifees-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/chain": "Fee or revenue total and top protocols for one chain (chain=ethereum, metric=fees).",
            "GET /v1/overview": "Whole-DeFi fee or revenue total plus protocols ranked by earnings (metric=fees|revenue, limit=50).",
            "GET /v1/protocol": "One protocol's fees and revenue side by side, 24h/7d/30d/all-time (protocol=aave)."
        },
        "description": "Live data on the fees users pay to DeFi protocols and the revenue protocols retain, from DeFiLlama. The 'which protocols actually earn money' view — a different layer from TVL (what is deposited). The overview endpoint returns the whole-DeFi fee or revenue total (24h/7d/30d) plus every protocol ranked by earnings; the protocol endpoint returns one protocol's fees and revenue side by side (24h/7d/30d/all-time); the chain endpoint returns the total and top protocols for one blockchain. Live, no key, nothing stored. The fees-and-revenue cut of DeFi — distinct from the TVL, DEX-volume, exchange-ticker and coin-markets APIs.",
        "upstream_status": "ok",
        "to
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/defifees-api
OpenAPI spec: https://www.oanor.com/api/defifees-api/openapi.json
