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

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

# Plugin.Messages

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

## Messages

Access the messaging API.

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

- CLI: Plugins cannot run in the CLI: ctrader-cli runs cBots only.
- Cloud: Plugins cannot run in the cloud: it runs cBots only.

C#:

```csharp
public Messages Messages {get;}
```

Python:

```python
api.Messages: Messages
```

### Returns

`Messages` — 

Available since cAlgo.API 5.2.

### Examples

C#:

```csharp
Messages.Subscribe<string>("signals", args => Print("Received signal: {0}", args.Message));
Messages.Send("signals", "EURUSD buy");
```

Python:

```python
# Not available in Python: Subscribe needs a generic message type argument, sending works with an inferred type
api.Messages.Send("signals", "EURUSD buy")
```

