Margin
This guide describes how to calculate required margin for orders and get available user margin using the SDK.
Get Available User Margin
Easily retrieve your available margin details using this get_available_margin_details
method.
Python SDK Usage
Response Payload
All prices in rupees.
Response Schema
Name | Type | Description |
---|---|---|
clear_cash | float | Clear cash available |
net_margin_used | float | Net margin used |
brokerage_and_charges | float | Brokerage and charges |
collateral_used | float | Collateral used |
collateral_available | float | Collateral available |
adhoc_margin | float | Adhoc margin available |
net_fno_margin_used | float | Net FnO margin used |
span_margin_used | float | Span Margin Used |
exposure_margin_used | float | Exposure Margin Used |
future_balance_available | float | Future Balance Available |
option_buy_balance_available | float | Option Buy Balance Available |
option_sell_balance_available | float | Option Sell Balance Available |
net_equity_margin_used | float | Net equity margin used |
cnc_margin_used | float | CNC margin used |
mis_margin_used | float | MIS margin used |
cnc_balance_available | float | CNC balance available |
mis_balance_available | float | MIS balance available |
Required Margin For Order
Calculate the required margin for a single order or basket of orders using this get_order_margin_details
method. Basket orders are only supported for FNO
Segment.
Python SDK Usage
Request Schema
Name | Type | Description |
---|---|---|
trading_symbol * | string | Trading Symbol of the instrument as defined by the exchange |
quantity * | integer | Quantity of instrument to order |
price | decimal | Price of the instrument in rupees case of Limit order |
exchange * | string | Stock exchange |
segment * | string | Segment of the instrument such as CASH, FNO etc. |
product * | string | Product type |
order_type * | string | Order type |
transaction_type * | string | Transaction type of the trade |
*
required parameters
Response Payload
All prices in rupees.
Response Schema
Name | Type | Description |
---|---|---|
exposure_required | float | Margin required to cover the exposure for the trade. |
span_required | float | SPAN margin required for F&O trades (not applicable for equity cash segment). |
option_buy_premium | float | Premium amount required for buying options contracts. |
brokerage_and_charges | float | Total brokerage and other exchange-related charges for the order. |
total_requirement | float | Total margin requirement including all charges and margin components. |
cash_cnc_margin_required | float | Margin required for CNC (Cash & Carry) orders in the cash segment. |
cash_mis_margin_required | float | Margin required for MIS (Margin Intraday Square-off) orders in the cash segment. |
physical_delivery_margin_requirement | float | Additional margin required for physical settlement of derivative contracts. |