# DefiLlama DEX Volumes by Chain

> DefiLlama DEX Volumes by Chain is a paid API for AI agents from defillama.use.x402atlas.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns decentralized-exchange trading volume data for a single specified blockchain chain, including daily and total volume metrics with optional time-series and per-protocol breakdowns.

## Facts

- Endpoint: GET https://defillama.use.x402atlas.com/dexs-chain
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defillama-dex-volumes-by-chain-e6b4716d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DbvAg0YlNG2YeqnlIaRQq

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability defillama-dex-volumes-by-chain-e6b4716d
```

Example prompt: Pull the daily DEX trading volume for Arbitrum from DefiLlama, and skip the aggregate time-series chart so I just get the essentials.

## When to prefer this

Use this endpoint when you need DEX trading volume scoped to a single blockchain chain rather than across all chains. Prefer this over the all-DEX-volumes endpoint when chain-level granularity is required, such as comparing activity on one chain, monitoring a specific network's trading health, or filtering per-protocol volume on a given chain.

## Known failure modes

- Invalid or unrecognized chain slug returns an error or empty result
- Missing required 'chain' query parameter causes a 400-level error
- Chain exists but has no tracked DEX data returns empty or null volume fields
- Invalid dataType value may return unexpected or empty metrics
- Service unavailable or DefiLlama upstream outage returns 5xx error

## How this service works

DEX volumes for one chain by DefiLlama — decentralized-exchange trading volume on a single chain.

## Output

Returns DEX volume data for the requested chain including volume metrics (dailyVolume, totalVolume), optionally a time-series chart of aggregate volume, and optionally a per-protocol breakdown series showing which DEXes contributed what volume on that chain.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "chain"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "pattern": "^[^/?#]+$",
       "maxLength": 100,
       "minLength": 1,
       "description": "Chain slug (e.g. ethereum, arbitrum, solana)"
      },
      "dataType": {
       "type": "string",
       "maxLength": 200,
       "description": "Optional volume metric to return (e.g. dailyVolume, totalVolume)"
      },
      "excludeTotalDataChart": {
       "type": "string",
       "maxLength": 200,
       "description": "Optional; set true to omit the aggregate volume time series"
      },
      "excludeTotalDataChartBreakdown": {
       "type": "string",
       "maxLength": 200,
       "description": "Optional; set true to omit the per-protocol volume breakdown series"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "queried_at",
      "data"
     ],
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "protocols": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "name": {
            "type": "string"
           },
           "chains": {
            "type": "array",
            "items": {
             "type": "string"
            }
           },
           "total24h": {
            "type": "number",
            "description": "24h volume in USD"
           }
          }
         }
        },
        "totalDataChart": {
         "type": "array",
         "description": "Aggregate volume time series (omitted if excludeTotalDataChart=true)"
        }
       },
       "description": "Raw DefiLlama per-chain DEX overview payload",
       "additionalProperties": true
      },
      "queried_at": {
       "type": "string",
       "format": "date-time",
       "description": "When this bridge fetched the upstream data"
      }
     }
 
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "protocols": [
    {
     "name": "Uniswap",
     "chains": [
      "Ethereum"
     ],
     "total24h": 1230000000
    }
   ],
   "totalDataChart": []
  },
  "queried_at": "2026-07-01T12:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defillama-dex-volumes-by-chain-e6b4716d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defillama.use.x402atlas.com](https://www.zero.xyz/host/defillama.use.x402atlas.com/llms.txt)
