Margin calculation

Margin calculation APIs lets you calculate span, exposure, option premium, additional, bo, cash, var, pnl values for a list of orders.

type endpoint  
POST /margins/orders Calculates margins for each order considering the existing positions and open orders


Requests to the above endpoints are JSON POST and it needs application/json header.

Order margins

Request order structure
Response margin structure

curl \
    -H 'X-Kite-Version: 3' \
    -H 'Authorization: token api_key:access_token' \
    -H 'Content-Type: application/json' \
    -d '[
        "exchange": "NSE",
        "tradingsymbol": "INFY",
        "transaction_type": "BUY",
        "variety": "regular",
        "product": "CNC",
        "order_type": "MARKET",
        "quantity": 1,
        "price": 0,
        "trigger_price": 0
    "status": "success",
    "data": [
            "type": "equity",
            "tradingsymbol": "INFY",
            "exchange": "NSE",
            "span": 0,
            "exposure": 0,
            "option_premium": 0,
            "additional": 0,
            "bo": 0,
            "cash": 0,
            "var": 961.45,
            "pnl": {
                "realised": 0,
                "unrealised": 0
            "total": 961.45

Order structure

exchange Name of the exchange
transaction_type BUY/SELL
variety Order variety (regular, amo, bo, co etc.)
product Margin product to use for the order (margins are blocked based on this) ?
order_type Order type (MARKET, LIMIT etc.)
quantity Quantity of the order
price Price at which the order is going to be placed (LIMIT orders)
trigger_price Trigger price (for SL, SL-M, CO orders)

Margin structure

type equity/commodity
tradingsymbol Trading symbol of the instrument
exchange Name of the exchange
span SPAN margins
exposure Exposure margins
option_premium Option premium
additional Additional margins
bo BO margins
cash Cash credit
var VAR
pnl Reliased and unreliased profit and loss
total Total margin block