---
id: "P:cAlgo.API.AspBlock.Id"
kind: "property"
type: "T:cAlgo.API.AspBlock"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Id/"
---

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

# AspBlock.Id

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

## Id

Returns unique ID of the current block.

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
string Id {get;}
```

Python:

```python
aspBlock.Id: str
```

### Returns

`string` — 

### Examples

C#:

```csharp
var block = Asp.SymbolTab.AddBlock("My Block");
Print("Block ID: {0}", block.Id);
```

Python:

```python
block = api.Asp.SymbolTab.AddBlock("My Block")
api.Print(f"Block ID: {block.Id}")
```

