BalanceOut¶
Creates a withdrawal transaction from the specified trading account.
int BalanceOut(int login, double amount, const std::string& comment);
Parameters¶
- login — account login ID from which the withdrawal will be made.
- amount — withdrawal amount. Must be less than or equal to zero.
- comment — text comment for the transaction (e.g., withdrawal reason).
Return Value¶
RET_OK— withdrawal successfully recorded.RET_ERR_PARAMS— invalid parameters (e.g., positive withdrawal amount).- Other
RET_*— system-level errors returned bySetBalance. - Return Codes
Example¶
int result = BalanceOut(1001, -150.0, "Client requested withdrawal");
if (result == RET_OK) {
// Withdrawal processed successfully
}
Warning
- The
amountmust be negative; otherwise, the method returnsRET_ERR_PARAMS. - This method does not validate account existence — ensure the login is correct before calling.
- The underlying
SetBalancecall may produce additional error codes — always check the return result.
Information¶
The BalanceOut method is part of the ScaleTrade Plugin API and allows plugins to perform withdrawal (balance out) financial operations.
Target keywords:
- ScaleTrade withdrawal API
- BalanceOut trading platform
- withdraw funds C++ API
- trading financial operations
- SetBalance OP_BALANCE_OUT
- account withdrawal transaction
Useful for:
- Finance and payout modules
- CRM withdrawal automation
- Payment gateway integrations
- Compliance and financial control tools