Skip to main content

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

CodeMeaning
200OK.
201Created (signup, order placed).
204No content (cancel, logout).
400Bad request — validation failed; message says which field.
401Unauthorized — missing/expired token, wrong credentials, expired trial.
403Forbidden — your scope can't perform this action.
404Not found.
409Conflict — e.g. an active trial already exists for the email.
500Server error.
503A downstream service (e.g. report generation) is unavailable.

Common trading errors

MessageCause
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 orderOnly pending orders can be modified.
you can't update the order at this pointThe order isn't in a modifiable state.
Action not permitted on this sessionRead-only (Investor) scope tried to trade.

WebSocket errors arrive as event frames (bad_request, forbidden, unauthorized, …) — see WebSocket events.