Plugin.Messages
property · Plugin · cAlgo.API Since 5.2
DesktopCLICloud
Access the messaging API.
Environment behaviour
CLI — not supported. Plugins cannot run in the CLI: ctrader-cli runs cBots only.
Cloud — not supported. Plugins cannot run in the cloud: it runs cBots only.
Definition
public Messages Messages {get;}
api.Messages: Messages
Returns Messages
Examples
Messages.Subscribe<string>("signals", args => Print("Received signal: {0}", args.Message));
Messages.Send("signals", "EURUSD buy");
# Not available in Python: Subscribe needs a generic message type argument, sending works with an inferred type
api.Messages.Send("signals", "EURUSD buy")