Skip to main content

Error Codes and Descriptions

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 Operations with accounts and Operations with cTID.

CodeDefinition
UNKNOWN_ERRORAn unknown server error has occured.
INVALID_REQUESTA request validation failure has occured. The possible error descriptions are as following.
NOT_ENOUGH_RIGHTSThe manager who has made the request does not have sufficient rights to perform the requested operation.
CH_BROKER_NOT_FOUNDThe 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 Operations with accounts and Operations with cTID.

CodeAPI Call(s)Definition
REQUEST_FREQUENCY_EXCEEDEDAny call with a non-GET method.The client has exceeded the request rate limiter (only applies to non-GET requests).
TRADER_NOT_FOUNDAny API call with the login parameter and/or the traderLogin/login keys in the request body.The requested trader is not found.
CH_PLANT_INVALIDAny 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.

Error Codes for Operations with Accounts

The following errors can only be encountered when making certain API call(s) described in Operations with accounts.

CodeAPI Call(s)Definition
NOT_ENOUGH_MONEYAPI calls Change a Trader's Balance and Request a List of Closed Positions.A trader does not have sufficient funds to perform the requested operation or has open positions generating unrealized PnL.
CHANGE_BALANCE_BAD_AMOUNTChange a Trader's BalanceThe requested balance change amount is invalid (e.g., if it is less than zero).
TRADER_GROUP_NOT_FOUNDRead Multiple Traders' DetailsThe requested trader group is not found.
WRONG_PASSWORDCheck a Trader's PasswordThe password submitted in the request body is incorrect.

Error Codes for Operations with cTID

You may encounter the following error codes when making certain API calls described in Operations with cTID.

CodeAPI Call(s)Definition
CID_DEFAULT_REGION_NOT_FOUNDCreate a cTIDThe plant to which the request is made is lacking a default region in its configuration.
CH_CTID_ALREADY_CONFIRMEDCreate a cTIDThe value of the email
CANT_ROUTE_REQUESTLink an Account to a cTIDThe environment with the specified environmentName is not found.
INSUFFICIENT_PERMISSIONSLink an Account to a cTIDThe broker with the specified brokerName does not have access to the trader with the specified traderLogin.
CH_TRADER_ACCOUNT_CANNOT_BE_LINKEDLink an Account to a cTIDThe trader with the specified traderLogin has already been linked.
CH_TRADER_ACCOUNT_NOT_FOUNDAPI calls Link an Account to a cTID and Change Trading Account DetailsThe trader with the specified traderLogin is not found.
CH_CTID_TRADER_ACCOUNT_NOT_FOUNDChange Trading Account DetailsThe trader with the specified ctidTraderAccountId is not found.