# Agent402 DeFi DEX Volume

> Agent402 DeFi DEX Volume is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Fetches ranked DEX and DeFi protocol trading volume data across chains, with 24h/7d/30d/1y metrics and percentage changes, sourced from DefiLlama.

## Facts

- Endpoint: POST https://agent402.tools/api/defi-dex-volume
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-defi-dex-volume-c6f77c16
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Yq6or5DkgTlB407F-BCY5

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 agent402-defi-dex-volume-c6f77c16 -d '<json body>'
```

Example prompt: What are the top 10 DEXes on Base by 24-hour volume right now, including their 7-day and 30-day volume figures and recent percentage changes?

## When to prefer this

Use this endpoint when you need structured, ranked DEX or DeFi protocol volume data with multi-timeframe metrics (24h, 7d, 30d, 1y) and trend percentages, especially when filtering by chain or category. It's ideal over raw DefiLlama API access when you want pay-per-call pricing with no API key, or when building agent workflows that need clean, ranked volume snapshots. Prefer it over general crypto price endpoints when the question is about protocol-level trading activity rather than asset prices.

## Known failure modes

- Invalid chain name returns empty results or error — use DefiLlama-style chain names like 'OP Mainnet' not 'Optimism'
- Limit exceeding 100 may be clamped or rejected
- Unknown category string returns no results — category must match DefiLlama taxonomy exactly (case-insensitive)
- Data may be cached and slightly delayed — fetchedAt timestamp indicates freshness
- Network or upstream DefiLlama outage may result in stale or failed response

## How this service works

Decentralized exchanges ranked by 24h spot volume with 7d, 30d, 1y and all-time volume, change, the chains each trades on and sector totals. Use it when an agent needs to know where onchain spot volume is happening or how a DEX's share is moving.

## Output

A JSON object containing an array of ranked DeFi protocol/DEX entries, each with name, slug, chains, category, chain count, and volume figures for 24h, 7d, 30d, and 1y in USD, plus percentage changes for 1d, 7d, and 1m. Also includes aggregate totals, matched count, source attribution (DefiLlama), chain scope, and a fetchedAt timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "type": {
   "type": "string",
   "description": "Row type: \"protocol\" (default), \"chain\" (chain-level rows such as network gas fees), or \"all\"."
  },
  "chain": {
   "type": "string",
   "description": "Optional chain scope as DefiLlama names it (Ethereum, Base, Solana, Arbitrum, BSC, OP Mainnet...). Case-insensitive; common aliases accepted. Omit for all chains."
  },
  "limit": {
   "type": "number",
   "description": "Rows to return (default 25, max 100)."
  },
  "search": {
   "type": "string",
   "description": "Optional name/slug substring filter (case-insensitive)."
  },
  "category": {
   "type": "string",
   "description": "Optional category filter (Dexs, Lending, Derivatives, Liquid Staking, ...). Case-insensitive exact match."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "dexs": [
   {
    "name": "Aerodrome Slipstream",
    "rank": 1,
    "slug": "aerodrome-slipstream",
    "chains": [
     "Base"
    ],
    "category": "Dexs",
    "chainCount": 1,
    "total1yUsd": 250000000000,
    "total7dUsd": 4500000000,
    "change1dPct": -2.5,
    "change1mPct": 9.8,
    "change7dPct": 3.9,
    "total24hUsd": 600000000,
    "total30dUsd": 20000000000,
    "protocolType": "protocol",
    "totalAllTimeUsd": 400000000000
   }
  ],
  "unit": "USD",
  "chain": "Base",
  "count": 1,
  "cached": true,
  "source": "defillama-dexs",
  "totals": {
   "total7dUsd": 9000000000,
   "change1dPct": -3.1,
   "change1mPct": 11,
   "change7dPct": 4.2,
   "total24hUsd": 1200000000,
   "total30dUsd": 40000000000
  },
  "matched": 60,
  "fetchedAt": "2026-08-22T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-defi-dex-volume-c6f77c16/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
