Discovery and markets API

How have DeFi fees, revenue or DEX volume moved, overall or by category?

Daily USD fees, revenue or DEX volume of all DeFi, or fees of one category (lending, DEXs, liquid staking, derivatives, launchpads, aggregators), over 7-365 days or all.

GET/api/external/discovery/defi-category-history

What it returns

A DeFi category's daily total for the metric chosen with metric, over the trailing window in days, across every chain or on the one in chain, oldest first, one point per UTC day dated 00:00 UTC. Without category, the total of every protocol tracked, whatever its kind, across every chain; its fees and revenue include what protocols earn off any chain (for example a stablecoin issuer's income on its reserves), so they run above the sum of the chains' own totals. fees is what users paid the protocols of the category, revenue the part of it the protocols kept (for lending or no category), volume DEX trading volume (for dexs or no category). chain is offered for lending and dexs only; every other category, and no category, is across every chain. The window counts back from the newest point's own day, not from today, and the newest point can be today's partial day. A day missing from the record is left out rather than filled in; a day the record lists as 0 is answered as 0. On a chain with no protocol of the category, points is empty.

Chains

  • Solana SOL
  • Ethereum ETH
  • BNB Chain BNB
  • Base BASE
  • Stable STABLE
  • Robinhood Chain RHC
  • Arc ARC

Request

Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.

curl -H "x-dex-data-key: $DEXDATA_API_KEY" \
  "https://api.dexdata.io/api/external/discovery/defi-category-history"
Parameters
ParameterDescription
category

query · string · optional

The kind of protocol: lending, dexs (exchanges), liquid-staking, derivatives, launchpad or dex-aggregator. Omit for every protocol, whatever its kind.lendingdexsliquid-stakingderivativeslaunchpaddex-aggregator
chain

query · string · optional

Only the category's figures on this chain, for lending and dexs only. Omit for every chain.
metric

query · string · optional

fees: what users paid. revenue: what the protocols kept, with category=lending or no category. volume: DEX trading volume, with category=dexs or no category. Defaults to fees.feesrevenuevolume
days

query · string · optional

How many trailing days to return, or all for the whole series. Defaults to 90. days ≤ 365 keeps the answer under 32 KB.73090180365all

Response fields

A JSON response. Every field is always present; null means the value could not be established, never zero.

Response fields of How have DeFi fees, revenue or DEX volume moved, overall or by category?
FieldTypeDescription
categorystring | nullThe category asked about, or null for every protocol.
chainstring | nullThe chain asked about, or null for every chain.
metricstringThe series returned.
daysstringThe window returned.
pointsobject[]Oldest first, one per day.
points[].timestampintegerUnix seconds, 00:00 UTC of the day.
points[].usdnumberThe day's total in USD.

Start building with DexData today

Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.

Get a free API key