# CoinEx Exchange API
> Live spot market data from CoinEx, a global crypto exchange, served straight from its public v2 API with no key and nothing cached. The ticker endpoint returns a market's last price, open, 24-hour high and low, 24-hour change and base and quote volume. The tickers endpoint returns every spot market for a quote currency ranked by 24-hour quote volume, so one call surfaces the most-traded pairs on the venue. The markets endpoint lists the tradable pairs with their maker and taker fees, base and quote precision and minimum order size. The book endpoint returns live order-book depth — every bid and ask level with price and amount, plus the best bid/ask and spread. Everything is read live from CoinEx on each request, nothing stored. A distinct global venue, separate from the other exchange feeds on the marketplace. Ideal for trading bots, price tickers, arbitrage scanners, portfolio trackers and market dashboards. Markets accept either BTC_USDT or BTCUSDT. Live, no key. 4 spot endpoints. For candles or perpetuals use an OHLC or derivatives API.

## 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/coinex-api/..."
```

## Pricing
- **Free** (Free) — 5,100 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 91,000 calls/Mo, 6 req/s
- **Pro** ($24/Mo) — 470,000 calls/Mo, 18 req/s
- **Business** ($56/Mo) — 2,880,000 calls/Mo, 45 req/s

## Endpoints

### Market

#### `GET /v1/book` — Live order-book depth

**Parameters:**
- `market` (query, required, string) — Market BTC_USDT or BTCUSDT Example: `BTC_USDT`
- `limit` (query, optional, string) — Levels (snaps to 5/10/20/50) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/coinex-api/v1/book?market=BTC_USDT&limit=20"
```

#### `GET /v1/markets` — Tradable pairs with fees and limits

**Parameters:**
- `quote` (query, optional, string) — Filter by quote currency Example: `USDT`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/coinex-api/v1/markets?quote=USDT"
```

#### `GET /v1/ticker` — Ticker for one market

**Parameters:**
- `market` (query, required, string) — Market BTC_USDT or BTCUSDT Example: `BTC_USDT`
- `symbol` (query, optional, string) — Base coin (alternative to market) Example: `BTC`
- `quote` (query, optional, string) — Quote currency for symbol Example: `USDT`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/coinex-api/v1/ticker?market=BTC_USDT&symbol=BTC&quote=USDT"
```

#### `GET /v1/tickers` — All spot markets for a quote by volume

**Parameters:**
- `quote` (query, optional, string) — Quote currency (default USDT) Example: `USDT`
- `limit` (query, optional, string) — Max markets (default 50) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/coinex-api/v1/tickers?quote=USDT&limit=50"
```

### Meta

#### `GET /v1/meta` — Spec

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


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