---
title: "Brokerages"
canonical: https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages
markdown: https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/06%20LEAN%20Engine/02%20Contributions/02%20Brokerages
modified: 2026-10-31
index: https://www.quantconnect.com/llms.txt
---

# Brokerages

[Documentation](https://www.quantconnect.com/docs/v2.md) > [LEAN Engine](https://www.quantconnect.com/docs/v2/lean-engine.md) > Contributions > Brokerages

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

Creating a fully supported brokerage is a challenging endeavor. LEAN requires a number of individual pieces which work together to form a complete brokerage implementation. This guide aims to describe in as much detail as possible what you need to do for each module.

The end goal is to submit a pull request that passes all tests. Partially-completed brokerage implementations are acceptable if they are merged to a branch. It's easy to fall behind master, so be sure to keep your branch updated with the master branch. Before you start, read LEAN's [coding style guidelines](https://github.com/QuantConnect/Lean/blob/master/CONTRIBUTING.md#code-style-and-testing) to comply with the code commenting and design standards.

The root of the brokerage system is the algorithm job packets, which hold configuration information about how to run LEAN. The program logic is a little convoluted. It moves from *config.json > create job packet > create brokerage factory matching name > set job packet brokerage data > factory creates brokerage instance*. As a result, we'll start creating a brokerage at the root, the configuration and brokerage factory.

- [Setting Up Your Environment](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/setting-up-your-environment.md): Set up your local brokerage repository.
- [Laying the Foundation](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/laying-the-foundation.md): (IBrokerageFactory) Stub out the implementation and initialize a brokerage instance.
- [Creating the Brokerage](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/creating-the-brokerage.md): (IBrokerage) Instal key brokerage application logic, where possible using a brokerage SDK.
- [Translating Symbol Conventions](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/translating-symbol-conventions.md): (ISymbolMapper) Translate brokerage specific tickers to LEAN format for a uniform algorithm design experience.
- [Describing Brokerage Limitations](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/describing-brokerage-limitations.md): (IBrokerageModel) Describe brokerage support of orders and set transaction models.
- [Enabling Live Data Streaming](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/enabling-live-data-streaming.md): (IDataQueueHandler) Set up a live streaming data service from a brokerage-supplied source.
- [Enabling Historical Data](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/enabling-historical-data.md): (IHistoryProvider) Tap into the brokerage historical data API to serve history for live algorithms.
- [Downloading Data](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/downloading-data.md): (IDataDownloader) Save data from the brokerage to disk in LEAN format.
- [Modeling Fee Structures](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/modeling-fee-structures.md): (IFeeModel) Enable accurate backtesting with specific fee structures of the brokerage.
- [Updating the Algorithm API](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/updating-the-algorithm-api.md): (ISecurityTransactionModel) Combine the various models together to form a brokerage set.

### See Also

- [Dataset Market](https://www.quantconnect.com/datasets)
- [Purchasing Datasets](https://www.quantconnect.com/docs/v2/cloud-platform/datasets/licensing.md)

## Pages in This Section

- [Setting Up Your Environment](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/setting-up-your-environment.md)
- [Laying the Foundation](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/laying-the-foundation.md)
- [Creating the Brokerage](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/creating-the-brokerage.md)
- [Translating Symbol Conventions](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/translating-symbol-conventions.md)
- [Describing Brokerage Limitations](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/describing-brokerage-limitations.md)
- [Enabling Live Data Streaming](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/enabling-live-data-streaming.md)
- [Enabling Historical Data](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/enabling-historical-data.md)
- [Downloading Data](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/downloading-data.md)
- [Modeling Fee Structures](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/modeling-fee-structures.md)
- [Updating the Algorithm API](https://www.quantconnect.com/docs/v2/lean-engine/contributions/brokerages/updating-the-algorithm-api.md)
