---
id: "P:cAlgo.API.ChartRobot.InstanceId"
kind: "property"
type: "T:cAlgo.API.ChartRobot"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/InstanceId/"
---

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

# ChartRobot.InstanceId

Member of [ChartRobot](https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/index.md).

## InstanceId

Gets the ID of a specific Robot instance.

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

- Cloud: Never available in the cloud: it is only returned by members that do not work there (ChartRobots, ChartRobots.Add, ChartRobots.Item and more).

C#:

```csharp
string InstanceId {get;}
```

Python:

```python
chartRobot.InstanceId: str
```

### Returns

`string` — 

### Examples

C#:

```csharp
var chartRobot = ChartRobots.Add("Sample Break Even");
var sameRobot = ChartRobots[chartRobot.InstanceId];
Print("Instance id: {0} | Found: {1}", chartRobot.InstanceId, sameRobot != null);
```

Python:

```python
chartRobot = api.ChartRobots.Add("Sample Break Even")
sameRobot = api.ChartRobots[chartRobot.InstanceId]
api.Print(f"Instance id: {chartRobot.InstanceId} | Found: {sameRobot is not None}")
```

