Supported Models

Interactive Brokers

Introduction

This page explains the default security-level models and markets of the InteractiveBrokersBrokerageModel.

SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Cash);
SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Margin);
self.SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Cash)
self.SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Margin)

To view the implementation of this model, see the LEAN GitHub repository.

Fills

The following table shows the fill model that the InteractiveBrokersBrokerageModel uses for each SecurityType:

SecurityTypeFill Model
EquityEquityFillModel
FutureFutureFillModel
FutureOptionFutureOptionFillModel
Remaining SecurityType valuesImmediateFillModel

Slippage

The InteractiveBrokersBrokerageModel uses the ConstantSlippageModel with zero slippage.

Fees

The InteractiveBrokersBrokerageModel uses the InteractiveBrokersFeeModel.

Buying Power

The InteractiveBrokersBrokerageModel uses sets the buying power model based on the asset class of the security. The following table shows the default buying power model of each asset class:

Asset ClassModel
Equity OptionsOptionMarginModel
FuturesFutureMarginModel
Future OptionsFuturesOptionsMarginModel
Index OptionsOptionMarginModel
CryptoCashBuyingPowerModel for cash accounts or SecurityMarginModel for margin accounts
ForexCashBuyingPowerModel for cash accounts or SecurityMarginModel for margin accounts
OtherSecurityMarginModel

If you have a margin account, the InteractiveBrokersBrokerageModel allows 2x leverage for Equities, 50x leverage for Forex, and 1x leverage for the remaining asset classes.

Settlement

The InteractiveBrokersBrokerageModel uses the ImmediateSettlementModel in most cases. If you trade US Equities or Equity Options with a cash account, it uses the DelayedSettlementModel.

Default Markets

The following table describes the default markets of each SecurityType for the InteractiveBrokersBrokerageModel:

SecurityTypeMarket
EquityUSA
OptionUSA
FutureCME
FutureOptionCME
IndexUSA
IndexOptionUSA
ForexOanda

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: