3.5. Change a Trader's Balance
Method | URL |
---|---|
POST | /webserv/traders/{login}/changebalance |
Changes the balance of a given account.
Parameters
Parameter | Parameter Type | Required? | Data Type | Description |
---|---|---|---|---|
login | path | Yes | integer | The number of a specific trading account. |
Request Body
Key | Required? | Data Type | Description |
---|---|---|---|
comment | No | string | A short note that can be attached to any balance change. This note is not shown to retail clients. |
externalId | No | string | A number that matches an external identifier of the broker’s choosing. For instance, the value of externalId could be equal to the number of the bank transfer order through which the user chose to make a deposit. |
externalNote | No | string | A brief comment that can supplement a deposit or a withdrawal. In contrast to comment, this text is displayed to retail clients. |
login | Yes | integer | The number of a specific trading account. |
preciseAmount | Yes | number | The precise amount of withdrawn or deposited funds. Specified as a decimal number. For BTC and similar assets, the value of preciseAmount can include as many as eight digits after the decimal point. |
source | No | string | The designated source of the deposit/withdrawal. |
type | Yes | string | The desired type of balance change. The possible values include DEPOSIT and WITHDRAW . |
Output
Key | Data Type | Description |
---|---|---|
balanceHistoryId | integer | The unique number designating the balance history of a specific trading account. |
Request Example
curl -X POST ‘https://HOST:PORT/v2/webserv/traders/8673590/changebalance?token=04d95575-c9af-42fba72e-2f0ce93f01d4’ -H ‘accept: application/json’ -H ‘Content-Type: application/json’ -d ‘{"comment": "any", "externalId": "34456778", "externalNote": "example", "login": 8673590, "preciseAmount": 123.45, "source": "wire", "type": "DEPOSIT"}’
Expected Response Status Code
200
Response Example
{
"balanceHistoryId": 6340680
}
Last update: February 6, 2023