1. Does GET /portfolio/holdings return pnl , avg price only for the current holding or includes previous squaredoff trades pnl also 2. GET /portfolio/positions . Can I get pnl only for the last open position. Dont need the full day pnl. 3. GET /portfolio/positions . If I sell long term demat holdings will it also show in positions. Can I seperate that out ?
Does GET /portfolio/holdings return pnl , avg price only for the current holding or includes previous squaredoff trades pnl also
You can go through this article to understand avg holdings price calculation.
GET /portfolio/positions . Can I get pnl only for the last open position. Dont need the full day pnl.
You need to filter this from the net position using the Quantity field. Check the complete response field here.
GET /portfolio/positions . If I sell long term demat holdings will it also show in positions. Can I seperate that out ?
Yes. You can go through this article. You can filter those holding sells from positions using combined filter of exchange(NSE,BSE) and product i.e CNC.
CNC
.