# Cross-Exchange Arbitrage Spread Calculator

> Cross-Exchange Arbitrage Spread Calculator is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Computes the price spread, min/max prices, and spread percentage across all CoinGecko-tracked exchanges for any listed coin, identifying venues at each price extreme and the highest-volume exchange.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/arbitrage-spread
- 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/x402-deployer-x402-deployer-workers-dev-4d3a4f7d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_29KYnyOJCex6HBDfdnykX

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 x402-deployer-x402-deployer-workers-dev-4d3a4f7d -d '<json body>'
```

Example prompt: What's the current arbitrage spread for Solana across all tracked exchanges — give me the cheapest and most expensive venues, the spread percentage, and which exchange has the highest volume?

## When to prefer this

Use this endpoint when you need cross-exchange price dispersion or arbitrage spread analysis for any CoinGecko-listed coin. It automatically handles ticker filtering, USD conversion, and venue identification in a single call — ideal for agents that need structured arbitrage intelligence without managing raw CoinGecko ticker data themselves. Prefer over raw CoinGecko API when you need the spread computation done for you rather than raw tick data.

## Known failure modes

- Coin ID not found on CoinGecko — returns error indicating unknown coin
- No valid tickers available after filtering stale/anomalous data — returns empty or insufficient data error
- CoinGecko API rate limit or upstream outage — returns 5xx or timeout
- Coin has very few tracked exchanges — spread may be computed from limited data
- Non-USD base pairs may introduce conversion inaccuracies

## How this service works

Cross-exchange arbitrage spread / max-min price / CEX price dispersion / spread % calculator. For any CoinGecko-listed coin, pulls every tracked exchange ticker, computes the lowest and highest USD-converted prices, the spread %, and identifies which exchanges sit at each extreme plus the highest-volume venue. Filters out stale or anomalous tickers.

## Output

Returns the lowest and highest USD-converted prices for the coin across all active CoinGecko-tracked exchange tickers, the computed spread percentage, the exchange names sitting at each price extreme, the highest-volume venue, and a filtered list of tickers used (stale or anomalous tickers excluded).

## Example request

```json
{
 "input": {
  "body": {
   "coingecko_id": "ethereum"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "coingecko_id"
     ],
     "properties": {
      "target": {
       "type": "string",
       "description": "Quote currency to filter for (e.g. 'USDT'). Optional — converted USD prices are used regardless."
      },
      "coingecko_id": {
       "type": "string",
       "description": "CoinGecko coin id (e.g. 'ethereum', 'bitcoin')."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "source": {
       "type": "string"
      },
      "spread_pct": {
       "type": "number"
      },
      "coingecko_id": {
       "type": "string"
      },
      "ticker_count": {
       "type": "integer"
      },
      "max_price_usd": {
       "type": "number"
      },
      "min_price_usd": {
       "type": "number"
      },
      "top_volume_usd": {
       "type": "integer"
      },
      "lowest_price_exchange": {
       "type": "string"
      },
      "highest_price_exchange": {
       "type": "string"
      },
      "top_exchange_by_volume": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-4d3a4f7d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
