How to fetch the order status without polling is it from websocket or from the postback callback

mnkartik
Hello Team,

As per the this link `https://kite.trade/docs/connect/v3/orders/#placing-orders`

One would immediately get the order id in response, but its not necessary that order is into OMS. This is very clear from the doc.
But how do we get the detail about the order is now in OPEN status, after passing all OMS validations, is it from the websocket or from the postback callback or both.

From the doc as per this link `https://kite.trade/docs/connect/v3/postbacks/`
we only have info that order UPDATE postback is triggered when an open order is modified or when there's a partial fill, but there is no way to know about open order status.
  • sujith
    You may listen to the order updates via Websockets as an event and fetch orderbook and check the order status or filled quantity.
  • mnkartik
    mnkartik edited July 2023
    Hello @sujith

    There are two aspects,

    1. the order open status
    2. when the order is in process of completion and trades are triggered ( where there could be N trades for one order with filled quantity )

    Pointer (2) I could get it from the postback call, where i could see the filled quantity and decipher the order status as completed or pending.

    For pointer (1) would i be able to get the order OPEN status only, using websocket because postback calls provides trade completion details.

    Because making a GET call to the orderbook and fetching the given order status would be too costly for me.

    Pls suggest.
  • sujith
    You can use order updates on via Websockets for everything just use that as an event and fetch orderbook.
  • sujith
    You don't have to poll orderbook every other second or any interval, rather than that you can just fetch when you get order update.
  • mnkartik
    mnkartik edited July 2023
    Thank you @sujith, it's just that there is an overall limit on the api calls, that's why I was keen on other approaches.
This discussion has been closed.