---
title: "Interactive Brokers"
description: "This page explains the default security-level models and markets of the InteractiveBrokersBrokerageModel."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/brokerages/supported-models/interactive-brokers
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/brokerages/supported-models/interactive-brokers.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/24%20Reality%20Modeling/05%20Brokerages/02%20Supported%20Models/02%20Interactive%20Brokers
modified: 2026-10-29
index: https://www.quantconnect.com/llms.txt
---

# Interactive Brokers

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Reality Modeling > Brokerages > [Supported Models](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/brokerages/supported-models.md) > Interactive Brokers

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

## Introduction

This page explains the Interactive Brokers brokerage models, including the asset classes they support, their default [security-level models](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/key-concepts.md#02-Security-Level-Models), and their default markets.

```python
# IB API (Trader Workstation and IB Gateway)
self.set_brokerage_model(BrokerageName.INTERACTIVE_BROKERS_BROKERAGE, AccountType.CASH)
self.set_brokerage_model(BrokerageName.INTERACTIVE_BROKERS_BROKERAGE, AccountType.MARGIN)

# IB FIX
self.set_brokerage_model(BrokerageName.INTERACTIVE_BROKERS_FIX, AccountType.MARGIN)
```

The `InteractiveBrokersFixModel` inherits the `InteractiveBrokersBrokerageModel` and adjusts the supported orders to the IB FIX connection.

For more information about these models, see their respective class reference and implementation.

| Model | Class Reference | Implementation |
| --- | --- | --- |
| `InteractiveBrokersBrokerageModel` | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://www.lean.io/docs/v2/lean-engine/class-reference/py/QuantConnect/Brokerages/InteractiveBrokersBrokerageModel/) | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://github.com/QuantConnect/Lean/blob/master/Common/Brokerages/InteractiveBrokersBrokerageModel.cs) |
| `InteractiveBrokersFixModel` | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://www.lean.io/docs/v2/lean-engine/class-reference/py/QuantConnect/Brokerages/InteractiveBrokersFixModel/) | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://github.com/QuantConnect/Lean/blob/master/Common/Brokerages/InteractiveBrokersFixModel.cs) |

## Asset Classes

The `InteractiveBrokersBrokerageModel` supports the following asset classes:

- [US Equities](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/us-equity.md)
- [Equity Options](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/equity-options.md)
- [Forex](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/forex.md)
- [Futures](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/futures.md)
- [Future Options](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/future-options.md)
- [Indices](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/index.md)
- [Index Options](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/index-options.md)
- [CFD](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/cfd.md)

## Orders

The `InteractiveBrokersBrokerageModel` supports several order types, order properties, and order updates.

### Order Types

The following table describes the order types that the `InteractiveBrokersBrokerageModel` supports: supports. For specific details about each order type, refer to the [IB](https://qnt.co/interactive-brokers) documentation.

| Order Type | IB Documentation Page |
| --- | --- |
| [Market](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/market-orders.md) | [Market Orders](https://www.interactivebrokers.com/en/index.php?f=602) |
| [Limit](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/limit-orders.md) | [Limit Orders](https://www.interactivebrokers.com/en/index.php?f=593) |
| [Limit if touched](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/limit-if-touched-orders.md) | [Limit if Touched Orders](https://www.interactivebrokers.com/en/index.php?f=592) |
| [Stop market](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/stop-market-orders.md) | [Stop Orders](https://www.interactivebrokers.com/en/index.php?f=609) |
| [Stop limit](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/stop-limit-orders.md) | [Stop-Limit Orders](https://www.interactivebrokers.com/en/index.php?f=608) |
| [Trailing stop](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/trailing-stop-orders.md) | [Trailing Stop Orders](https://www.interactivebrokers.com/en/trading/orders/trailing-stops.php) |
| [Market on open](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/market-on-open-orders.md) | [Market-on-Open (MOO) Orders](https://www.interactivebrokers.com/en/index.php?f=598) |
| [Market on close](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/market-on-close-orders.md) | [Market-on-Close (MOC) Orders](https://www.interactivebrokers.com/en/index.php?f=599) |
| [Combo market](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/combo-market-orders.md) | [Spread Orders](https://www.interactivebrokers.com/en/trading/orders/spread.php) |
| [Combo limit](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/combo-limit-orders.md) | [Spread Orders](https://www.interactivebrokers.com/en/trading/orders/spread.php) |
| [Combo leg limit](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/combo-leg-limit-orders.md) | [Spread Orders](https://www.interactivebrokers.com/en/trading/orders/spread.php) |
| [Exercise Option](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/option-exercise-orders.md) | [Options Exercise](https://www.interactivebrokers.ca/en/trading/exerciseCloseout.php) |

The following table describes the available order types for each asset class that the `InteractiveBrokersBrokerageModel` supports:

| Order Type | US Equity | Equity Options | Forex | Futures | Futures Options | Index Options | CFD |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [Market](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/market-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Limit](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/limit-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Limit if touched](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/limit-if-touched-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Stop market](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/stop-market-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Stopl imit](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/stop-limit-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Trailing stop](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/trailing-stop-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Market on open](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/market-on-open-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Market on close](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/market-on-close-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Combo market](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/combo-market-orders.md) |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |
| [Combo limit](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/combo-limit-orders.md) |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |
| [Combo leg limit](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/combo-leg-limit-orders.md) |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |
| [Exercise Option](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/option-exercise-orders.md) |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) Not supported for cash-settled Options |  |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |  |
| [Bracket](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/contingent-orders/bracket-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [One cancels other](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/contingent-orders/one-cancels-other-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [One triggers other](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/contingent-orders/one-triggers-other-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [One updates other](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/contingent-orders/one-updates-other-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |

The `InteractiveBrokersFixModel` supports the preceding order types, except limit if touched, combo leg limit, exercise Option, and contingent orders. It also rejects combo orders that mix Future and Future Option legs.

### Order Properties

The `InteractiveBrokersBrokerageModel` supports custom order properties. The following table describes the members of the `InteractiveBrokersOrderProperties` object that you can set to customize order execution. The table does not include the [methods for FA accounts](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/brokerages/supported-models/interactive-brokers.md#18-Financial-Advisors).

| Property | Data Type | Description | Default Value |
| --- | --- | --- | --- |
| `time_in_force` | `TimeInForce` | A [TimeInForce](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-properties.md#03-Time-In-Force) instruction to apply to the order. The following instructions are supported: `DAY` `GOOD_TIL_CANCELED` `good_til_date` | `TimeInForce.GOOD_TIL_CANCELED` |
| `outside_regular_trading_hours` | `bool` | A flag to signal that the order may be triggered and filled outside of regular trading hours. | `False` |

```python
def initialize(self) -> None:
    # Set the default order properties
    self.default_order_properties = InteractiveBrokersOrderProperties()
    self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
    self.default_order_properties.outside_regular_trading_hours = False

def on_data(self, slice: Slice) -> None:
    # Use default order order properties
    self.limit_order(self._symbol, quantity, limit_price)

    # Override the default order properties
    order_properties = InteractiveBrokersOrderProperties()
    order_properties.time_in_force = TimeInForce.DAY
    order_properties.outside_regular_trading_hours = True
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    order_properties.time_in_force = TimeInForce.good_til_date(datetime(year, month, day))
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
```

The `InteractiveBrokersFixModel` supports custom order properties. The following table describes the members of the `InteractiveBrokersFixOrderProperties` object that you can set to customize order execution:

| Property | Data Type | Description | Default Value |
| --- | --- | --- | --- |
| `time_in_force` | `TimeInForce` | A [TimeInForce](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-properties.md#03-Time-In-Force) instruction to apply to the order. The following instructions are supported: `DAY` `GOOD_TIL_CANCELED` | `TimeInForce.GOOD_TIL_CANCELED` |
| `account` | `str` | The linked account for which to submit the order (only used by Financial Advisors). |  |

```python
def initialize(self) -> None:
    # Set the default order properties
    self.default_order_properties = InteractiveBrokersFixOrderProperties()
    self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
    self.default_order_properties.account = "DU123456"
```

### Contingent Orders

IB accepts sets of [contingent orders](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/contingent-orders.md) of any size, including sets with orders for different securities, chains of triggered orders, and combo orders. If another order triggers a trailing stop order, the parent order must be a limit order or a stop limit order.

### Updates

The `InteractiveBrokersBrokerageModel` supports [order updates](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-management/order-tickets.md#04-Update-Orders).

### Financial Advisor Group Orders

To place FA group orders, see [Financial Advisors](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/brokerages/supported-models/interactive-brokers.md#18-Financial-Advisors).

### Fractional Trading

The `InteractiveBrokersBrokerageModel` doesn't support [fractional trading](https://www.interactivebrokers.com/en/trading/fractional-trading.php).

### Handling Splits

If you're using raw [data normalization](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/us-equity/requesting-data.md#11-Data-Normalization) and you have active orders with a limit, stop, or trigger price in the market for a US Equity when a [stock split](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/us-equity/corporate-actions.md#02-Splits) occurs, the following properties of your orders automatically adjust to reflect the stock split:

- Quantity
- Limit price
- Stop price
- Trigger price

### Order Size Limits

The `InteractiveBrokersBrokerageModel` enforces the [Spot Currency Minimum/Maximum Order Sizes](https://www.interactivebrokers.com/en/trading/forexOrderSize.php) from the IB website.

## Fills

The following table shows the [fill model](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/trade-fills/key-concepts.md) that the `InteractiveBrokersBrokerageModel` uses for each `SecurityType`:

| `SecurityType` | Fill Model |
| --- | --- |
| `Equity` | [EquityFillModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/trade-fills/supported-models/equity-model.md) |
| `Future` | [FutureFillModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/trade-fills/supported-models/future-model.md) |
| `FutureOption` | [FutureOptionFillModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/trade-fills/supported-models/future-option-model.md) |
| Remaining `SecurityType` values | [ImmediateFillModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/trade-fills/supported-models/immediate-model.md) |

## Slippage

The `InteractiveBrokersBrokerageModel` uses the [NullSlippageModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/slippage/supported-models.md#02-Null-Model).

## Fees

The `InteractiveBrokersBrokerageModel` uses the [InteractiveBrokersFeeModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/transaction-fees/supported-models.md#13-Interactive-Brokers-Model) with the default argument values. We model current [Interactive Brokers](https://qnt.co/interactive-brokers) fees on all assets.

## Buying Power

The `InteractiveBrokersBrokerageModel` 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 Class | Model |
| --- | --- |
| Equity Options | `OptionMarginModel` |
| Futures | `FutureMarginModel` |
| Future Options | `FuturesOptionsMarginModel` |
| Index Options | `OptionMarginModel` |
| Crypto | `CashBuyingPowerModel` for cash accounts or `BuyingPowerModel` for margin accounts |
| CryptoFuture | `CryptoFutureMarginModel` |
| Forex | `CashBuyingPowerModel` for cash accounts or `BuyingPowerModel` for margin accounts |
| Other | `BuyingPowerModel` |

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

## Settlement

The `InteractiveBrokersBrokerageModel` uses the [ImmediateSettlementModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/supported-models.md#02-Immediate-Model) in most cases. If you trade US Equities or Equity Options with a cash account, it uses the [DelayedSettlementModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/supported-models.md#03-Delayed-Model) with the [default settlement rules](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/key-concepts.md#03-Default-Behavior).

The following table shows which [settlement model](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/key-concepts.md) the `InteractiveBrokersBrokerageModel` uses based on the security type and your account type:

| Security Type | Account Type | Settlement Model |
| --- | --- | --- |
| Equity | Cash | [DelayedSettlementModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/supported-models.md#03-Delayed-Model) with the default settlement rules |
| Option | Cash | [DelayedSettlementModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/supported-models.md#03-Delayed-Model) with the default settlement rules |
| Future | Any | [FutureSettlementModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/supported-models.md#05-Future-Model) |

For all other cases, the `InteractiveBrokersBrokerageModel` uses the [ImmediateSettlementModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/supported-models.md#02-Immediate-Model).

```python
# For US Equities with a cash account:
security.set_settlement_model(DelayedSettlementModel(Equity.DEFAULT_SETTLEMENT_DAYS, Equity.DEFAULT_SETTLEMENT_TIME))

# For Equity Options with a cash account:
security.set_settlement_model(DelayedSettlementModel(Option.DEFAULT_SETTLEMENT_DAYS, Option.DEFAULT_SETTLEMENT_TIME))

# For remaining cases:
security.set_settlement_model(ImmediateSettlementModel())
```

Interactive Brokers doesn't provide information on which assets aren't settled, so we assume each live trading session starts with its cash fully settled.

## Margin Interest Rate

The `InteractiveBrokersBrokerageModel` uses the [NullMarginInterestRateModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/margin-interest-rate/supported-models.md#02-Null-Model).

## Default Markets

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

| `SecurityType` | `Market` |
| --- | --- |
| `Equity` | `USA` |
| `Option` | `USA` |
| `Future` | `CME` |
| `FutureOption` | `CME` |
| `Index` | `USA` |
| `IndexOption` | `USA` |
| `Forex` | `Oanda` |
| `Cfd` | `InteractiveBrokers` |

## Financial Advisors

[IB](https://qnt.co/interactive-brokers) supports FA accounts for Trading Firm and Institution organizations. FA accounts enable certified professionals to use a single trading algorithm to manage several client accounts.

To place trades using a subset of client accounts, [create Account Groups in Trader Workstation](https://www.ibkrguides.com/traderworkstation/create-an-account-group-for-share-allocation.htm) and then define the `InteractiveBrokersOrderProperties` when you create orders.

```python
self.default_order_properties = InteractiveBrokersOrderProperties()
self.default_order_properties.fa_group = "TestGroupEQ"
self.default_order_properties.fa_method = "Equal"
self.default_order_properties.account = "DU123456"
```

[SecurityHolding](https://www.quantconnect.com/docs/v2/writing-algorithms/portfolio/holdings.md) objects aggregate your positions across all the account groups. If you have two groups where group A has 10 shares of SPY and group B has -10 shares of SPY, then `self.portfolio["SPY"].quantity` is zero.

LEAN supports several allocation methods for FA group orders. If you intend to use the same group allocation method for every order, set the `default_order_properties` of your algorithm, which sets the order properties for all of your orders.

```python
def initialize(self) -> None:
    # Set the default order properties
    self.default_order_properties = InteractiveBrokersOrderProperties()
    self.default_order_properties.fa_group = "TestGroupEQ"
    self.default_order_properties.fa_method = "Equal"
    self.default_order_properties.account = "DU123456"

def on_data(self, slice: Slice) -> None:
    # Use default order order properties
    LimitOrder(_symbol, quantity, limitPrice);
```

To adjust the order properties of an order, change the `default_order_properties` or pass an [order properties object](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-properties.md) to the [order method](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types.md). The following sections explain the FA group allocation methods.

### Equal

This group allocation method distributes shares equally between all accounts in the group. When you use this method, you need to specify an order quantity.

For example, say your Account Group includes four accounts and you place an order to buy 400 shares of a stock. In this case, each account receives 100 shares. If your Account Group includes six accounts, each account receives 66 shares, and then 1 share is allocated to each account until all are distributed. After you submit the order, your algorithm receives [order events](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-events.md) to track the order progress. When all the shares are bought, the order status is `OrderStatus.FILLED`. If one of the accounts in the group can't afford 10 of the shares it needs to buy, 10 shares are cancelled and you'll only end up buying 390 shares in total.

```python
order_properties = InteractiveBrokersOrderProperties()
order_properties.fa_method = "Equal"
self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
```

### Net Liquidation Value

This group allocation method distributes shares based on the net liquidation value of each account. The system calculates ratios based on the net liquidation value in each account and allocates shares based on these ratios. When you use this method, you need to specify an order quantity.

For example, say your account group includes three accounts, A, B and C with Net Liquidation values of $25,000, $50,000 and $100,000, respectively. In this case, the system calculates a ratio of 1:2:4. If you place an order for 700 shares of a stock, it allocates 100 shares to Client A, 200 shares to Client B, and 400 shares to Client C.

```python
order_properties = InteractiveBrokersOrderProperties()
order_properties.fa_method = "NetLiq"
self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
```

### Available Equity

This group allocation method distributes shares based on the amount of available equity in each account. The system calculates ratios based on the available equity in each account and allocates shares based on these ratios. When you use this method, you need to specify an order quantity.

For example, say your account group includes three accounts, A, B and C with available equity of $25,000, $50,000 and $100,000, respectively. In this case, the system calculates a ratio of 1:2:4. If you place an order for 700 shares of a stock, it allocates 100 shares to Client A, 200 shares to Client B, and 400 shares to Client C.

```python
order_properties = InteractiveBrokersOrderProperties()
order_properties.fa_method = "AvailableEquity"
self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
```

## Account Currency

The `InteractiveBrokersBrokerageModel` doesn't set a default currency. To change the algorithm's currency from USD to a different currency, see [Set Account Currency](https://www.quantconnect.com/docs/v2/writing-algorithms/initialization.md#03-Set-Account-Currency).
