DeFi protocol fees and revenue

$0.002 per call · USDC via x402 · POST /api/defi-fees

Protocols ranked by fees paid by users (or by protocol revenue with metric "revenue") over the last 24h from DefiLlama's free fees overview: per-protocol 24h/7d/30d/1y/all-time totals with 1d/7d/30d change, category and chains; optional chain scope, category filter and name search; chain-level rows (network gas fees) via type "chain"; sector totals. limit up to 100. Send POST /api/defi-fees with no required fields (6 optional) and pay $0.002 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, fetchedAt, cached, metric, unit and 6 more.

Keyless public data.

Category: Crypto & onchain data · Tags: crypto defi fees revenue protocols ranking defillama

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
chainstringnoOptional chain scope as DefiLlama names it (Ethereum, Base, Solana, Arbitrum, BSC, OP Mainnet...). Case-insensitive; common aliases accepted. Omit for all chains.
categorystringnoOptional category filter (Dexs, Lending, Derivatives, Liquid Staking, ...). Case-insensitive exact match.
searchstringnoOptional name/slug substring filter (case-insensitive).
typestringnoRow type: "protocol" (default), "chain" (chain-level rows such as network gas fees), or "all".
limitnumbernoRows to return (default 25, max 100).
metricstringno"fees" (default) or "revenue".

Example request

curl -i -X POST https://agent402.tools/api/defi-fees \
  -H "Content-Type: application/json" \
  -d '{"metric":"fees","limit":5}'

Without payment this returns HTTP 402 Payment Required with the exact price for defi-fees; any x402 v2 or MPP client pays it and retries.

Example response

{
  "source": "defillama-fees",
  "fetchedAt": "2026-08-22T12:00:00.000Z",
  "cached": true,
  "metric": "fees",
  "unit": "USD",
  "chain": null,
  "totals": {
    "total24hUsd": 75393517,
    "total7dUsd": 423480844,
    "total30dUsd": 1800000000,
    "change1dPct": 6.68,
    "change7dPct": 2.1,
    "change1mPct": 10.2
  },
  "chains": [
    "Solana",
    "Ethereum",
    "Base"
  ],
  "matched": 2500,
  "count": 1,
  "protocols": [
    {
      "rank": 1,
      "name": "Tether",
      "slug": "tether",
      "category": "Stablecoin Issuer",
      "protocolType": "protocol",
      "chains": [
        "Ethereum"
      ],
      "chainCount": 1,
      "total24hUsd": 15900806,
      "total7dUsd": 111368600,
      "total30dUsd": 481404902,
      "total1yUsd": 5800000000,
      "totalAllTimeUsd": 20000000000,
      "change1dPct": 0,
      "change7dPct": -0.03,
      "change1mPct": 1.2
    }
  ]
}
FieldTypeAlways presentIn the example
sourcestringyesdefillama-fees
fetchedAtstringyes2026-08-22T12:00:00.000Z
cachedbooleanyestrue
metricstringyesfees
unitstringyesUSD
chainnullnonull
totalsobjectyes6 fields: total24hUsd, total7dUsd, total30dUsd, change1dPct, change7dPct, cha...
chainsarray of stringyes3 items in the example
matchednumberyes2500
countnumberyes1
protocolsarray of objectsyes1 item in the example

From an MCP client

catalog.call {
  "slug": "defi-fees",
  "params": {
    "metric": "fees",
    "limit": 5
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for defi-fees; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/defi-fees", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "metric": "fees",
    "limit": 5
  }),
});

Related tools

DeFi protocols ranked by TVL

$0.002 · POST /api/defi-protocols

DeFi protocols ranked by current TVL from DefiLlama's free protocol list: filter by category (Lending, Dexs, Liquid Stak…

DeFi TVL by chain

$0.002 · POST /api/defi-chains

Blockchains ranked by DeFi TVL from DefiLlama's free chain list: name, TVL in USD, share of total DeFi TVL, native token…

DEX volume by protocol

$0.001 · POST /api/defi-dex-volume

Decentralized exchanges ranked by 24h spot trading volume from DefiLlama's free DEX overview: per-DEX 24h/7d/30d/1y/all-…

Onchain options volume by protocol

$0.002 · POST /api/options-volume

Onchain options protocols ranked by 24h notional volume from DefiLlama's options overview: per-protocol 24h, 7d and 30d …

DeFi chain TVL history

$0.002 · POST /api/defi-chain-tvl-history

Daily TVL history for one chain (Ethereum, Base, Solana, Arbitrum...) or for all of DeFi (chain "all") from DefiLlama's …

DeFi protocol profile

$0.002 · POST /api/defi-protocol

Profile of one DeFi protocol by DefiLlama slug (aave-v3, uniswap-v3, lido, morpho-v1...): TVL rank among all protocols, …