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

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

# HistoricalTrade.Channel

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

## Channel

Gets the channel via which the trade was executed in a `string` format.

Environments: Desktop supported · CLI works differently · Cloud works differently.

- CLI: Trades the cBot made carry channel 'cBot Console' instead of the desktop 'cBot cTrader'.
- Cloud: Trades the cBot made carry channel 'cBot Cloud' instead of the desktop 'cBot cTrader'.

C#:

```csharp
string Channel {get;}
```

Python:

```python
historicalTrade.Channel: str
```

### Returns

`string` — 

### Examples

C#:

```csharp
var trade = History.LastOrDefault();
if (trade != null)
    Print("Last trade channel: {0}", trade.Channel);
```

Python:

```python
if api.History.Count > 0:
    api.Print(f"Last trade channel: {api.History[api.History.Count - 1].Channel}")
```

