API Reference

lean live command

Introduction

Send a command to a local running live trading project.

$ lean live command [OPTIONS] PROJECT

To use the CLI, you must be a member in an organization on a paid tier.

Description

Sends a custom command to a running local live trading project. Use the --data option to pass a JSON string representing the command. The JSON must include a $type field matching a command class defined in your algorithm.

Example usage:

$ lean live command "My Project" --data "{ \"target\": \"BTCUSD\", \"$type\": \"MyCommand\" }"

Options

The lean live command command supports the following options:

OptionDescription
--data <string>The command to send, 'str' representation of a 'dict' e.g. "{ \"target\": \"BTCUSD\", \"$type\":\"MyCommand\" }"
--lean-config <file>The Lean configuration file that should be used (defaults to the nearest lean.json)
--verboseEnable debug logging
--helpDisplay the help text of the lean live command command and exit

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: