Base URL
/health) are prefixed with /v1 and require an X-API-Key header.
Authentication
Endpoints
Markets
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/markets | List markets with filters |
| GET | /v1/markets/search | Full-text search with advanced filters |
| GET | /v1/markets/{id} | Get a single market |
Market Data
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/markets/{id}/price | Current or historical price |
| GET | /v1/markets/{id}/orderbook | Live orderbook |
| GET | /v1/markets/{id}/orderbook/history | Historical orderbook snapshots |
| GET | /v1/markets/{id}/trades | Trade history |
| GET | /v1/markets/{id}/candles | OHLCV candlestick data |
Events
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/events | List events (grouped markets) |
| GET | /v1/events/{slug} | Get event with child markets |
WebSocket
| Protocol | Endpoint | Description |
|---|---|---|
| WS | /v1/ws | Real-time trades, prices, orderbook |
System
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Health check (no auth) |
| GET | /v1/stats | Database statistics |
Pagination
List endpoints use offset-based pagination:Errors
| Status | Meaning |
|---|---|
| 400 | Bad request (invalid params) |
| 401 | Missing or invalid API key |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
| 500 | Server error |