Resources

Errors

Errors use standard HTTP status codes with a JSON body. The body never leaks internals — just a stable code and a human message.

Error shape

Live REST data routes return the same typed error envelope as the SDP WebSocket protocol. Gateway errors (401 / 402 / 403 / 429) come from the API gateway and use its own { "message": "…" } envelope.

json
{
  "type": "error",
  "code": 1010,
  "message": "requested history is outside the plan window",
  "details": { "action": "fetch_price_history" }
}

Status codes

CodeMeaningNotes
200OKRequest succeeded.
400Bad requestMalformed query — check param types.
401UnauthorizedMissing or invalid API key.
402Payment requiredReserved for a future x402 route; none is deployed publicly.
403ForbiddenYour tier can't reach this surface (see Access tiers).
404Not foundUnknown or undeployed route.
429Too many requestsRate limited — honor Retry-After.
500Internal server errorUnexpected backend failure.
503Service unavailableA soft dependency (e.g. history store) is disabled or down.
504Gateway timeoutA bounded backend query timed out.

Soft dependencies

Some surfaces depend on optional infrastructure. If the history store is disabled or unavailable, history returns 503 with the typed error envelope above. Live streams are independent of the cold-history store. Treat 503 as retriable but back off.