Supported Models



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

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

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

Asset Classes

The SamcoBrokerageModel supports trading the following asset classes:


The SamcoBrokerageModel supports several order types, order properties, and order updates.

Order Types

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

Order TypeIndia Equity
MarketOrdergreen check
LimitOrdergreen check
StopMarketOrdergreen check

Order Properties

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

ExchangeSelect the exchange for sending the order to. The following instructions are available:
  • NSE
  • BSE
ProductType A ProductType instruction to apply to the order. The IndiaProductType enumeration has the following members:
TimeInForceA TimeInForce instruction to apply to the order. The following instructions are available:
  • Day
  • GoodTilCanceled
  • GoodTilDate
public override void Initialize()
    // Set default order properties
    DefaultOrderProperties = new IndiaOrderProperties(Exchange.NSE, IndiaOrderProperties.IndiaProductType.NRML)
        TimeInForce = TimeInForce.GoodTilCanceled,

public override void OnData(Slice slice)
    // Use default order order properties
    LimitOrder(_symbol, quantity, limitPrice);
    // Override the default order properties
    LimitOrder(_symbol, quantity, limitPrice, 
               orderProperties: new IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.IndiaProductType.MIS)
                   TimeInForce = TimeInForce.Day,
    LimitOrder(_symbol, quantity, limitPrice, 
               orderProperties: new IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.IndiaProductType.CNC)
                   TimeInForce = TimeInForce.GoodTilDate,
def Initialize(self) -> None:
    # Set the default order properties
    self.DefaultOrderProperties = IndiaOrderProperties(Exchange.NSE, IndiaOrderProperties.IndiaProductType.NRML)
    self.DefaultOrderProperties.TimeInForce = TimeInForce.GoodTilCanceled

def OnData(self, slice: Slice) -> None:
    # Use default order order properties
    self.LimitOrder(self.symbol, quantity, limit_price)
    # Override the default order properties
    order_properties = IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.IndiaProductType.MIS)
    order_properties.TimeInForce = TimeInForce.Day
    self.LimitOrder(self.symbol, quantity, limit_price, orderProperties=order_properties)

    order_properties = IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.IndiaProductType.CNC)
    order_properties.TimeInForce = TimeInForce.GoodTilDate
    self.LimitOrder(self.symbol, quantity, limit_price, orderProperties=order_properties)


The SamcoBrokerageModel supports order updates.

Handling Splits

If you're using raw 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 occurs, the following properties of your orders automatically adjust to reflect the stock split:

  • Quantity
  • Limit price
  • Stop price
  • Trigger price


The SamcoBrokerageModel uses the EquityFillModel.


The SamcoBrokerageModel uses the ConstantSlippageModel with zero slippage.

security.SetSlippageModel(new ConstantSlippageModel(0));


The SamcoBrokerageModel uses the SamcoFeeModel.

Buying Power

The SamcoBrokerageModel uses the SecurityMarginModel. If you have a margin account, the SamcoBrokerageModel allows up to 5x leverage.


The SamcoBrokerageModel uses the ImmediateSettlementModel for margin accounts and the DelayedSettlementModel with the default settlement rules for cash accounts.

// For cash accounts:
security.SettlementModel = new DelayedSettlementModel(Equity.DefaultSettlementDays, Equity.DefaultSettlementTime);

// For margin accounts:
security.SettlementModel = new ImmediateSettlementModel();
# For cash accounts:
security.SettlementModel = DelayedSettlementModel(Equity.DefaultSettlementDays, Equity.DefaultSettlementTime)

# For margin accounts:
security.SettlementModel = ImmediateSettlementModel()

Margin Interest Rate

The SamcoBrokerageModel uses the NullMarginInterestRateModel.

Default Markets

The default market of the SamcoBrokerageModel is Market.India.

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: