diff --git a/05 Lean CLI/09 Live Trading/03 Algorithm Control/03 Control Cloud Algorithms.php b/05 Lean CLI/09 Live Trading/03 Algorithm Control/03 Control Cloud Algorithms.php index b63984c8cb..acb911887f 100644 --- a/05 Lean CLI/09 Live Trading/03 Algorithm Control/03 Control Cloud Algorithms.php +++ b/05 Lean CLI/09 Live Trading/03 Algorithm Control/03 Control Cloud Algorithms.php @@ -46,3 +46,20 @@

For more information about the command options, see Options.

+ +

Broadcast Commands

+

To send a command to every live algorithm that runs in your organization, open a terminal in the organization workspace and then run lean cloud live broadcast --data "<payload>".

+ +
+
$ lean cloud live broadcast --data "{'ticker': 'AAPL', 'quantity': 1}"
+
+ +

The payload follows the same rules as the one you pass to lean cloud live command, so include a $type key to run the logic you wrap in a Command class and use `$type in PowerShell.

+ +

The command targets the organization of the current Lean CLI directory. To broadcast to another organization, pass its name or Id to the --organization option. To leave one project out of the broadcast, pass its name or Id to the --exclude-project option.

+ +
+
$ lean cloud live broadcast --data "{'$type': 'MyCommand', 'ticker': 'AAPL', 'quantity': 1}" --organization "My Organization" --exclude-project "My Project"
+
+ +

For more information about the command options, see Options.