Buy/Sell Value in positions API

kiteapi
kiteapi edited April 2021 in General
I understand from this link https://kite.trade/forum/discussion/3166/getposition-is-not-having-updated-value why it is *not* recommended to calculate PnL from polling positions API, as the last_price is a bit stale (more than a few minutes).

While I can do the calculation with the said formula in the above link by @sujith can you @sujith @rakeshr clarify that the buy/sell value and net qty is always up to date.
For eg: I take a new position and cover half of an existing position 1 second back and immediately poll the positions API, the response would contain the latest buy/sell values along with net qty always (hope it is not like last_price) and I can pass on the last_price which would give me the latest PnL?
  • rakeshr
    clarify that the buy/sell value and net qty is always up to date
    Yes, position API will return with an updated avg. price and Qty.
Sign In or Register to comment.