DeFi protocol fees and revenue
POST /api/defi-feesProtocols 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. Keyless public data.
Input
| Field | Type | Description |
|---|---|---|
chain | string | Optional chain scope as DefiLlama names it (Ethereum, Base, Solana, Arbitrum, BSC, OP Mainnet...). Case-insensitive; common aliases accepted. Omit for all chains. |
category | string | Optional category filter (Dexs, Lending, Derivatives, Liquid Staking, ...). Case-insensitive exact match. |
search | string | Optional name/slug substring filter (case-insensitive). |
type | string | Row type: "protocol" (default), "chain" (chain-level rows such as network gas fees), or "all". |
limit | number | Rows to return (default 25, max 100). |
metric | string | "fees" (default) or "revenue". |
Example output
{
"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
}
]
}
Try it - see the 402 challenge (free)
curl -i -X POST https://agent402.tools/api/defi-fees \
-H "Content-Type: application/json" \
-d '{"metric":"fees","limit":5}'
The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:
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();
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
Crypto order book
GET /api/crypto-orderbookL2 order-book snapshot for a spot pair: best bid/ask, mid price, spread (absolute + %), and the top N aggregated price l…
try in playground →Stablecoin peg monitor
GET /api/stablecoin-pegLive $1-peg deviation for the top USD stablecoins (USDT, USDC, USDS, DAI, USDe, PYUSD, USDD, TUSD, FDUSD by default, or …
try in playground →Wallet balance (native + ERC-20)
POST /api/wallet-balanceLook up the native coin balance (ETH/MATIC) plus every ERC-20 holding for a wallet address on Ethereum, Base, Polygon, A…
try in playground →