---
id: "P:cAlgo.API.Bar.OpenTime"
kind: "property"
type: "T:cAlgo.API.Bar"
url: "https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/OpenTime/"
---

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

# Bar.OpenTime

Member of [Bar](https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/index.md).

## OpenTime

Gets the bar open time.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public DateTime OpenTime {get;}
```

Python:

```python
bar.OpenTime: DateTime
```

### Returns

`DateTime` — 

### Examples

C#:

```csharp
Print("Last bar opened at {0}", Bars.LastBar.OpenTime);
```

Python:

```python
api.Print(f"Last bar opened at {api.Bars.LastBar.OpenTime}")
```

