delay in profit loss

When I calculate profit via open positions , api profit loss is delayed , how long is the delay ?
  • sujith
    You can refer to this similar thread.
  • vishnux

    pnl = (sellValue - buyValue) + (netQuantity * lastPrice * multiplier);

    Can I use all these values from get positions ? is lastPrice retrieved from get positions is realtime ?
  • sujith
    The whole point is to defer polling the positions. Now you want to calculate the same P&L with the last price provided in the same response.

    You need to use GetQuote or websocket to get the latest last traded price. The last price in the positions response is a cached value.
  • vishnux
    Hmm , I get it , it makes no sense why its cached , you could just interlink it with get quote and just give the pnl
Sign In or Register to comment.