Discovery and markets API
How has the value locked in DeFi moved over time, overall or on one chain?
Daily USD total value locked in DeFi across every chain or on one chain, over 7-365 days or the whole record back to 2017.
/api/external/discovery/defi-tvl-historyWhat it returns
The USD value locked in DeFi protocols, one reading per UTC day dated 00:00 UTC, oldest first, over the trailing window in days, across every chain or on the one in chain. Liquid staking and value counted twice (a deposit that is itself a receipt of another protocol) are left out, so a chain's figure here can sit below a headline value-locked number that includes them; chain-stats publishes the current headline figure. The window counts back from the newest point's own day, not from today, and the newest point can be today's reading, which moves until the day ends. The earliest days of the series can read 0.
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-tvl-history"
| Parameter | Description |
|---|---|
chainquery · string · optional | Only the value locked on this chain. Omit for every chain the record follows. |
daysquery · 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.
| Field | Type | Description |
|---|---|---|
chain | string | null | The chain asked about, or null for every chain. |
days | string | The window returned. |
points | object[] | Oldest first, one per day. Never empty. |
points[].timestamp | integer | Unix seconds, 00:00 UTC of the day. |
points[].usd | number | The value locked that day, 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