Supported Models



This page explains the OandaBrokerageModel, including the asset classes it supports, its default security-level models, and it's default markets.

SetBrokerageModel(BrokerageName.OandaBrokerage, AccountType.Margin);
self.set_brokerage_model(BrokerageName.OANDA_BROKERAGE, AccountType.MARGIN)

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

Asset Classes

The OandaBrokerageModel supports trading Forex and CFDs.


The OandaBrokerageModel supports several order types, the TimeInForce order property, and order updates.

Order Types

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

Order TypeForexCFD
Marketgreen checkgreen check
Limitgreen checkgreen check
Stop marketgreen checkgreen check

Time In Force

The OandaBrokerageModel the GoodTilCanceledGOOD_TIL_CANCELED TimeInForce.

DefaultOrderProperties.TimeInForce = TimeInForce.GoodTilCanceled;
LimitOrder(_symbol, quantity, limitPrice);
self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
self.limit_order(self._symbol, quantity, limit_price)


The OandaBrokerageModel supports order updates.


The OandaBrokerageModel uses the ImmediateFillModel.


The OandaBrokerageModel uses the NullSlippageModel.



The OandaBrokerageModel uses the ConstantFeeModel with zero fees. OANDA offers "Spread" and "Core + Commission" pricing models. Our data is the spread dataset, so we model the spread pricing. To estimate OANDA Core+Commission data, use a custom fee model and a custom fill model.

security.SetFeeModel(new ConstantFeeModel(0.0m));

Buying Power

The OandaBrokerageModel uses the SecurityMarginModel and allows up to 50x leverage.


The OandaBrokerageModel uses the ImmediateSettlementModel for Forex trades and the AccountCurrencyImmediateSettlementModel for CFD trades.

Margin Interest Rate

The OandaBrokerageModel uses the NullMarginInterestRateModel.

Default Markets

The default market of the OandaBrokerageModel is Market.OandaMarket.OANDA.

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: