Skip to content

Margins

Use the below apis to fetch margin requirements:

method endpoint use case Rate Limit
POST /margins/basket Fetch margin requirement for a collection for orders 1/sec
POST /margins/order Fetch margin requirement for one order 1/sec

Basket Margin

Use this api to calculate final margin and required margin for a collection of orders

Endpoint: /margins/basket

Basket Margin Object

{
    "orders": [
        {
            "token": 22,
            "exchange": "NSE_EQ",
            "transaction_type": "BUY",
            "product_type": "INTRADAY",
            "variety": "RL",
            "quantity": 1,
            "price": 1122.35
        }
    ]
}
field description
quantity Quantity of the order. For NSE_FO segments, quantity is lots * lot_size. For all others, enter just the number of lots
price Total margin which will be blocked in the system after executing all the orders

Basket Margin Response

{
    "status": "success",
    "initial_margin": 224.47,
    "required_margin": 224.47,
}
field description
initial_margin Total margin which is required to place all orders
required_margin Total margin which will be blocked in the system after executing all the orders

Note

Initial margin is dependent on the sequence in which you have passed the orders. This is particularly visible in orders that create a spread.

Order Margin

Use this api to find the margin required to place a single order

Endpoint: /margins/order

Order Margin Object

{
    "token": 57270,
    "exchange": "NSE_FO",
    "transaction_type": "BUY",
    "product": "INTRADAY",
    "variety": "RL",
    "quantity": 50,
    "price": 80,
    "mode": "MODIFY",
    "old_quantity": 50, 
    "old_price": 50
}
field description
mode Possible values: [NEW, MODIFY] , Whether you are trying to modify an existing order or placing a new order.
price Price in INR
old_price Old Price in INR. Required if mode is MODIFY
quantity For NSE_FO segments, quantity is lots * lot_size. For all others, enter just the number of lots
old_quantity For NSE_FO segments, old_quantity is lots * lot_size. For all others, enter just the number of lots. Required if mode is MODIFY