Get the DEX trading volume of a chain
/v1/chains/{chain}/defi/dexsCall this for a chain's decentralized exchange volume in US dollars: DefiLlama's headline totals, the daily volume over the last days days (30, 90 or 365, 90 by default) and the 15 DEX protocols with the most volume in the last 24 hours. The headline totals and the protocol rows are DefiLlama's own and are not summed from the daily items. The last item is the current UTC day. Read from DefiLlama 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. |
| coverage | array of strings | The codes of the limits that apply to this answer, in a fixed order. It is empty when none applies. |
| items | array of objects | Daily volume, oldest first. |
| kind | string | chain_dex_volume |
| protocols | array of objects | Up to 15 DEX protocols with volume in the last 24 hours, largest first. |
| total_24h_usd | number | null | DefiLlama's headline for the chain. |
| total_30d_usd | number | null | |
| total_7d_usd | number | null |
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.