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?
@saurabhkhoria 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.
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.
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 here.