DeFi protocols API

Protocol history breakdown brief: a protocol's largest parts over time

The 10 largest chains, versions, fee kinds or tokens of one protocol's TVL, fees, revenue, volume or treasury.

GET/api/external/protocol-analysis/protocol-history-breakdown-brief/{slug}

What it returns

The brief of protocol-history-breakdown; prefer it unless you need every day or more parts. The same protocol, metric, split and window: the 10 largest parts, in that endpoint's ranking, each thinned to at most 30 of its points evenly spaced over its days, the first and the newest always kept, with how many days it holds and, for fees, revenue and volume, its total over the window. partsRanked still counts every part the window names.

Chains

This endpoint is not tied to a chain: it takes no chain in its request.

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/protocol-analysis/protocol-history-breakdown-brief/<slug>"
Parameters
ParameterDescription
metric

query · string · optional

Which series. tvl: the value locked. fees: what users paid. revenue: the part of the fees the protocol kept. volume: what was traded on it. treasury: what the protocol itself holds. Defaults to tvl.tvlfeesrevenuevolumetreasury
by

query · string · optional

How to split it. tvl: chain; fees: chain, version, label; revenue: chain, version, label; volume: chain, version; treasury: chain, token. Defaults to chain.chainversionlabeltoken
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 parts to return, largest first, 1 to 50. Defaults to 10.
slug

path · string · required

A DeFi protocol's slug, e.g. "pancakeswap-amm" — not a token mint or contract address, and not scoped to any single chain.

Response fields

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

Response fields of Protocol history breakdown brief: a protocol's largest parts over time
FieldTypeDescription
slugstringThe protocol asked about.
metricstringThe series returned.
bystringHow it is split.
daysstringThe window returned.
partsRankedintegerHow many parts the window names, before limit is applied.
partsobject[]The 10 largest parts at most, largest first; ties ordered by name.
parts[].namestringThe part: a network (Ethereum), a version (Aave V3), a kind of fee (Borrow Interest) or a token symbol.
parts[].pointCountintegerDays in the part's full series over the window.
parts[].totalUsdnumber | nullThe sum of the part's day totals over the window, in USD, to the cent: over every point, not only the ones listed. Null for tvl and treasury, a value held each day rather than a day total.
parts[].pointsobject[]At most 30 of the part's points, evenly spaced over the days that name it, oldest first; the first and the newest are always kept.
parts[].points[].timestampintegerUnix seconds: 00:00 UTC of the day, except the extra newest tvl and treasury point.
parts[].points[].usdnumberIn USD: the value at that time for tvl and treasury, the day total otherwise.

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