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

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

# HistoricalTrade.ClosingTime

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

## ClosingTime

Time of the Closing Deal.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
DateTime ClosingTime {get;}
```

Python:

```python
historicalTrade.ClosingTime: DateTime
```

### Returns

`DateTime` — 

### Examples

C#:

```csharp
var todayTrades = History.Where(trade => trade.ClosingTime.Date == Server.Time.Date).ToArray();
Print("Trades closed today: {0}", todayTrades.Length);
```

Python:

```python
todayTrades = [trade for trade in api.History if trade.ClosingTime.Date == api.Server.Time.Date]
api.Print(f"Trades closed today: {len(todayTrades)}")
```

