{"uid":"cap_wiIi4dZzNJUA_NwSUPZ2U","slug":"agent402-defi-fees-revenue-data-0848cc9f","name":"Agent402 DeFi Fees & Revenue Data","description":"Protocols ranked by fees paid by users or by revenue kept, with 24h, 7d, 30d, 1y and all-time totals, change, category and chains, and chain-level gas fees on request. Use it when an agent is comparing protocols on real usage rather than TVL or valuing a token against the fees its protocol earns.","url":"https://agent402.tools/api/defi-fees","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"type":{"type":"string","description":"Row type: \"protocol\" (default), \"chain\" (chain-level rows such as network gas fees), or \"all\"."},"chain":{"type":"string","description":"Optional chain scope as DefiLlama names it (Ethereum, Base, Solana, Arbitrum, BSC, OP Mainnet...). Case-insensitive; common aliases accepted. Omit for all chains."},"limit":{"type":"number","description":"Rows to return (default 25, max 100)."},"metric":{"type":"string","description":"\"fees\" (default) or \"revenue\"."},"search":{"type":"string","description":"Optional name/slug substring filter (case-insensitive)."},"category":{"type":"string","description":"Optional category filter (Dexs, Lending, Derivatives, Liquid Staking, ...). Case-insensitive exact match."}}},"responseSchema":{"type":"json","example":{"unit":"USD","chain":null,"count":1,"cached":true,"chains":["Solana","Ethereum","Base"],"metric":"fees","source":"defillama-fees","totals":{"total7dUsd":423480844,"change1dPct":6.68,"change1mPct":10.2,"change7dPct":2.1,"total24hUsd":75393517,"total30dUsd":1800000000},"matched":2500,"fetchedAt":"2026-08-22T12:00:00.000Z","protocols":[{"name":"Tether","rank":1,"slug":"tether","chains":["Ethereum"],"category":"Stablecoin Issuer","chainCount":1,"total1yUsd":5800000000,"total7dUsd":111368600,"change1dPct":0,"change1mPct":1.2,"change7dPct":-0.03,"total24hUsd":15900806,"total30dUsd":481404902,"protocolType":"protocol","totalAllTimeUsd":20000000000}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_C-Nw1YVh2FTILy6JpyI8d","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches live DeFi protocol and chain-level fee and revenue metrics from DefiLlama, filterable by chain, category, and metric type","exampleAgentPrompt":"Pull the top 10 DeFi protocols on Ethereum ranked by fees, filtered to just DEXs, and show me their 24-hour and 7-day fee totals.","exampleUseCases":[{"title":"DeFi protocol fee leaderboard","prompt":"Show me the top 25 DeFi protocols by fees generated across all chains over the last 7 days, including their 24-hour numbers and month-over-month change."},{"title":"Chain-specific lending revenue analysis","prompt":"What are the top lending protocols on Arbitrum ranked by revenue? Give me up to 10 results with their 30-day and 7-day revenue figures."},{"title":"Solana ecosystem fee monitoring","prompt":"Get all protocol-level fee data for Solana and show me which ones have had the biggest 1-day percentage change — I want to spot any unusual spikes."}],"resultDescription":"Returns a JSON object with aggregate fee/revenue totals (24h, 7d, 30d) and percentage changes at the summary level, plus a paginated list of protocols or chains each containing name, slug, rank, category, chain breakdown, and granular fee/revenue figures across multiple time windows (24h, 7d, 30d, 1y, all-time), sourced from DefiLlama.","failureModes":["Invalid chain name returns empty or unfiltered results","Limit exceeding 100 is clamped or returns an error","Unknown category string produces zero results (case-insensitive exact match required)","Stale cache may cause fetchedAt timestamp to lag real-time by minutes","Payment failure (insufficient USDC) results in 402 response before any data is returned"],"whenToPreferThis":"Use this endpoint when you need structured, ranked DeFi fee or revenue data with filtering by chain, category, or protocol name — especially when you want multi-window time comparisons (24h/7d/30d/1y) in one call. Prefer it over raw DefiLlama API calls when you need a pay-per-call, no-signup interface with pre-normalized output. It's ideal for agent workflows that need to rank protocols, detect fee spikes, or compare chains without managing API keys.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:47:17.712Z","isFirstParty":false}