Hi I have seen this behaviour with positions, this is also applicable to holdings. You might need depend on the websocket or /quote api to get the latest prices.
I think even kite web application is dependent on the web socket to get the latest prices. So we also have to follow same. Observe that when you hard refresh web page in kite, it shows some different prices for a moment and then latest prices are shown (websocket does that)
Positions API will not provide the live market data. We suggest using Quote API or Websockets API to fetch the live market data and calculate P&L at your end.
Thanks everyone for the info! I'm now using WebSocket for live PnL updates. Just a quick question — when I execute an order, can I rely on the positions API to reflect:
Entry/Exit status
Quantity details
Does it update immediately, or should I expect a slight delay similar to pnl?
We haven't observed any delay in fetching positions. The Positions API returns updated position details instantly. @yogeshs Is it happening consistently or intermittently? Do you happen to observe this during opening or throughout the day? An exact log will help to debug this further.
I have seen this behaviour with positions, this is also applicable to holdings.
You might need depend on the websocket or /quote api to get the latest prices.
Observe that when you hard refresh web page in kite, it shows some different prices for a moment and then latest prices are shown (websocket does that)
Just a quick question — when I execute an order, can I rely on the positions API to reflect:
@yogeshs
Is it happening consistently or intermittently?
Do you happen to observe this during opening or throughout the day? An exact log will help to debug this further.