issue with fetching orders after placing modify order

rajtk
I often face issues with fetching order details after placing a order (CO). I notice it often skips fetching all the orders without raising an exception . I also introducing sleep for it to fetch the orders, still no go. Is there a work around or a better way . Please advise.

access_token = kite.set_access_token(data["access_token"])
self.sl_id = kite.order_modify(order_id=self.sl_id, parent_order_id = self.primary_id , exchange=exchg, tradingsymbol=self.symbol,trigger_price= price,product = product, variety= variety)
time.sleep(3)
orders = kite.orders()
time.sleep(3)
Tagged:
  • sujith
    Hi @rajtk,
    Once you get a successful response for an order modify request, it means that placing an order modify request is successful it doesn't mean order modification is successful. Order modification goes through multiple checks from RMS, if everything is fine then only modification request will be successful.
    You need to fetch individual order and check for status and status_message.
    Usually, when it fails, the status_message will have the reason for failure.
Sign In or Register to comment.