Tick data returns only once

DM2290
I'm trying to get latest ticks for subscribed items using the Nodejs client. Will the tick data be returned only once after market hours. I'm getting the response only once, was expecting it to be returned continuously. Please advice on what I'm missing here.

My nodejs code is as below -
var ticker = new KiteTicker({
api_key: apiKey,
access_token: accessToken,
});

// set autoreconnect with 10 maximum reconnections and 5 second interval
ticker.autoReconnect(true, 10, 5)
ticker.connect();
ticker.on("ticks", onTicks);
ticker.on("connect", subscribe);

ticker.on("noreconnect", function() {
console.log("noreconnect");
});

ticker.on("reconnect", function(reconnect_count, reconnect_interval) {
console.log("Reconnecting: attempt - ", reconnect_count, " interval - ", reconnect_interval);
});

function onTicks(ticks) {
console.log("Ticks", ticks);
}

function subscribe() {
var items = [738561];
ticker.subscribe(items);
ticker.setMode(ticker.modeFull, items);
}
  • rakeshr
    Will the tick data be returned only once after market hours.
    Yes, exchanges don't stream ticks post-market hours, so here we show the last cached tick streamed by the exchange(you can refer to the timestamp). You can check for an MCX contract, as they are open till 11:30 PM.
  • DM2290
    Thanks.
This discussion has been closed.