Unable to fetch AMO order status via Websockets

koushi
Hi there,
Im trying to fetch 'order_update' on all orders placed via web using websockets. I'm using Python Websocket library kiteconnect along with call back function 'on_order_update'. Everything works fine except for AMO orders where I don't see any postback call.

My end goal is to fetch 'order_update' for AMO orders along with rest of the orders.

import logging
from kiteconnect import KiteTicker

logging.basicConfig(level=logging.DEBUG)

kws = KiteTicker("your_api_key", "your_access_token")

def on_connect(ws, response):
logging.debug("Connected")

def on_close(ws, code, reason):
ws.stop()

def on_order_update(ws, data):
logging.debug("Order update : {}".format(data))

# Assign the callbacks.
kws.on_connect = on_connect
kws.on_close = on_close
kws.on_order_update = on_order_update
kws.connect()



Dosen't Websocket postbacks support AMO orders? Is there any other way to fetch these details other than Postback (WebHooks)?

Please advise.
Tagged:
  • rakeshr
    Doesn't Websocket postbacks support AMO orders? Is there any other way to fetch these details other than Postback (WebHooks)?
    No, you won't receive websocket/ webhook postback updates for AMO orders. You will have to fetch the orderbook to check the same.
  • koushi
    Sure noted. Thanks for the help
This discussion has been closed.