Are order updates on web socket guaranteed?

yoursvsr
Hi Team!

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.

How can this be fixed? Any work arounds?

TIA.
Tagged:
  • SRIJAN
    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

    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
  • yoursvsr
    Ok.

    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?
  • SRIJAN
    SRIJAN edited April 2022
    Yes,tags can be retrieved when you fetch orderbook. However,polling orderbook very frequently is not recommended.

    You can use websocket on_order_update/postbacks and use these order updates as events to fetch orderbook/positions.
  • yoursvsr
    Thank you very much.
This discussion has been closed.