Errors & status codes
Errors use standard HTTP status codes and carry a human-readable message inside the same response envelope:
{
"success": false,
"code": 400,
"data": null,
"error": "Bad request",
"message": "an active trial account already exists for this email"
}
Always branch on success (or the HTTP status), then surface message
to the user.
Status codes
| Code | Meaning |
|---|---|
| 200 | OK. |
| 201 | Created (signup, order placed). |
| 204 | No content (cancel, logout). |
| 400 | Bad request — validation failed; message says which field. |
| 401 | Unauthorized — missing/expired token, wrong credentials, expired trial. |
| 403 | Forbidden — your scope can't perform this action. |
| 404 | Not found. |
| 409 | Conflict — e.g. an active trial already exists for the email. |
| 500 | Server error. |
| 503 | A downstream service (e.g. report generation) is unavailable. |
Common trading errors
| Message | Cause |
|---|---|
not enough margins, order need=… | Insufficient free margin for the lot size. |
Maximum volume for <SYMBOL> is <n> | Lot size exceeds the symbol's volume_max. |
you can't update market order | Only pending orders can be modified. |
you can't update the order at this point | The order isn't in a modifiable state. |
Action not permitted on this session | Read-only (Investor) scope tried to trade. |
WebSocket errors arrive as event frames (bad_request, forbidden,
unauthorized, …) — see WebSocket events.