API Reference
API Overview
Base URL
https://api.settled.pro/v1
Health Check
curl https://api.settled.pro/health
{
"status": "ok",
"timestamp": "2026-03-18T09:30:00Z",
"components": {
"postgres": "ok",
"redis": "ok"
}
}
Response Envelope
Every endpoint returns this structure:
{
"data": { ... },
"meta": { "page": 1, "limit": 20 },
"error": null
}
data contains the result. meta contains pagination info (when applicable). error is null on success.
Error Format
{
"data": null,
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Not enough USDC to place this trade",
"status": 422
}
}
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
INVALID_INPUT | 400 | Bad request parameters |
UNAUTHORIZED | 401 | Missing or invalid auth |
NOT_FOUND | 404 | Market or series not found |
MARKET_CLOSED | 422 | Market is not in a tradeable state |
INSUFFICIENT_BALANCE | 422 | Not enough USDC |
RATE_LIMITED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Server error |
Rate Limits
| Endpoint type | Limit |
|---|---|
| Public | 60 req/min per IP |
| Authenticated | 300 req/min per API key |
| Trading | 10 req/sec per user |
| WebSocket | 5 connections per IP |
Rate limit headers on every response:
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 298
X-RateLimit-Reset: 1773800000