---
title: "Interactive Brokers"
description: "The Interactive Brokers data provider streams live asset prices from IB. If you use this data provider and request historical data, the historical data comes from IB."
canonical: https://www.quantconnect.com/docs/v2/cloud-platform/datasets/interactive-brokers
markdown: https://www.quantconnect.com/docs/v2/cloud-platform/datasets/interactive-brokers.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/01%20Cloud%20Platform/09%20Datasets/08%20Interactive%20Brokers
modified: 2026-10-30
index: https://www.quantconnect.com/llms.txt
---

# Interactive Brokers

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Cloud Platform](https://www.quantconnect.com/docs/v2/cloud-platform.md) > [Datasets](https://www.quantconnect.com/docs/v2/cloud-platform/datasets.md) > Interactive Brokers

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

## Introduction

[Interactive Brokers (IB)](https://qnt.co/interactive-brokers) was founded by Thomas Peterffy in 1993 with the goal to "create technology to provide liquidity on better terms. Compete on price, speed, size, diversity of global products and advanced trading tools". IB provides access to trading Equities, ETFs, Options, Futures, Future Options, Forex, CFDs, Gold, Warrants, Bonds, and Mutual Funds for clients in over [200 countries and territories](https://www.interactivebrokers.com/en/index.php?f=7021) with no minimum deposit. IB also provides paper trading, a trading platform, and educational services.

The Interactive Brokers (IB) data provider serves asset prices from [IB's Trader Workstation API](https://interactivebrokers.github.io/tws-api/). This page explains our integration with their data API and its functionality.

## Sourcing

The IB data provider sources data directly from [IB's Trader Workstation API](https://interactivebrokers.github.io/tws-api/). If you use this data provider, IB only provides the security price data. QuantConnect Cloud provides the [auxiliary datasets](https://www.quantconnect.com/docs/v2/cloud-platform/datasets/quantconnect/auxiliary-data.md).

## Bar Building

The data is a summarized snapshot of the trades and quotes at roughly 300 milliseconds per snapshot.

## Hybrid Data Provider

When you [deploy a live algorithm with the IB brokerage](https://www.quantconnect.com/docs/v2/cloud-platform/live-trading/brokerages/interactive-brokers.md#16-Deploy-Live-Algorithms), you can use the [QuantConnect data provider](https://www.quantconnect.com/docs/v2/cloud-platform/datasets/quantconnect.md), the IB data provider, or both. If you use multiple data providers, the order you select them in defines their order of precedence in Lean, so Lean only uses a provider for the securities that the providers before it don't supply. If you use a third-party data provider, the assets that you subscribe to don't contribute to the [IB data limit](https://interactivebrokers.github.io/tws-api/historical_limitations.html).

We suggest the following configurations, in order of preference:

1. The QuantConnect data provider on its own. It's free and it's high quality, and it covers most asset classes.
2. The QuantConnect data provider first and a provider that fills its gaps second. The QuantConnect data provider doesn't supply Future Options data, so you need this configuration to trade Future Options.
3. The IB data provider first and the QuantConnect data provider last. Use this configuration if you want to trade on IB prices and let the QuantConnect data provider cover the rest.

## Alternative Data

Third-party data providers support most alternative datasets, except data that streams real-time intraday data. If you're using streaming datasets, like the [Tiingo News Feed](https://www.quantconnect.com/datasets/tiingo-news-feed) and [Benzinga News Feed](https://www.quantconnect.com/datasets/benzinga-news-feed), include the QuantConnect data provider as an additional data provider. The hybrid QuantConnect-[IB](https://qnt.co/interactive-brokers) data provider supports streaming datasets.

## Historical Data

If you get historical data from IB through a [history request](https://www.quantconnect.com/docs/v2/writing-algorithms/historical-data/history-requests.md) or a [warm-up period](https://www.quantconnect.com/docs/v2/writing-algorithms/historical-data/warm-up-periods.md), the historical data has the following characteristics:

- Second resolution data is limited to six months of history.
- The historical data excludes delisted Equities and expired Options.
- The historical data excludes expired Futures after two years.

The following quotas are in place for tick and second resolution historical data:

- You can have up to 50 simultaneous requests.
- You can make up to 60 requests within any 10-minute period.

In the preceding quotas, `TradeBar` and `QuoteBar` data count as separate requests. For example, if you request `TradeBar` and `QuoteBar` data for SPY, it counts as two requests.

For more information about historical data from IB, see [Historical Data Limitations](https://interactivebrokers.github.io/tws-api/historical_limitations.html) in the IB documentation.

## Pricing

To use IB data in your algorithms, [subscribe to IB market data](https://www.ibkrguides.com/clientportal/usersettings/marketdatasubscriptions.htm). We support all of the IB data subscriptions that are related to [the securities and markets we support](https://www.quantconnect.com/docs/v2/cloud-platform/live-trading/brokerages/interactive-brokers.md#04-Asset-Classes). Members usually subscribe to the following IB market data:

- US Securities Snapshot and Futures Value Bundle
- US Equity and Options Add-On Streaming Bundle
- CFE Enhanced Top of Book (L1 for VIX Futures)
- CME S&P Indexes (L1 for SPX and NDX)
- CBOE Streaming Market Indexes (L1 for VIX Index)

The IB data provider can stream data for up to 100 assets by default, but IB may let you stream more than 100 assets based on your commissions and equity value. For more information about quotas from IB, see the [Market Data Pricing Overview](https://www.interactivebrokers.com/en/pricing/research-news-marketdata.php) page on the IB website. If your algorithm adds more than the your quota, LEAN logs an error message from IB. To increase the quota, purchase a Quote Booster from IB.

To see the latest prices, check the [Market Data Pricing Overview](https://www.interactivebrokers.com/en/index.php?f=14193) page on the IB website. IB can take up to 24 hours to process subscription requests. So after you subscribe to data, you need to wait 24 hours before you can use it in your algorithms. When you subscribe to data, IB only assigns your data subscription to one of your accounts. If you want to assign the subscription to a different account, then contact IB.

If you want to use [IB market data](https://www.quantconnect.com/docs/v2/cloud-platform/datasets/interactive-brokers.md) and trade with your paper trading account, follow these steps:

1. Log in to the IB Client Portal.
2. In the top-right corner, click the **person** icon and then click **Settings**.
3. In the **Account Configuration** section, click **Paper Trading Account**.
4. Click **Yes**.
5. Click **Save**.
