It looks like you're new here. If you want to get involved, click one of these buttons!
.Net API client
.Net / VBA / Excel (3rd party)
Algorithms and Strategies
Mobile and Desktop apps
Market data (WebSockets)
In this Discussion
kite.positions() never return the latest value
Hi Zerodha team,
kite.positions() never return the latest value. Request you to please fix this.
Can you elaborate the issue? After taking or exiting position if you are making positions api call its not updated? or is it about PNL and M2M calculation?
After taking the positions, then when i do kite.positions(), the 'last_price' field of the response doesn't contain the latest value.
, please post the response ...
positions() will not have the last price updated as frequently, use quote() instead for that
edited September 2019
Depending on the interval of your requirement for fetching last_price. For shorter period instead of continuous polling quote call for LTP, you may use
Websocket Socket streaming
I am facing same issue. I want to fetch latest pnl value and want to square off my positions based on that after computing the pnl value of all my positions. But delay in fetching latest pnl is causing the algo to return different results.
We don't recommend polling positions API just to get the P&L. You need to calculate P&L at your end.
You can know more
This discussion has been closed.