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

# lean live command

[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 command

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

## 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](https://www.quantconnect.com/docs/v2/cloud-platform/organizations/tier-features.md) 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:

| Option | Description |
| --- | --- |
| `--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) |
| `--verbose` | Enable debug logging |
| `--help` | Display the help text of the `lean live command` command and exit |
