Today I've gone live for the first time for my algo. But am surprised to find that order updates on Websocket are sporadic, like certain orders are getting "open" status updates but not "complete" status updates, even though the order executed and can be seen on kite app.
You get updates for all order status through websocket .
If you didn't get any specific update,it might be that at that time,the websocket connection would have been disconnected as you only get updates when websocket is connected otherwise you will miss it. https://kite.trade/forum/discussion/comment/26587/#Comment_26587
So as a work around, if I assign a unique value to the Tag of an order, can it be retrieved every time i fetch order details? Or is there a catch here as well?
If you didn't get any specific update,it might be that at that time,the websocket connection would have been disconnected as you only get updates when websocket is connected otherwise you will miss it.
https://kite.trade/forum/discussion/comment/26587/#Comment_26587
Or, it's possible that the complete status came before open as websocket order updates are sometimes asynchronous. Maybe,you were looking at the latest update only.
You can read here:
https://kite.trade/forum/discussion/8469/order-updates-not-coming-in-sequence
So as a work around, if I assign a unique value to the Tag of an order, can it be retrieved every time i fetch order details? Or is there a catch here as well?
You can use websocket on_order_update/postbacks and use these order updates as events to fetch orderbook/positions.