Skip to content

DeleteBalance

Description: Asynchronously requests reversal and deletion of a balance finance transaction.

The immediate response confirms only that the request entered the trading runtime. It does not confirm that the transaction was deleted. Use DeleteBalanceSync when the caller needs the final result.

Access Control

Requires del_accounts_balance for manager/dealer sessions. The target finance transaction account must also 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
order int Yes Finance transaction order ID

Request Example

{
  "order": 1242279
}

Response Parameters

In the raw TCP response envelope, the fields below are returned inside data.

Name Type Description
accepted bool true when the command was accepted for processing
order int Finance transaction order ID
state int TS_FINANCE_DELETE_REQUEST (12)

Response Example

{
  "accepted": true,
  "order": 1242279,
  "state": 12
}

Errors

Code Description
400 Invalid request payload
401 Delete operation was rejected

Deposit reversal rules

Deleting an executed deposit reverses its balance effect. The account group's deposit_reversal_policy controls the case where this reversal would make the cash balance negative:

Value Behaviour
0 Reject the deletion and leave both the transaction and account balance unchanged
1 Allow the negative balance, mark the transaction deleted, and recalculate equity, margin, free margin, and margin state

An allowed reversal may move the account into Margin Call or Stop Out. The policy is deliberately narrow: it does not change ordinary withdrawal rules and does not apply to credit or bonus transactions. Deleting an executed withdrawal restores its amount to balance and is not governed by this setting.