BalanceIn¶
Adds a deposit transaction to the specified trading account.
int BalanceIn(int login, double amount, const std::string& comment);
Parameters¶
- login — account login ID to which the deposit will be applied.
- amount — deposit amount. Must be greater than or equal to zero.
- comment — text comment for the transaction (e.g., reason for deposit).
Return Value¶
RET_OK— deposit successfully recorded.RET_ERR_PARAMS— invalid parameters (e.g., negative amount).- Other
RET_*— error codes returned bySetBalance. - Return Codes
Example¶
int result = BalanceIn(1001, 250.0, "Initial deposit");
if (result == RET_OK) {
// Deposit added successfully
}
Warning
- The
amountmust be non-negative; otherwise, the method returnsRET_ERR_PARAMS. - This method does not validate account existence — ensure the login is correct before calling.
- The underlying call
SetBalancemay return additional system-level errors — always handle the return code.
Information¶
The BalanceIn method is part of the ScaleTrade Plugin API, designed to allow plugins to perform deposit financial operations on trading accounts.
Target keywords:
- ScaleTrade deposit API
- BalanceIn trading platform
- add funds to account C++
- trading plugin financial operations
- SetBalance OP_BALANCE_IN
- account deposit transaction
Useful for:
- Finance automation plugins
- CRM–platform integrations
- Automated deposit modules
- Payment gateway connectors