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

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

# BacktestingDataRequest.DataType

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

## DataType

Gets request data type.

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
BacktestingDataSourceDataType DataType {get;}
```

Python:

```python
backtestingDataRequest.DataType: BacktestingDataSourceDataType
```

### Returns

`BacktestingDataSourceDataType` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
private void OnDataRequested(BacktestingDataRequest request)
{
    if (request.DataType == BacktestingDataSourceDataType.Tick)
        Print("Tick data requested");
    else
        Print("Bar data requested: {0}", request.DataType);
}
```

Python:

```python
def on_data_requested(self, request):
    if request.DataType == BacktestingDataSourceDataType.Tick:
        api.Print("Tick data requested")
    else:
        api.Print(f"Bar data requested: {request.DataType}")
```

