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

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

# HistoricalTrade.EntryTime

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

## EntryTime

Time of the Opening Deal, or the time of the first Opening deal that was closed.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
DateTime EntryTime {get;}
```

Python:

```python
historicalTrade.EntryTime: DateTime
```

### Returns

`DateTime` — 

### Examples

C#:

```csharp
var trade = History.FindLast("myLabel");
if (trade != null)
    Print("Trade duration: {0}", trade.ClosingTime - trade.EntryTime);
```

Python:

```python
trade = api.History.FindLast("myLabel")
if trade is not None:
    api.Print(f"Trade duration: {trade.ClosingTime - trade.EntryTime}")
```

