---
id: "P:cAlgo.API.Internals.IServer.IsConnected"
kind: "property"
type: "T:cAlgo.API.Internals.IServer"
url: "https://help.ctrader.com/ctrader-algo/references/Application/IServer/IsConnected/"
---

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

# IServer.IsConnected

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

## IsConnected

Indicates current connection status with the server

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
bool IsConnected {get;}
```

Python:

```python
api.Server.IsConnected: bool
```

### Returns

`bool` — 

### Examples

C#:

```csharp
if (Server.IsConnected)
    Print("Connected to the server, server time: {0}", Server.Time);
else
    Print("Not connected to the server");
```

Python:

```python
if api.Server.IsConnected:
    api.Print(f"Connected to the server, server time: {api.Server.Time}")
else:
    api.Print("Not connected to the server")
```

