CreditOut¶
Creates a credit withdrawal transaction for the specified trading account.
int CreditOut(int login, double amount, const std::string& comment);
Parameters¶
- login — account login ID from which the credit will be removed.
- amount — credit amount to remove. Must be less than or equal to zero.
- comment — text comment describing the reason for the credit decrease.
Return Value¶
RET_OK— credit deduction successfully processed.RET_ERR_PARAMS— invalid parameters (e.g., positive amount).- Other
RET_*— additional system-level errors returned bySetCredit. - Return Codes
Example¶
int result = CreditOut(1001, -50.0, "Bonus correction");
if (result == RET_OK) {
// Credit removed successfully
}
Warning
- The
amountmust be negative, otherwise the method returnsRET_ERR_PARAMS. - The method does not validate account existence — ensure the login value is correct.
- Always handle potential error codes returned by the underlying
SetCreditcall.
Information¶
The CreditOut method is part of the ScaleTrade Plugin API, enabling plugins to perform credit deduction (credit out) operations on trading accounts.
Target keywords:
- ScaleTrade credit withdrawal
- CreditOut API
- remove credit trading account
- OP_CREDIT_OUT
- ScaleTrade SetCredit
- financial adjustment trading platform
Useful for:
- Bonus correction systems
- Risk and compliance tools
- Automated financial adjustment plugins
- CRM platform integrations