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 separateoverallobject. idis the position id, for exampleNSE:SBIN-EQ-INTRADAY(symbol plus product type). Use it with Exit Position by ID, Convert Position and the stop loss APIs.sideshows whether the position is long or short, andqtyis the absolute value ofnetQty.realized_profitis the profit or loss already booked andplis the total.cfBuyQtyandcfSellQtyare carry forward quantities;dayBuyQtyanddaySellQtyare today's.- For cross currency positions use
rbiRefRate, and for commodity positionsqtyMulti_com, when you calculate P&L yourself. slNois 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
| Attribute | Data Type | Description |
|---|---|---|
symbol | string | Eg: NSE:SBIN-EQ |
id | string | The unique value for each position |
buyAvg | float | Average buy price |
buyQty | int | Total buy qty |
sellAvg | float | Average sell price |
sellQty | int | Total sell qty |
netAvg | float | netAvg |
netQty | int | Net qty |
side | int |
|
qty | int | Absolute value of net qty |
productType | string |
|
realized_profit | float | The realized p&l of the position |
pl | float | The total p&l of the position |
crossCurrency | string |
|
rbiRefRate | float | Incase of cross currency position, the rbi reference rate will be required to calculate the p&l |
qtyMulti_com | float | Incase of commodity positions, this multiplier is required for p&l calculation |
segment | int |
|
exchange | int |
|
ltp | float | LTP is the price from which the next sale of the stocks happens |
fytoken | string |
|
cfBuyQty | int | Carry forward buy quantity |
cfSellQty | int | Carry forward sell quantity |
dayBuyQty | int | Day forward buy quantity |
daySellQty | int | Day forward sell quantity |
exchange | int |
|
slNo | int | ---Deprecated--- This is used for sorting of positions |
Response Attributes - Overall Positions
| Attribute | Data Type | Description |
|---|---|---|
count_total | int | Total number of positions present |
count_open | int | Total number of positions opened |
pl_total | float | Total profit and losses |
pl_realized | float | Profit and losses when the owned product is sold |
pl_unrealized | float | Profit and loses when the product is owned , but is not sold |
Last updated on