Drafts
SamcoBrokerageModel
Introduction
This page explains the SamcoBrokerageModel, including the asset classes it supports, its default security-level models, and its default markets.
SetBrokerageModel(BrokerageName.Samco, AccountType.Cash); SetBrokerageModel(BrokerageName.Samco, AccountType.Margin);
self.set_brokerage_model(BrokerageName.SAMCO, AccountType.CASH) self.set_brokerage_model(BrokerageName.SAMCO, AccountType.MARGIN)
For more information about this model, see the class reference and implementation.
For more information about this model, see the class reference and implementation.
Orders
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 Type | India Equity |
|---|---|
| Market | ![]() |
| Limit | ![]() |
| Stop market | ![]() |
Order Properties
We model custom order properties from the Samco API. The following table describes the members of the IndiaOrderProperties object that you can set to customize order execution:
| Property | Data Type | Description | Default Value |
|---|---|---|---|
Exchangeexchange | Exchange | Select the exchange for sending the order to. The following instructions are available:
| |
ProductTypeproduct_type | stringstr |
A ProductTypeproduct_type instruction to apply to the order. The IndiaOrderProperties.IndiaProductType enumeration has the following members:
| |
TimeInForcetime_in_force | TimeInForce | A TimeInForce instruction to apply to the order. The following instructions are available:
| TimeInForce.GoodTilCanceledTimeInForce.GOOD_TIL_CANCELED |
Updates
We model the Samco API by supporting 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
Fills
The SamcoBrokerageModel uses the EquityFillModel.
Slippage
The SamcoBrokerageModel uses the NullSlippageModel.
Fees
The SamcoBrokerageModel uses the SamcoFeeModel.
Settlement
The SamcoBrokerageModel uses the ImmediateSettlementModel for margin accounts and the DelayedSettlementModel with the default settlement rules for cash accounts.
// For cash accounts: security.SetSettlementModel(new DelayedSettlementModel(Equity.DefaultSettlementDays, Equity.DefaultSettlementTime)); // For margin accounts: security.SetSettlementModel(new ImmediateSettlementModel());
# For cash accounts: security.set_settlement_model(DelayedSettlementModel(Equity.DEFAULT_SETTLEMENT_DAYS, Equity.DEFAULT_SETTLEMENT_TIME)) # For margin accounts: security.set_settlement_model(ImmediateSettlementModel())
Margin Interest Rate
The SamcoBrokerageModel uses the NullMarginInterestRateModel.
