---
id: "P:cAlgo.API.Error.TradeResult"
kind: "property"
type: "T:cAlgo.API.Error"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/Error/TradeResult/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Error.TradeResult

Member of [Error](https://help.ctrader.com/ctrader-algo/references/Trading/Error/index.md).

## TradeResult

The result of the trade that produced the error

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
TradeResult TradeResult {get;}
```

Python:

```python
error.TradeResult: TradeResult
```

### Returns

`TradeResult` — 

### Examples

C#:

```csharp
protected override void OnError(Error error)
{
    var result = error.TradeResult;
    if (result != null)
        Print("Trade result: successful={0}, error={1}", result.IsSuccessful, result.Error);
}
```

Python:

```python
def on_error(self, error):
    result = error.TradeResult
    if result is not None:
        api.Print(f"Trade result: successful={result.IsSuccessful}, error={result.Error}")
```

