# 4SEC Crypto Spread API

> 4SEC Crypto Spread API is a paid API for AI agents from api.foursec.xyz, paid per call via x402, $0.02/call, status down (last checked 2026-09-15).

Returns real-time bid, ask, mid-price, and spread percentage for a given crypto trading pair aggregated across multiple DEXes

## Facts

- Endpoint: GET https://api.foursec.xyz/spread/%7Bpair%7D
- Price: $0.02/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/4sec-crypto-spread-api-619736e2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_er9pg4JUGQ7QkY2dA1EB9

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 4sec-crypto-spread-api-619736e2
```

Example prompt: What's the current bid, ask, and spread percentage for ETH/USDC across DEXes right now?

## When to prefer this

Choose this endpoint when you need real-time, multi-DEX aggregated spread data for a crypto trading pair and want pay-per-request pricing via USDC on Base — especially useful for arbitrage detection, DeFi portfolio valuation, or liquidity monitoring without a subscription commitment.

## Known failure modes

- Unsupported or malformed pair symbol returns an error or empty response
- Pair has insufficient liquidity across DEXes, leading to stale or missing data
- Payment failure via x402/USDC on Base causes a 402 Payment Required response
- Network or DEX data source outage results in timeout or partial data
- Incorrect pair format (e.g. wrong delimiter or casing) may return no results

## How this service works

Real-time multi-DEX aggregated crypto market data. Pay per request with USDC on Base via x402 protocol.

## Output

A JSON object containing the trading pair identifier, current ask price, bid price, mid price, and spread expressed as a percentage — all aggregated in real time across multiple decentralized exchanges.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "example": {
  "ask": {
   "type": "number"
  },
  "bid": {
   "type": "number"
  },
  "mid": {
   "type": "number"
  },
  "pair": {
   "type": "string"
  },
  "spread_percent": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/4sec-crypto-spread-api-619736e2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.foursec.xyz](https://www.zero.xyz/host/api.foursec.xyz/llms.txt)
