Discovery and markets API

How much does a DeFi category earn, and which protocols lead it?

A DeFi category's fees, revenue or DEX volume in USD over 24 hours, 7 days or 30 days, overall or on one chain, with its protocols ranked.

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

What it returns

A DeFi category's total for the metric chosen with metric, over the trailing window in window, and its protocols ranked largest first, across every chain or on the one in chain. fees is what users paid the protocols, revenue the part of those fees they kept, volume DEX trading volume (for category=dexs only). totalUsd is the sum over the protocols that carry a figure. A protocol with no figure for the window is left out rather than ranked as zero. On a chain with no protocol of the category, protocols is empty and totalUsd is null.

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-metrics?category=dexs"
Parameters
ParameterDescription
category

query · string · required

The kind of protocol: dexs (exchanges), lending, liquid-staking, derivatives (perpetuals and other derivatives venues), launchpad (token launch platforms), dex-aggregator.dexslendingliquid-stakingderivativeslaunchpaddex-aggregator
chain

query · string · optional

Only the protocols on this chain, with their figures there. Omit for every chain.
metric

query · string · optional

fees: what users paid. revenue: the part of the fees the protocol kept. volume: DEX trading volume, only with category=dexs. Defaults to fees.volumefeesrevenue
window

query · string · optional

The trailing window the figures cover: the last 24 hours, 7 days or 30 days. Defaults to 24h.24h7d30d
limit

query · integer · optional

How many protocols to return, 1 to 100. Defaults to 25.

Response fields

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

Response fields of How much does a DeFi category earn, and which protocols lead it?
FieldTypeDescription
categorystringThe category asked about.
chainstring | nullThe chain asked about, or null for every chain.
metricstringWhat the figures measure.
windowstringThe window the figures cover.
totalUsdnumber | nullThe category's total for the metric and window, in USD. null when no protocol carries a figure.
protocolsRankedintegerHow many protocols carry a figure for the window, before limit is applied.
protocolsobject[]Largest first; ties ordered by slug.
protocols[].rankinteger1 for the largest figure.
protocols[].slugstringThe protocol's id, lowercase and hyphenated.
protocols[].namestringThe protocol's display name.
protocols[].usdnumberThe protocol's figure over the window, 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