DefiLlama fees and revenue

GET https://api.api.sh/defillama/v1/fees
1 credit / call finance & crypto try it in the playground →

Fees and revenue by protocol or chain. Without slug: the market totals and every protocol ranked, each with fees and revenue for 24 hours, 7 and 30 days, a year and all time, changes, chains and methodology; all chains or one chain, optionally one category. With slug: that protocol's fees and revenue with changes, sub-protocols, methodology and the breakdown by chain. Pass next_page back as page.

Every response includes credits_used: the credits this call cost.

Parameters

nametypedescription
slug string One protocol (the name in defillama.com/fees/<slug>); omit for the ranked list. Example: uniswap
chain string One chain (default all); with slug, only that chain's breakdown. Example: ethereum
category string List only: protocols of this category.
sort fees_24h | fees_7d | fees_30d | fees_1y | revenue_24h | revenue_7d | revenue_30d | revenue_1y | change_1d | change_7d | change_1m List only: fees_24h (default), fees_7d, fees_30d, fees_1y, revenue_24h, revenue_7d, revenue_30d, revenue_1y, change_1d, change_7d or change_1m.
order asc | desc List only: asc or desc (default desc).
limit integer List only: results per page, 1-500 (default 50). Example: 50
page integer List only: page number, starting at 1. Example: 1

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/defillama/v1/fees?slug=uniswap" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.