Errors
All errors return JSON with the same envelope.
Envelope
json
{
"error": {
"status": 404,
"message": "contract not found"
}
}Status codes
| Status | Meaning | Common causes |
|---|---|---|
| 400 | Bad request | Missing required query param, invalid JSON body, invalid window value |
| 401 | Unauthenticated | Missing API key, revoked key, malformed prefix |
| 403 | Forbidden | Plan doesn't allow this endpoint; key lacks the required scope |
| 404 | Not found | Unknown contract id, ticker, or signal |
| 429 | Rate limited | Exceeded per-key sliding window; back off until X-RateLimit-Reset |
| 500 | Server error | Bug on our side; retry once and report if it persists |
Recommended client behaviour
- 4xx: surface the message verbatim — they're written to be human-readable.
- 429: retry-after using
X-RateLimit-Reset; consider exponential backoff if multiple in a row. - 5xx: retry up to 3 times with exponential backoff (1s, 2s, 4s).