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

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

# AspBlock.Index

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

## Index

Get index of 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
int Index {get; set;}
```

Python:

```python
aspBlock.Index: int
```

### Returns

`int` — 

### Examples

C#:

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

Python:

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

