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.
/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>"
| Parameter | Description |
|---|---|
metricquery · 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 |
byquery · 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 |
daysquery · string · optional | How many trailing days to return, or all for the whole series. Defaults to 90.73090180365all |
limitquery · integer · optional | How many parts to return, largest first, 1 to 50. Defaults to 10. |
slugpath · 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.
| Field | Type | Description |
|---|---|---|
slug | string | The protocol asked about. |
metric | string | The series returned. |
by | string | How it is split. |
days | string | The window returned. |
partsRanked | integer | How many parts the window names, before limit is applied. |
parts | object[] | The 10 largest parts at most, largest first; ties ordered by name. |
parts[].name | string | The part: a network (Ethereum), a version (Aave V3), a kind of fee (Borrow Interest) or a token symbol. |
parts[].pointCount | integer | Days in the part's full series over the window. |
parts[].totalUsd | number | null | The 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[].points | object[] | 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[].timestamp | integer | Unix seconds: 00:00 UTC of the day, except the extra newest tvl and treasury point. |
parts[].points[].usd | number | In 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