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

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

# BarsHistoryLoadedEventArgs.Bars

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

## Bars

Gets the bar objects data.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public Bars Bars {get;}
```

Python:

```python
barsHistoryLoadedEventArgs.Bars: Bars
```

### Returns

`Bars` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    Bars.HistoryLoaded += OnBarsHistoryLoaded;
    Bars.LoadMoreHistoryAsync();
}

private void OnBarsHistoryLoaded(BarsHistoryLoadedEventArgs args)
{
    Print("{0} {1} now has {2} bars, first bar opened at {3}", args.Bars.SymbolName, args.Bars.TimeFrame, args.Bars.Count, args.Bars[0].OpenTime);
}
```

Python:

```python
def on_start(self):
    api.Bars.HistoryLoaded += self.on_bars_history_loaded
    api.Bars.LoadMoreHistoryAsync()

def on_bars_history_loaded(self, args):
    api.Print(f"{args.Bars.SymbolName} {args.Bars.TimeFrame} now has {args.Bars.Count} bars, first bar opened at {args.Bars[0].OpenTime}")
```

