Discovery and markets API

Which protocols earn the fees or DEX volume of a category or chain, over time?

Each protocol's daily USD fees, revenue or DEX volume within a DeFi category, on a chain, or both, largest first, over 7-365 days or all.

GET/api/external/discovery/protocol-share-history

What it returns

One daily series per protocol for the metric chosen with metric, within the DeFi category in category, on the chain in chain, or both, over the trailing window in days, largest first. At least one of category and chain is required. fees is what users paid the protocol, revenue the part of it the protocol kept (can be negative), volume DEX trading volume. With a category, the metrics and chains it offers follow defi-category-history; on a chain alone, all three metrics are offered. Points are one total per UTC day dated 00:00 UTC, oldest first, and the newest can be today's partial day; the window counts back from the newest day, not from today. A protocol holds only the days that name it: a missing day is left out, never shown as 0. Protocols are ranked by their total over the window; partsRanked says how many the window names before limit. On one chain, the protocols of fees and revenue can add up to slightly more or less than the chain's own total (within 2% over the last 30 days when measured). A category with no protocol on the chain answers an empty parts.

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/protocol-share-history"
Parameters
ParameterDescription
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
category

query · string · optional

Only protocols of this kind: lending, dexs (exchanges), liquid-staking, derivatives, launchpad or dex-aggregator. Omit for every kind, which then needs chain.lendingdexsliquid-stakingderivativeslaunchpaddex-aggregator
chain

query · string · optional

Only figures on this chain; with a category, for lending and dexs only. Omit for every chain, which then needs category.
days

query · string · optional

How many trailing days to return, or all for the whole series. Defaults to 90.73090180365all
limit

query · integer · optional

How many protocols to return, largest first, 1 to 50. Defaults to 10.

Response fields

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

Response fields of Which protocols earn the fees or DEX volume of a category or chain, over time?
FieldTypeDescription
metricstringThe series returned.
categorystring | nullThe category asked about, or null for every kind of protocol.
chainstring | nullThe chain asked about, or null for every chain.
daysstringThe window returned.
partsRankedintegerHow many protocols the window names, before limit is applied.
partsobject[]Largest total first; ties ordered by name. Empty when the window names no protocol.
parts[].namestringThe protocol, by display name (e.g. Aave V3).
parts[].pointsobject[]Oldest first; only the days that name this protocol.
parts[].points[].timestampintegerUnix seconds, 00:00 UTC of the day.
parts[].points[].usdnumberThe protocol's total that day, 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