---
title: "lean live add-security"
description: "API reference for the command `lean live add-security` in command line console."
canonical: https://www.quantconnect.com/docs/v2/lean-cli/api-reference/lean-live-add-security
markdown: https://www.quantconnect.com/docs/v2/lean-cli/api-reference/lean-live-add-security.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/05%20Lean%20CLI/99%20API%20Reference/34%20lean%20live%20add-security
modified: 2026-10-29
index: https://www.quantconnect.com/llms.txt
---

# lean live add-security

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Lean CLI](https://www.quantconnect.com/docs/v2/lean-cli.md) > [API Reference](https://www.quantconnect.com/docs/v2/lean-cli/api-reference.md) > lean live add-security

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

Represents a command to add a security to the algorithm.

```
$ lean live add-security [OPTIONS] PROJECT
```

To use the CLI, you must be a member in an [organization](https://www.quantconnect.com/docs/v2/cloud-platform/organizations/tier-features.md) on a paid tier.

## 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`](https://www.quantconnect.com/docs/v2/lean-cli/api-reference/lean-live-deploy.md) before you use this command.

## Arguments

The `lean live add-security` command expects the following arguments:

| Argument | Description |
| --- | --- |
| `<project>` | The path to the project directory or algorithm file to which you want to add the security. |

## 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 |
