---
id: "T:cAlgo.API.Command"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/"
---

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

# Command (interface)

Represents a plugin command.

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.

## Definition

```csharp
public interface Command
```

## Examples

C#:

```csharp
var command = Commands.Add(CommandType.ChartContainerToolbar, args => Print("Command executed"));
command.ToolTip = "My plugin command";
command.IsEnabled = Account.Balance > 0;
Print("Command {0} of type {1} added", command.Id, command.Type);
```

Python:

```python
from System import Action
command = api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](lambda args: api.Print("Command executed")))
command.ToolTip = "My plugin command"
command.IsEnabled = api.Account.Balance > 0
api.Print(f"Command {command.Id} of type {command.Type} added")
```

## Properties

- `Guid Id {get;}` — Gets command unique Id. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/Id/index.md)
- `bool IsEnabled {get; set;}` — Gets / sets if command is enabled or not. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/IsEnabled/index.md)
- `string ToolTip {get; set;}` — Gets / sets command tooltips. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/ToolTip/index.md)
- `CommandType Type {get;}` — Gets command type. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/Type/index.md)

