API Reference
lean live add-security
Introduction
Represents a command to add a security to the algorithm.
$ lean live add-security [OPTIONS] PROJECT
Description
Sends a command to a running local live trading algorithm to add a new security subscription.
The --ticker, --market, and --security-type options are required.
You can optionally configure the resolution, leverage, fill-forward behavior, and extended market hours flag.
The algorithm must already be running via lean live deploy before you use this command.
Options
The lean live add-security command supports the following options:
| Option | Description |
|---|---|
--ticker <string> | [required] |
--market <string> | [required] |
--security-type <string> | [required] |
--resolution <string> | The resolution of the symbol to add |
--fill-data-forward | The fill forward behavior, true to fill forward, false otherwise - defaults to true |
--leverage <float> | The leverage for the security, defaults to 2 for equity, 50 for forex, and 1 for everything else |
--extended-market-hours | The extended market hours flag, true to allow pre/post market data, false for only in market data |
--lean-config <file> | The Lean configuration file that should be used (defaults to the nearest lean.json) |
--verbose | Enable debug logging |
--help | Display the help text of the lean live add-security command and exit |