This section defines the error codes you may encounter when working with the WebServices API.
The table below defines the error codes that you may encounter when making any of the API calls described in Section 4 and Section 5.
Code | Definition |
---|---|
UNKNOWN_ERROR |
An unknown server error has occured. |
INVALID_REQUEST |
A request validation failure has occured. The possible error descriptions are as following. |
NOT_ENOUGH_RIGHTS |
The manager who has made the request does not have sufficient rights to perform the requested operation. |
CH_BROKER_NOT_FOUND |
The cTrader backend cannot find the broker that the request concerns. |
The following table defines the error codes that can only be encountered when making certain calls described in Section 4 and Section 5.
Code | API Call(s) | Definition |
---|---|---|
REQUEST_FREQUENCY_EXCEEDED |
Any call with a non-GET method. |
The client has exceeded the request rate limiter (only applies to non-GET requests). |
TRADER_NOT_FOUND |
Any API call with the login parameter and/or the traderLogin /login keys in the request body. |
The requested trader is not found. |
CH_PLANT_INVALID |
Any API calls with the brokerName key in the request body. |
The cTrader backend cannot find a broker with brokerName at the plant to which the request is made. |
The following errors can only be encountered when making certain API call(s) described in Section 4.
Code | API Call(s) | Definition |
---|---|---|
NOT_ENOUGH_MONEY |
API calls 4.7 and 4.13. | A trader does not have sufficient funds to perform the requested operation or has open positions generating unrealized PnL. |
CHANGE_BALANCE_BAD_AMOUNT |
API call 4.7 | The requested balance change amount is invalid (e.g., if it is less than zero). |
TRADER_GROUP_NOT_FOUND |
API call 4.3 | The requested trader group is not found. |
WRONG_PASSWORD |
API call 4.9 | The password submitted in the request body is incorrect. |
You may encounter the following error codes when making certain API calls described in Section 5.
Code | API Call(s) | Definition |
---|---|---|
CID_DEFAULT_REGION_NOT_FOUND |
API call 5.1 | The plant to which the request is made is lacking a default region in its configuration. |
CH_CTID_ALREADY_CONFIRMED |
API call 5.1 | The value of the email |
CANT_ROUTE_REQUEST |
API call 5.2 | The environment with the specified environmentName is not found. |
INSUFFICIENT_PERMISSIONS |
API call 5.2 | The broker with the specified brokerName does not have access to the trader with the specified traderLogin . |
CH_CTID_TRADER_ACCOUNT_ALREADY_EXISTS |
API call 5.2 | The trader with the specified traderLogin has already been linked to the specified userId . |
CH_TRADER_ACCOUNT_CANNOT_BE_LINKED |
API call 5.2 | The trader with the specified traderLogin has already been linked to a different userId . |
CH_TRADER_ACCOUNT_NOT_FOUND |
API calls 5.2 and 5.3 | The trader with the specified traderLogin is not found. |
CH_CTID_TRADER_ACCOUNT_NOT_FOUND |
API call 5.3 | The trader with the specified ctidTraderAccountId is not found. |