Whenever I modify Order my kite ticker gets disconnected without any errors

tusharsingh
KiteTicker abruptly disconnects without any error every time I modify order.
I though that there might be some issue with KiteConnect but then I tried modifying order call using axios.
Even when I use axios to modify order, KiteTicker gets disconnected !!

I simply get callback to
ticker.on('noreconnect', () => {

})

Also I do not get any error in disconnect event
ticker.on('disconnect', (err) => {
// err is undefined
})

I am using following function to modify order

const axios = require('axios').default;// "axios": "^0.27.1",
.....
modifyOrder : (orderId, price, token)=>{
const options = {
method: 'PUT',
headers: {
Accept:"application/json, text/plain, */*",
"Content-Type":"application/x-www-form-urlencoded",
"X-Kite-Version":3,
"User-Agent":"kiteconnectjs/4.0.0",
Authorization:"token vvhw*****:"+token
},
data: "price="+price,
url : "https://api.kite.trade/orders/regular/"+orderId,
};
return axios(options).then(resp => resp.data.data.order_id);
}


Is anyone also facing the same issue?
Please help ...
Tagged:
  • rakeshr
    Can you paste here the complete debug log, by sending debug flag as true in the kiteconnect initialization, as shown here?
Sign In or Register to comment.