RAKLEdocs
API Reference

Errors

Error codes, HTTP statuses, the error response shape, and rate limiting.

View as Markdown

Response shape

Every error — REST or failed stream event — uses one public code. REST errors return:

{
  "error": {
    "code": "invalid_request",
    "message": "human-readable summary",
    "status": 422
  }
}

A failed SSE frame carries the same code (no status).

Codes

CodeHTTPCauseWhat to do
invalid_request422YouBad body — wrong shape, missing query, bad geography, non-HTTPS webhook_url.
auth_required401YouSend valid X-Orakle-API-Key.
job_not_found404YouWrong or unowned job id.
rate_limited429YouHonor Retry-After.
insufficient_data422ExternalNot enough market data. Retry or refine.
service_unavailable503UsDispatch failure. Retry with backoff.
internal_error500UsRetry; contact support if persistent.

You — fix request. Us — transient. External — upstream limit.

Rate limiting

Capped per minute and per hour, by API key. Health and webhook endpoints exempt. Exceeding returns:

HTTP/1.1 429 Too Many Requests
Retry-After: 30

{ "error": { "code": "rate_limited", "message": "Rate limit exceeded. Max N requests per minute.", "status": 429 } }

Wait at least Retry-After seconds before retrying. SDKs back off automatically.