Skip to main content

Margin Details

This API provides the functionality to retrieve the margin for an instrument. It accepts input parameters like the instrument, quantity, transaction_type and product.

Header Parameters

NameRequiredTypeDescription
AuthorizationtruestringRequires the format Bearer access_token where access_token is obtained from the Token API.
Content-TypetruestringIndicates the media type of the resource, set as application/json.
AccepttruestringDefines the content format the client expects, which should be set to application/json.

Request Body

{
"instruments": [
{
"instrument_key": "NSE_EQ|INE669E01016",
"quantity": 1,
"transaction_type": "BUY",
"product": "D",
"price": 16.8
}
]
}
NameRequiredTypeDescription
instrumentstruearrayRequest instruments for margin details.
instruments[].instrument_keytruestringKey of the instrument. For the regex pattern applicable to this field, see the Field Pattern Appendix.
instruments[].quantitytrueinteger (int32)Quantity with which the order is to be placed. It should be multiple of lot size.
instruments[].producttruestringProduct with which the order is to be placed.
Possible values: I, D, CO, MTF.
instruments[].transaction_typetruestringIndicates whether its a buy or sell order.
Possible values: BUY, SELL.
instruments[].pricefalsenumber (float)Price with which the order is to be placed
Responses

Response Body

{
"status": "success",
"data": {
"margins": [
{
"span_margin": 0,
"exposure_margin": 0,
"equity_margin": 33.6,
"net_buy_premium": 0,
"additional_margin": 0,
"total_margin": 33.6,
"tender_margin": 0
}
],
"required_margin": 33.6,
"final_margin": 33.6
}
}

Field Description

NameTypeDescription
statusstringA string indicating the outcome of the request. Typically success for successful operations.
dataobjectResponse data for margin
data.required_marginfloatTotal margin required to execute the orders.
data.final_marginfloatTotal margin after margin benefit.
data.marginsarrayResponse data for instrument margin. details.
data.margins[].equity_marginfloatMargin applicable for any equity trades
data.margins[].total_marginfloatTotal margin required for the basket.
It will be applicable for all the segments.
data.margins[].exposure_marginfloatExposure margin - Based on ELM percentage values provided by exchange.
It will be applicable only on FNO trades.
data.margins[].tender_marginfloatTender margin - It is applicable as the futures contract approaches its expiration date.
data.margins[].span_marginfloatSpan Margin - Upfront margin mandatory by exchange for derivatives trade.
It will be applicable only on FNO trades.
data.margins[].net_buy_premiumfloatNet Buy Premium - Option premium required.
data.margins[].additional_marginfloatAdditional margin - Application margin applicable on MCX FNO trade for certain commodities.

NOTE
  • Margin fields that are not applicable will be set to zero for a given instrument.
  • A maximum of 20 instruments is allowed per request

Examples

A comprehensive set of examples is provided to illustrate various use cases and implementation scenarios for this API. To view detailed examples and access sample code, please refer to: API Examples.

Loading...