Organization Workspaces


After you install the CLI and log in to your account, you need to create an organization workspace. Your organization workspace connects a directory on your local machine with one of your organizations in QuantConnect Cloud. Your organization workspace includes the basic files and folders necessary to use LEAN, including a local data directory and a LEAN configuration file.

We recommend running all Lean CLI commands in the root of your organization workspace directory. Doing so ensures the directory structure is always kept consistent when synchronizing projects between the cloud and your local drive. It also makes it possible for the CLI to automatically find the Lean configuration file when you run the LEAN engine on your local machine.

Create Workspaces

To create an organization workspace for one of your organizations, open a terminal in an empty directory, run lean init and then select an organization to link with the organization workspace. This command scaffolds a standard directory structure containing a data directory and a Lean configuration file, both of which are required to run the LEAN engine locally.

If you are running Docker on Windows using the legacy Hyper-V backend instead of the new WSL 2 backend, you need to enable file sharing for your temporary directories and for your organization workspace. To do so, open your Docker settings, go to Resources > File Sharing and add C: / Users / <username> / AppData / Local / Temp and your organization workspace path to the list. Click Apply & Restart after making the required changes.

To set the default language of new projects in a new organization workspace, run lean init --language <value> where the <value> is python or csharp.

Directory Structure

The lean init commands creates the following structure:

├── data/
│   ├── alternative/ 
│   ├── crypto/
│   ├── equity/
│   ├── ...
│   ├── market-hours/
│   ├── option/
│   ├── symbol-properties/
│   └──
│── storage/
└── lean.json

These files contain the following content:

data /This directory contains the local data that LEAN uses to run locally. This directory is comes with sample data from the QuantConnect/Lean repository. As you download additional data from the dataset market, it's stored in this directory. Each organization workspace has its own data directory because each organization has its own data licenses.
storage /This directory contains the Object Store data that LEAN uses to run locally.
lean.jsonThis file contains the Lean configuration that is used when running the LEAN engine locally.

When you create new projects or pull existing projects from the cloud, your organization workspace stores the project files.

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: