Skip to content

Error.TradeResult

property · Error · cAlgo.API

DesktopCLICloud

The result of the trade that produced the error

Definition

TradeResult TradeResult {get;}
error.TradeResult: TradeResult

Returns TradeResult

Examples

protected override void OnError(Error error)
{
    var result = error.TradeResult;
    if (result != null)
        Print("Trade result: successful={0}, error={1}", result.IsSuccessful, result.Error);
}
def on_error(self, error):
    result = error.TradeResult
    if result is not None:
        api.Print(f"Trade result: successful={result.IsSuccessful}, error={result.Error}")