MngDeleteAccount¶
Command: MngDeleteAccount
Deprecated alias: DeleteUser
DeleteUser is kept only for backward compatibility. New integrations must use MngDeleteAccount; the alias may be removed in a future release.
Description: Deletes a user account from the system by login ID.
Deletion policy:
- Active market positions and active pending orders block account deletion.
- All four pending types are protected: BUY LIMIT, SELL LIMIT, BUY STOP and SELL STOP, including creation, modification and cancellation in progress.
- Cancel pending orders and wait for cancellation to finish before deleting the account.
- Once no blocking trades remain, account deletion also removes its trade history.
Access Control¶
Requires del_accounts for manager/dealer sessions. Every target account must match the manager groups and brand scope loaded from the cached manager record. Token payload is used only for manager id and session type.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
| login | int | Yes | Login ID of the user |
Request Example¶
{
"command": "MngDeleteAccount",
"data": {
"login": 102030
}
}
Response Parameters¶
| Name | Type | Description |
|---|---|---|
| data | string | Returns "OK" if successful |
Error Responses¶
| Code | Error | Description |
|---|---|---|
| 404 | RET_USER_NOT_FOUND |
Account does not exist |
| 409 | RET_USR_HAS_TRADES |
Account still has active market positions or pending orders |
| 500 | RET_* |
Internal delete or trade cleanup error |
Response Example¶
{
"data": "OK"
}