Order update callback not working

krisai
I was trying out the latest python client for kite 3.0. The ticks and everything else works fine. But when I try to get order updates from the websocket nothing happens. I hooked onto see the on_message callback to see if it got any new messages, but it just sent some binary data when a request for an order goes through. All of the requests are passed using dummy data which is rejected and shown as such on my kite dashboard. But I dont get those rejected events from the websocket.
  • sujith
    It seems to be working fine for me. An order update is a text message. Try using on_order_update callback.
  • krisai
    Hmm. I've tried it a lot of times. I use the same callback function (on_order_update) and just try to log the data parameter. But nothing shows up. The only additional thing I have done is kept the threaded=True option on kws.connect(). Would that be causing problems? Everything else works how I want it to be.
  • krisai
    Weird. But its working now without any changes from my end. I just checked. Could have been a temporary thing yesterday.
  • krisai
    OK. Seems like it has a time period where the order updates are sent out via the webhook. I stopped receiving them again after I tried just now.
  • ajy
    order update callback not called, but the order is executed? please help
  • sujith
    @ajy,
    Are you using websockets or postbacks?
  • ajy
    kiteconnect node.js websockets
  • rakeshr
    @ajy
    Are you sure about assigning order postback properly?
    This example will help you to understand more about the Websocket callback assignment.
  • ajy
    this.kt = new K.KiteTicker({ api_key, access_token })

    this.kt.on('order_update', update => {
    console.log("order FOUND. YEAH");

    });

    sometimes it works sometimes it is not called. but the orders are executed i checked.
  • sujith
    Can you let us know when this happens and give us more information? It is very unlikely that there are missing order updates on Websockets. This has been in production for a while and no one complained.
  • sujith
    This is even used on our production apps.
Sign In or Register to comment.