In the past couple of days data is not streamed properly when using kiteconnectjs. Data resumes after 4 or 5 tries. Correct access token and public token is used and it is not an authentication or an authorization issue as it works when tried multiple times. There is no error just no data is available in the socket.
@sujith Can you update on this? This is making the service unusable, ticks stops very frequently and has socket has to be reconnected to resume the ticks
@anandaravindan we have tested it extensively and we couldn't reproduce the issue. If possible please share your code with us and we will try to debug it. We acknowledge that we had issue connecting to ticker last week but that has been resolved and should be working fine now.
@anandaravindan I have tested your code and it gets connected everytime I try connecting and I do get ticks without any issues. Please check your network and try testing it in remote server.
Here is the code I have modified and tested.
function setTick(ticks) { ticks.forEach(function(tick) { console.log("tick", tick) // tick.scrip = items[tick.Token]; // tick.exchange = 'NSE'; // deltaReceivedCount ++; // quotePublisher.publish(tick); }) }; function subscribe() { // var subscribe = Object.keys(items).map(function(val) { return parseInt(val) }); var subscribe = [53359623] // subscribe to crudeoil march fut ticker.subscribe(subscribe); ticker.setMode(ticker.modeQuote, subscribe); } var KiteTicker = require("./lib/ticker"); ticker = new KiteTicker("myapikey", "myuserid", "mypublic_token"); ticker.connect(); ticker.on("tick", setTick); ticker.on("connect", subscribe);
@vivek, I did isolate the issue, Its not an intermittent issue, I should rather say ticks are not frequent as it used to be. My health check fails which cause it to restart, I expect atleast 10 ticks for 10 seconds for 200 tokens but it doesn't seem to happen. But In reality it should be easily be 10 ticks for 10 seconds for scrips like RELIANCE, SBIN.
This shouldn't be happening after day before yesterday's fix. We will check and let you know.
Here is the code I have modified and tested.