---
id: "P:cAlgo.API.BacktestingDataSourceMinMaxTimeArgs.PriceDataSourceId"
kind: "property"
type: "T:cAlgo.API.BacktestingDataSourceMinMaxTimeArgs"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceMinMaxTimeArgs/PriceDataSourceId/"
---

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

# BacktestingDataSourceMinMaxTimeArgs.PriceDataSourceId

Member of [BacktestingDataSourceMinMaxTimeArgs](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceMinMaxTimeArgs/index.md).

## PriceDataSourceId

Gets price data source Id for the min / max time request.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
public PriceDataSourceId PriceDataSourceId {get;}
```

Python:

```python
backtestingDataSourceMinMaxTimeArgs.PriceDataSourceId: PriceDataSourceId
```

### Returns

`PriceDataSourceId` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
private BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args)
{
    var bars = MarketData.GetBars(args.PriceDataSourceId.TimeFrame, args.PriceDataSourceId.Symbol.Name);
    return new BacktestingMinMaxTime(bars[0].OpenTime, bars.LastBar.OpenTime);
}
```

Python:

```python
def on_min_max_time_requested(self, args):
    bars = api.MarketData.GetBars(args.PriceDataSourceId.TimeFrame, args.PriceDataSourceId.Symbol.Name)
    return BacktestingMinMaxTime(bars[0].OpenTime, bars.LastBar.OpenTime)
```

