Skip to main content

Balances

Broker → cTrader endpoint for changing a trading account's balance. Authenticated with the Manager Token (see Authentication of API calls).

Change a trader's balance

The broker calls this endpoint after a successful payment to update the trader's balance in cTrader.

MethodURL
POST/webserv/traders/{login}/changebalance

Path parameters

ParameterRequired?Data typeDescription
loginYesintegerThe number of a specific trading account.

Request body

KeyRequired?Data typeDescription
commentNostringInternal note attached to the balance change. Not shown to retail clients.
externalIdNostringExternal identifier of the broker's choosing (a bank transfer order number, for instance).
externalNoteNostringBrief comment displayed to retail clients.
loginYesintegerThe number of a specific trading account.
preciseAmountYesdoubleAmount to deposit or withdraw. Must be a positive decimal number.
sourceNostringDesignated source of the deposit or withdrawal.
typeYesstringType of balance change: "DEPOSIT", "WITHDRAW", "DEPOSIT_NONWITHDRAWABLE_BONUS" or "WITHDRAW_NONWITHDRAWABLE_BONUS".

Output

KeyData typeDescription
balanceHistoryIdintegerIdentifier of the balance history entity for the specified trader.

Expected status code

200

Errors

See Error codes.