Overview
The table below lists the common HTTP status codes you may receive while calling the Shoonya API, along with the recommended resolution for each.
Purpose
Use this as the single lookup table for HTTP-level error handling (retries, re-auth, escalation) across every integration — link to a specific row instead of duplicating error explanations on each endpoint page.
Reference table
| Code | Error Description | Resolution |
| 400 | Missing or bad request parameters or values. | Validate the payload against the endpoint's parameter table — check for missing required fields or incorrect types/values. |
| 403 | Session expired or invalidated. Must relogin. | Re-authenticate via the login/OAuth flow and obtain a fresh session token; do not retry the same request with the old token. |
| 404 | Requested resource was not found. | Confirm the endpoint path and any identifiers used (order ID, symbol, token, etc.) are correct. |
| 405 | Request method (GET, POST, etc.) is not allowed on the requested endpoint. | Check the endpoint's documented HTTP method and correct the client call. |
| 410 | The requested resource is gone permanently. | Stop calling this endpoint/resource; check the changelog for its replacement. |
| 429 | Too many requests to the API (rate limiting). | Back off per the Rate Limits page and retry with exponential backoff and jitter. |
| 500 | Something unexpected went wrong. | Retry with backoff; if persistent, capture the request/response and escalate to support. |
| 502 | The backend OMS is down and the API is unable to communicate with it. | Please check the host or WebSocket URL you're connecting to, and confirm you're going through the OAuth login flow correctly before retrying — a 502 here often traces back to a misconfigured host/socket endpoint or an invalid/incomplete auth handshake rather than a transient outage. |
| 503 | Service unavailable; the API is down. | Retry with backoff; check the status page before escalating. |
| 504 | Gateway timeout; the API is unreachable. | Retry with backoff. For order placement/modification calls, reconcile via a status GET before retrying, to avoid duplicate orders. |
Overview
The table below lists the common HTTP status codes you may receive while calling the Shoonya API, along with the recommended resolution for each.
Purpose
Use this as the single lookup table for HTTP-level error handling (retries, re-auth, escalation) across every integration — link to a specific row instead of duplicating error explanations on each endpoint page.
Reference table