Realtime PNL from Kite API

prakash.jj
I would like to get realtime PNL in my algo but the Positions API is not giving realtime data. There is a very significant delay in Positions API. What is the alternative?
  • sujith
    You can refer to this thread.
  • prakash.jj
    prakash.jj edited January 2023
    @sujith I tried that formula as well. pnl = (sellValue - buyValue) + (netQuantity * lastPrice * multiplier); but then also its the same. I used lastprice from the Positions API. Should I be using the lastPrice from websocket?
  • sujith
    Yes, you need to pull last price from websocket or quote API.
Sign In or Register to comment.