---
id: "M:cAlgo.API.ChartContainers.Get(System.String)"
kind: "method"
type: "T:cAlgo.API.ChartContainers"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/Get/"
---

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

# ChartContainers.Get

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

## Get(string id)

Returns a chart container by it is ID.

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
ChartContainer Get(string id)
```

Python:

```python
chartContainers.Get(id: str) -> ChartContainer | None
```

### Parameters

- `id` (`string`, Python `str`): Chart container ID

### Returns

`ChartContainer` — Returns the matching chart container or null.

### Examples

C#:

```csharp
var mainContainerId = ChartManager.ChartContainers.MainChartContainer.Id;
var chartContainer = ChartManager.ChartContainers.Get(mainContainerId);
if (chartContainer != null)
    Print("Found container {0} with {1} frames", chartContainer.Id, chartContainer.Count);
```

Python:

```python
mainContainerId = api.ChartManager.ChartContainers.MainChartContainer.Id
chartContainer = api.ChartManager.ChartContainers.Get(mainContainerId)
if chartContainer is not None:
    api.Print(f"Found container {chartContainer.Id} with {chartContainer.Count} frames")
```

