Get the total value locked of a chain, by day
/v1/chains/{chain}/defi/tvlCall this for a chain's DeFi TVL history. current_usd is the last point, DefiLlama's TVL of the chain now. change_1d_pct and change_7d_pct compare it with the point 1 and 7 days before it, and are null when that day is missing. days is 30, 90, 365 or all (every day DefiLlama has), 90 by default. The last item is the current UTC day, still in progress. Ethereum, Monad and Arc are served. The figures come from DefiLlama and are read every hour. Sona keeps an answer for 10 minutes.
Path parameters
| Name | Type | Description |
|---|---|---|
chainRequired | string | The chain, as a CAIP-2 chain ID. Ethereum, |
Query parameters
| Name | Type | Description |
|---|---|---|
days | stringDefault 90 | How many days of history: |
Response
The answer, wrapped in the {data, meta, links} envelope.
| Field | Type | Description |
|---|---|---|
| chain | string | A chain ID in the CAIP-2 format |
| change_1d_pct | number | null | A percent change rounded to 2 decimals, null when it cannot be computed. |
| change_7d_pct | number | null | A percent change rounded to 2 decimals, null when it cannot be computed. |
| coverage | array of strings | The codes of the limits that apply to this answer, in a fixed order. It is empty when none applies. |
| current_usd | number | |
| items | array of objects | Oldest first. |
| kind | string | chain_tvl |
Cost
1 credit. The time limit is 5 seconds.
Errors
| Status | Code |
|---|---|
| 400 | invalid_idinvalid_query |
| 404 | unsupported_chain |
| 429 | rate_limitedcredits_exhausted |
| 500 | internal |
| 503 | upstream_unavailable |
| 504 | deadline_exceeded |
400 invalid_id, 400 invalid_query for a days that is not listed or another query key, 404 unsupported_chain, 429 rate_limited or credits_exhausted, 503 upstream_unavailable before the first refresh, and 504 deadline_exceeded.