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.
| Method | URL |
|---|---|
POST | /webserv/traders/{login}/changebalance |
Path parameters
| Parameter | Required? | Data type | Description |
|---|---|---|---|
login | Yes | integer | The number of a specific trading account. |
Request body
| Key | Required? | Data type | Description |
|---|---|---|---|
comment | No | string | Internal note attached to the balance change. Not shown to retail clients. |
externalId | No | string | External identifier of the broker's choosing (a bank transfer order number, for instance). |
externalNote | No | string | Brief comment displayed to retail clients. |
login | Yes | integer | The number of a specific trading account. |
preciseAmount | Yes | double | Amount to deposit or withdraw. Must be a positive decimal number. |
source | No | string | Designated source of the deposit or withdrawal. |
type | Yes | string | Type of balance change: "DEPOSIT", "WITHDRAW", "DEPOSIT_NONWITHDRAWABLE_BONUS" or "WITHDRAW_NONWITHDRAWABLE_BONUS". |
Output
| Key | Data type | Description |
|---|---|---|
balanceHistoryId | integer | Identifier of the balance history entity for the specified trader. |
Expected status code
200
Errors
See Error codes.