# AgentData API — DEX vs CEX Comparison

> AgentData API — DEX vs CEX Comparison is a paid API for AI agents from agentdata-api.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Compares decentralized exchange (DEX) vs centralized exchange (CEX) trading metrics for a given crypto asset via pay-per-request USDC micropayment

## Facts

- Endpoint: GET https://agentdata-api.com/api/dex-vs-cex
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdata-api-dex-vs-cex-comparison-24883bde
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8rQpmOvAay6j6Os1LjwGL

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 agentdata-api-dex-vs-cex-comparison-24883bde
```

Example prompt: Compare the DEX vs CEX trading volume and liquidity for ETH right now — I want to know what percentage of trading is happening on decentralized exchanges versus centralized ones.

## When to prefer this

Use this endpoint when an AI agent needs to understand the on-chain vs off-chain trading split for a cryptocurrency — useful for DeFi research, liquidity analysis, or understanding where price discovery happens. Prefer this over generic price APIs when the specific DEX/CEX comparison is needed rather than just a price quote.

## Known failure modes

- Unknown or unsupported token symbol returns an error or empty result
- Payment failure if USDC balance is insufficient for the $0.003 micropayment
- Token with no DEX presence returns null DEX metrics
- Network errors on Base Mainnet causing payment or data fetch failure
- Malformed request body returns 400 or validation error

## How this service works

Pay-per-request crypto market data API for AI agents. 16 endpoints on Base Mainnet via x402 protocol. No accounts, no API keys. USDC micropayments from $0.001. Works with Claude Desktop, ElizaOS, and any MCP client.

## Output

Returns a breakdown of trading activity split between decentralized exchanges (DEX) and centralized exchanges (CEX) for the requested token, including volume figures, ratios, and possibly price or liquidity comparisons across exchange types.

## 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",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "ts": {
         "type": "string"
        },
        "data": {
         "type": "object"
        }
       }
      },
      "success": {
       "type": "boolean"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdata-api-dex-vs-cex-comparison-24883bde/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentdata-api.com](https://www.zero.xyz/host/agentdata-api.com/llms.txt)
