# Crypto Pairs Trading & Spread API
> The statistical-arbitrage signal between two coins — how stretched their price ratio is versus its own recent average, computed live from Binance daily candles (no key, nothing stored). Pairs traders do not bet on direction; they bet on the spread between two correlated coins reverting to its mean. When ETH/BTC (or any ratio) runs two standard deviations above its average, the spread is stretched — short the rich leg, long the cheap one, and profit when it snaps back. The spread endpoint takes two coins and returns the current price ratio, its rolling mean and standard deviation, the z-score (how many standard deviations stretched), the return correlation of the two coins (pairs trading works on correlated pairs) and a long/short mean-reversion signal. The screener endpoint scans every pair in a liquid basket and ranks them by absolute z-score — the most stretched, most tradeable spreads right now. The coins endpoint lists what is covered. The pairs-trading / relative-value spread cut for crypto — distinct from the correlation-&-beta API (which gives the correlation matrix, not the tradeable spread), the single-coin momentum, the funding-arbitrage and the price APIs. It answers whether a spread is stretched, not whether two coins move together.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/cryptopairs-api/..."
```

## Pricing
- **Free** (Free) — 640 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 16,400 calls/Mo, 6 req/s
- **Pro** ($35/Mo) — 86,500 calls/Mo, 18 req/s
- **Business** ($82/Mo) — 455,000 calls/Mo, 45 req/s

## Endpoints

### Spread

#### `GET /v1/spread` — Two coins ratio z-score, correlation and mean-reversion signal

**Parameters:**
- `a` (query, required, string) — First coin (numerator) Example: `ETH`
- `b` (query, required, string) — Second coin (denominator) Example: `BTC`
- `window` (query, optional, string) — Lookback in days (20-365) Example: `90`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cryptopairs-api/v1/spread?a=ETH&b=BTC&window=90"
```

### Screener

#### `GET /v1/screener` — Every pair in a basket ranked by absolute z-score

**Parameters:**
- `window` (query, optional, string) — Lookback in days (20-365) Example: `90`
- `coins` (query, optional, string) — Optional basket (2-15 coins) Example: `BTC,ETH,SOL,AVAX`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cryptopairs-api/v1/screener?window=90&coins=BTC%2CETH%2CSOL%2CAVAX"
```

### Coins

#### `GET /v1/coins` — Supported coins

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cryptopairs-api/v1/coins"
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cryptopairs-api/v1/meta"
```


---
Marketplace page: https://www.oanor.com/api/cryptopairs-api
OpenAPI spec: https://www.oanor.com/api/cryptopairs-api/openapi.json
