---
title: "Setting Up Your Environment"
canonical: https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/setting-up-your-environment
markdown: https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/setting-up-your-environment.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/06%20LEAN%20Engine/02%20Contributions/02%20Brokerages/01%20Setting%20Up%20Your%20Environment
modified: 2026-10-29
index: https://www.quantconnect.com/llms.txt
---

# Setting Up Your Environment

[Documentation](https://www.quantconnect.com/docs/v2.md) > [LEAN Engine](https://www.quantconnect.com/docs/v2/lean-engine.md) > Contributions > [Brokerages](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages.md) > Setting Up Your Environment

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

## Introduction

This page explains how to set up your coding environment to create, develop, and test your brokerage before you contribute it to LEAN.

## Prerequisites

Working knowledge of C#. You also need to [install .NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0).

## Set Up Environment

Follow these steps to set up your environment:

1. Fork [Lean](https://github.com/QuantConnect/Lean/) and then clone your forked repository to your local machine.
2. Open the [Lean.Brokerages.Template repository](https://github.com/QuantConnect/Lean.Brokerages.Template) and click **Use this template**.
3. On the Create a new repository from Lean.Brokerages.Template page, set the repository name to `Lean.Brokerages.<brokerageName>` (for example, `Lean.Brokerages.XYZ`).
4. Click **Create repository from template**.
5. Clone the `Lean.Brokerages.<brokerageName>` repository.
   ```
   $ git clone https://github.com/username/Lean.Brokerages.<brokerageName>.git
   ```
6. If you're on a Linux terminal, in your `Lean.Brokerages.<brokerageName>` directory, change the access permissions of the bash script.
   ```
   $ chmod +x ./renameBrokerage
   ```
7. In your `Lean.Brokerages.<brokerageName>` directory, run the `renameBrokerage.sh` bash script.
   ```
   $ renameBrokerage.sh
   ```
   The bash script replaces some placeholder text in the `Lean.Brokerages.<brokerageName>` directory and renames some files according to your brokerage name.
