Skip to Content

Get Positions

This API allows you to fetch your open and closed positions for the current trading day.

USE CASE

Check the net quantity, average price and profit or loss of each position.

Note

Live Streaming — Receive live position updates through the General WebSocket. View General WebSocket Overview documentation.

Previous trading day’s closed positions are not shown here.

Details

  • Fetches the current open and closed positions for the current trading day. Note that previous trading day’s closed positions will not be shown here.
  • Open and closed positions of the current trading day are returned in netPositions, and the account totals come in a separate overall object.
  • id is the position id, for example NSE:SBIN-EQ-INTRADAY (symbol plus product type). Use it with Exit Position by ID, Convert Position and the stop loss APIs.
  • side shows whether the position is long or short, and qty is the absolute value of netQty.
  • realized_profit is the profit or loss already booked and pl is the total. cfBuyQty and cfSellQty are carry forward quantities; dayBuyQty and daySellQty are today's.
  • For cross currency positions use rbiRefRate, and for commodity positions qtyMulti_com, when you calculate P&L yourself.
  • slNo is deprecated. Do not rely on it to sort positions.
  • Rate limits differ between the Standard and Prime plans. See Plans & rate limits.

Response Attributes - For each position

AttributeData TypeDescription
symbolstringEg: NSE:SBIN-EQ
idstringThe unique value for each position
buyAvgfloatAverage buy price
buyQtyintTotal buy qty
sellAvgfloatAverage sell price
sellQtyintTotal sell qty
netAvgfloatnetAvg
netQtyintNet qty
sideint
  • The side shows whether the position is long / short
  • View Details
qtyintAbsolute value of net qty
productTypestring
realized_profitfloatThe realized p&l of the position
plfloatThe total p&l of the position
crossCurrencystring
  • Y => It is cross currency position
  • N => It is not a cross currency position
rbiRefRatefloatIncase of cross currency position, the rbi reference rate will be required to calculate the p&l
qtyMulti_comfloatIncase of commodity positions, this multiplier is required for p&l calculation
segmentint
exchangeint
ltpfloatLTP is the price from which the next sale of the stocks happens
fytokenstring
  • Fytoken is a unique identifier for every symbol.
  • View Details
cfBuyQtyintCarry forward buy quantity
cfSellQtyintCarry forward sell quantity
dayBuyQtyintDay forward buy quantity
daySellQtyintDay forward sell quantity
exchangeint
slNoint---Deprecated--- This is used for sorting of positions

Response Attributes - Overall Positions

AttributeData TypeDescription
count_totalintTotal number of positions present
count_openintTotal number of positions opened
pl_totalfloatTotal profit and losses
pl_realizedfloatProfit and losses when the owned product is sold
pl_unrealizedfloatProfit and loses when the product is owned , but is not sold
Last updated on