2xx with a JSON body matching the documented schema. Failures are always a single JSON object with an error field and, usually, extra diagnostic context.
Error shape
| Field | Meaning |
|---|---|
error | Human-readable message. Safe to surface to end users. |
code | Machine-readable code, stable across releases. Use this for branching logic. |
request_id | Opaque identifier for server-side tracing. Include it when contacting support. |
Status codes
| Status | Meaning | Typical cause | What to do |
|---|---|---|---|
200 OK | Success | Request completed, response body contains the result | Nothing, proceed. |
201 Created | Resource created | POST that created a new trader, order, prompt, etc. | Read the new resource’s id from the body. |
202 Accepted | Queued for processing | Long-running job accepted (e.g. backfills) | Poll the job-status endpoint documented on the request. |
204 No Content | Success, no body | Delete or idempotent update | Nothing, proceed. |
400 Bad Request | Invalid input | Missing field, wrong type, or malformed JSON | Read the error message, fix the request body, do not retry blindly. |
401 Unauthorized | Missing or invalid token | No Authorization header, expired session | Log in again, see Authentication. |
403 Forbidden | Token valid, access denied | Trying to act on a resource you do not own | Check the account or resource id in the URL. |
404 Not Found | Resource does not exist | Wrong id, deleted resource | Verify the id; do not retry. |
409 Conflict | Duplicate or inconsistent state | Creating a resource that already exists, or updating one that has changed | Reconcile server state, retry with correct preconditions. |
422 Unprocessable Entity | Business-rule violation | Valid JSON shape, but violates a platform constraint (e.g. leverage too high) | Read the error message and adjust. Do not retry blindly. |
429 Too Many Requests | Rate limited | Exceeding request quota | Back off exponentially, see below. |
500 Internal Server Error | Unexpected server failure | Bug or transient upstream issue | Retry with backoff. Contact support with request_id if persistent. |
502 / 503 / 504 | Upstream or gateway failure | Deployment in progress, exchange outage | Retry with backoff. Check status.hyperoru.com. |
Rate limits
Rate limits keep the platform responsive for everyone. They are applied per session token and per source IP, whichever is more restrictive.| Category | Limit |
|---|---|
Authentication (/api/users/login, /api/users/register) | 10 requests per minute per IP |
Read-only endpoints (most GET) | 120 requests per minute per token |
Mutating endpoints (POST, PUT, PATCH, DELETE) | 60 requests per minute per token |
| WebSocket messages | 240 messages per minute per connection |
Market streams (GET /api/market-intelligence/stream, POST /api/hyper-ai/chat) | 1 concurrent stream per token |
These are defaults. If your use case exceeds them legitimately, contact support@hyperoru.com to request an uplift.
Headers returned on every response
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the current window |
X-RateLimit-Remaining | Requests you have left in the window |
X-RateLimit-Reset | UNIX timestamp (seconds) when the window resets |
Handling 429 Too Many Requests
When you exceed a limit you receive:
retry_after field (and the Retry-After header) tells you the minimum number of seconds to wait.
Python
Retry strategy
Never retry 4xx other than 429
4xx errors (except 429) indicate a client bug. Retrying will not help and can lock out your account if you keep hammering the wrong credentials.Retry 5xx and 429 with exponential backoff
Start at 1 second, double on each attempt, cap at 30 seconds, and add up to 500ms of jitter. Give up after 5-10 attempts.
Honor Retry-After when present
If the server gives you an explicit wait time, use it. Do not sleep less than that, even if your backoff schedule says so.
Reporting an issue
When an error looks like a platform bug, email support@hyperoru.com with:- The request id (from
X-Request-Idheader or the error body). - The HTTP method and path you called.
- The approximate timestamp (UTC) of the failure.
- The response body you received.
Next steps
Authentication
How to log in, rotate tokens, and keep them safe.
Trust and safety
How Hyperoru protects your keys, funds, and data.