Get Positions
API to retrieve the current positions for the user. These assets remain within the positions portfolio until they are either sold or reach their standard three-month expiration date in the case of derivatives. If any equity positions are carried overnight, they are automatically shifted to the holdings portfolio on the following trading day.
Header Parameters
Name | Required | Type | Description |
---|---|---|---|
Authorization | true | string | Requires the format Bearer access_token where access_token is obtained from the Token API. |
Accept | true | string | Defines the content format the client expects, which should be set to application/json . |
Responses
- 200
Response Body
{
"status": "success",
"data": [
{
"exchange": "NFO",
"multiplier": 1.0,
"value": 39.75,
"pnl": 26.25,
"product": "D",
"instrument_token": "NSE_FO|52618",
"average_price": 2.65,
"buy_value": 0.0,
"overnight_quantity": 15,
"day_buy_value": 0.0,
"day_buy_price": 0.0,
"overnight_buy_amount": 39.75,
"overnight_buy_quantity": 15,
"day_buy_quantity": 0,
"day_sell_value": 0.0,
"day_sell_price": 0.0,
"overnight_sell_amount": 0.0,
"overnight_sell_quantity": 0,
"day_sell_quantity": 0,
"quantity": 15,
"last_price": 1.75,
"unrealised": -658304.25,
"realised": -0.0,
"sell_value": 0.0,
"trading_symbol": "BANKNIFTY23OCT38000PE",
"tradingsymbol": "BANKNIFTY23OCT38000PE",
"close_price": 1.95,
"buy_price": 2.65,
"sell_price": 0.0
},
{
"exchange": "BSE",
"multiplier": 1.0,
"value": 0.8,
"pnl": 0.01,
"product": "D",
"instrument_token": "BSE_EQ|INE220J01025",
"average_price": null,
"buy_value": 0.8,
"overnight_quantity": 0,
"day_buy_value": 0.8,
"day_buy_price": 0.8,
"overnight_buy_amount": 0.0,
"overnight_buy_quantity": 0,
"day_buy_quantity": 1,
"day_sell_value": 0.0,
"day_sell_price": 0.0,
"overnight_sell_amount": 0.0,
"overnight_sell_quantity": 0,
"day_sell_quantity": 0,
"quantity": 1,
"last_price": 0.81,
"unrealised": 0.01,
"realised": -0.0,
"sell_value": 0.0,
"trading_symbol": "FCONSUMER",
"tradingsymbol": "FCONSUMER",
"close_price": 0.8,
"buy_price": 0.8,
"sell_price": 0.0
},
{
"exchange": "MCX",
"multiplier": 1.0,
"value": 5867.0,
"pnl": 6005.0,
"product": "D",
"instrument_token": "MCX_FO|259711",
"average_price": 5867.0,
"buy_value": 0.0,
"overnight_quantity": 1,
"day_buy_value": 0.0,
"day_buy_price": 0.0,
"overnight_buy_amount": 5867.0,
"overnight_buy_quantity": 1,
"day_buy_quantity": 0,
"day_sell_value": 0.0,
"day_sell_price": 0.0,
"overnight_sell_amount": 0.0,
"overnight_sell_quantity": 0,
"day_sell_quantity": 0,
"quantity": 1,
"last_price": 6005.0,
"unrealised": 0.0,
"realised": -0.0,
"sell_value": 0.0,
"trading_symbol": "GOLDPETAL23DECFUT",
"tradingsymbol": "GOLDPETAL23DECFUT",
"close_price": 6005.0,
"buy_price": 5867.0,
"sell_price": 0.0
},
{
"exchange": "CDS",
"multiplier": 1000.0,
"value": 5.0,
"pnl": 2.5,
"product": "D",
"instrument_token": "NCD_FO|13177",
"average_price": 0.005,
"buy_value": 0.0,
"overnight_quantity": 1,
"day_buy_value": 0.0,
"day_buy_price": 0.0,
"overnight_buy_amount": 0.005,
"overnight_buy_quantity": 1,
"day_buy_quantity": 0,
"day_sell_value": 0.0,
"day_sell_price": 0.0,
"overnight_sell_amount": 0.0,
"overnight_sell_quantity": 0,
"day_sell_quantity": 0,
"quantity": 1,
"last_price": 0.0025,
"unrealised": -83265.0,
"realised": -0.0,
"sell_value": 0.0,
"trading_symbol": "USDINR23OCT85.5CE",
"tradingsymbol": "USDINR23OCT85.5CE",
"close_price": 0.0025,
"buy_price": 0.005,
"sell_price": 0.0
},
{
"exchange": "NSE",
"multiplier": 1.0,
"value": 0.0,
"pnl": 0.45,
"product": "D",
"instrument_token": "NSE_EQ|INE062A01020",
"average_price": null,
"buy_value": 570.95,
"overnight_quantity": 0,
"day_buy_value": 570.95,
"day_buy_price": 570.95,
"overnight_buy_amount": 0.0,
"overnight_buy_quantity": 0,
"day_buy_quantity": 1,
"day_sell_value": 571.4,
"day_sell_price": 571.4,
"overnight_sell_amount": 0.0,
"overnight_sell_quantity": 0,
"day_sell_quantity": 1,
"quantity": 0,
"last_price": 571.2,
"unrealised": 0.0,
"realised": 0.45,
"sell_value": 571.4,
"trading_symbol": "SBIN",
"tradingsymbol": "SBIN",
"close_price": 572.65,
"buy_price": 570.95,
"sell_price": 571.4
}
]
}
Name | Type | Description |
---|---|---|
status | string | A string indicating the outcome of the request. Typically success for successful operations. |
data | object[] | Response data for position details |
data[].exchange | string | Exchange to which the order is associated. Valid exchanges can be found in the Exchange Appendix |
data[].multiplier | float | The quantity/lot size multiplier used for calculating P&Ls |
data[].value | float | Net value of the position |
data[].pnl | float | Profit and loss - net returns on the position |
data[].product | string | Signifies if the order was either Intraday, Delivery or CO. Possible values: I , D , CO , MTF . |
data[].instrument_token | string | Key of the instrument. For the regex pattern applicable to this field, see the Field Pattern Appendix. |
data[].average_price | float | Average price at which the net position quantity was acquired |
data[].buy_value | float | Net value of the bought quantities |
data[].overnight_quantity | int32 | Quantity held previously and carried forward over night |
data[].day_buy_value | float | Amount at which the quantity is bought during the day |
data[].day_buy_price | float | Average price at which the day qty was bought. Default is empty string |
data[].overnight_buy_amount | float | Amount at which the quantity was bought in the previous session |
data[].overnight_buy_quantity | int32 | Quantity bought in the previous session |
data[].day_buy_quantity | int32 | Quantity bought during the day |
data[].day_sell_value | float | Amount at which the quantity is sold during the day |
data[].day_sell_price | float | Average price at which the day quantity was sold |
data[].overnight_sell_amount | float | Amount at which the quantity was sold in the previous session |
data[].overnight_sell_quantity | int32 | Quantity sold short in the previous session |
data[].day_sell_quantity | int32 | Quantity sold during the day |
data[].quantity | int32 | Quantity left after nullifying Day and CF buy quantity towards Day and CF sell quantity |
data[].last_price | float | Last traded market price of the instrument |
data[].unrealised | float | Day PnL generated against open positions |
data[].realised | float | Day PnL generated against closed positions |
data[].sell_value | float | Net value of the sold quantities |
data[].trading_symbol | string | Shows the trading symbol of the instrument |
data[].close_price | float | Closing price of the instrument from the last trading day |
data[].buy_price | float | Average price at which quantities were bought |
data[].sell_price | float | Average price at which quantities were sold |
Notice of Deprecation
The lowercase field (tradingsymbol
) is deprecated and will be removed in future versions. Use the snake_case versions for consistency.
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...