Open API Error Codes

Here you can find a list of errors sent by the API in various occasions. Errors are sent using the following responses

  • ProtoOAErrorRes.errorCode. General error following a request.
  • ProtoOAExecutionEvent.errorCode. Error sent when order validation fails.
  • ProtoOAOrderErrorEvent.errorCode. Error sent when order passes validation but error appears after.

Common Errors

Error Description
UNKNOWN_ERROR Generic error.
UNSUPPORTED_MESSAGE Message is not supported. Wrong message
INVALID_REQUEST Generic error. Usually used when input value is not correct.
TIMEOUT_ERROR Deal execution is reached timeout and rejected.
ENTITY_NOT_FOUND Generic error for requests by id.
CANT_ROUTE_REQUEST Connection to Server is lost or not supported.
FRAME_TOO_LONG Message is too large.
MARKET_CLOSED Market is closed.
CONCURRENT_MODIFICATION Order is blocked (e.g. under execution) and change cannot be applied.
BLOCKED_PAYLOAD_TYPE Message is blocked by server.

Authorization Errors

Error Description
CH_CLIENT_AUTH_FAILURE Open API client is not activated or wrong client credentials.
CH_CLIENT_NOT_AUTHENTICATED When a command is sent for not authorized Open API client.
CH_CLIENT_ALREADY_AUTHENTICATED Client is trying to authenticate twice.
CH_ACCESS_TOKEN_INVALID Access token is invalid.
CH_SERVER_NOT_REACHABLE Trading service is not available.
CH_CTID_TRADER_ACCOUNT_NOT_FOUND Trading account is not found.
CH_OA_CLIENT_NOT_FOUND Could not find this client id.

General Errors

Error Description
REQUEST_FREQUENCY_EXCEEDED Request frequency is reached.
SERVER_IS_UNDER_MAINTENANCE Server is under maintenance.
CHANNEL_IS_BLOCKED Operations are not allowed for this account.
CONNECTIONS_LIMIT_EXCEEDED Limit of connections is reached for this Open API client.

Pricing Errors

Error Description
NOT_SUBSCRIBED_TO_SPOTS When trying to subscribe to depth, trendbars, etc. without spot subscription.
ALREADY_SUBSCRIBED When subscription is requested for an active.
SYMBOL_NOT_FOUND Symbol not found.
UNKNOWN_SYMBOL Note: to be merged with SYMBOL_NOT_FOUND.
INCORRECT_BOUNDARIES When requested period (from,to) is too large or invalid values are set to from/to.

Trading Errors

Error Description
NO_QUOTES Trading cannot be done as not quotes are available.
NOT_ENOUGH_MONEY Not enough funds to allocate margin.
MAX_EXPOSURE_REACHED Max exposure limit is reached for a {trader, symbol, side}.
POSITION_NOT_FOUND Position not found.
ORDER_NOT_FOUND Order not found.
POSITION_NOT_OPEN When trying to close a position that it is not open.
POSITION_LOCKED Position in the state that does not allow to perform an operation.
TOO_MANY_POSITIONS Trading account reached its limit for max number of open positions and orders.
TRADING_BAD_VOLUME Invalid volume.
TRADING_BAD_STOPS Invalid stop price.
TRADING_BAD_PRICES Invalid price (e.g. negative).
TRADING_BAD_STAKE Invalid stake volume (e.g. negative).
PROTECTION_IS_TOO_CLOSE_TO_MARKET Invalid protection prices.
TRADING_BAD_EXPIRATION_DATE Invalid expiration.
PENDING_EXECUTION Unable to apply changes as position has an order under execution.
TRADING_DISABLED Trading is blocked for the symbol.
TRADING_NOT_ALLOWED Trading account is in read only mode.
UNABLE_TO_CANCEL_ORDER Unable to cancel order.
UNABLE_TO_AMEND_ORDER Unable to amend order.
SHORT_SELLING_NOT_ALLOWED Short selling is not allowed.