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

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

# Algo.MarketSessions

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

## MarketSessions

Returns current market sessions.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public MarketSession MarketSessions {get;}
```

Python:

```python
api.MarketSessions: MarketSession
```

### Returns

`MarketSession` — 

### Examples

C#:

```csharp
Print("Current market sessions: {0}", MarketSessions);
if (MarketSessions.HasFlag(MarketSession.London))
    Print("London session is open");
```

Python:

```python
api.Print(f"Current market sessions: {api.MarketSessions}")
if api.MarketSessions.HasFlag(MarketSession.London):
    api.Print("London session is open")
```

