---
id: "P:cAlgo.API.Internals.Algo.MarketData"
kind: "property"
type: "T:cAlgo.API.Internals.Algo"
url: "https://help.ctrader.com/ctrader-algo/references/General/Algo/MarketData/"
---

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

# Algo.MarketData

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

## MarketData

Provides access to the Depth of Market Data.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public MarketData MarketData {get;}
```

Python:

```python
api.MarketData: MarketData
```

### Returns

`MarketData` — 

### Examples

C#:

```csharp
var dailyBars = MarketData.GetBars(TimeFrame.Daily, "EURUSD");
Print("EURUSD daily close: {0}", dailyBars.ClosePrices.LastValue);
var marketDepth = MarketData.GetMarketDepth("EURUSD");
Print("EURUSD depth: {0} bid entries", marketDepth.BidEntries.Count);
```

Python:

```python
dailyBars = api.MarketData.GetBars(TimeFrame.Daily, "EURUSD")
api.Print(f"EURUSD daily close: {dailyBars.ClosePrices.LastValue}")
marketDepth = api.MarketData.GetMarketDepth("EURUSD")
api.Print(f"EURUSD depth: {marketDepth.BidEntries.Count} bid entries")
```

