my code is :-
var KiteTicker = require("./views/scripts/kiteconnect").KiteTicker;
var ticker = new KiteTicker("**************", access_token);
ticker.connect();
ticker.on("ticks", onTicks);
ticker.on("connect", subscribe);
function subscribe() {
var items = [instrument_token];
ticker.subscribe(items);
ticker.setMode(ticker.modeFull, items);
}
function onTicks(ticks) {
//if (redirectpage == '
http://localhost:8383/chart') {
list.add(ticks[0]);
console.log(ticks[0]);
StartAPI();
//console.log(list.length);
blocks.sort(sortAscending);
io.emit('ticks', { blocks: blocks });
io.emit('ticker', { data: ticks[0] });
}
kindly help me thanks in advance
June 2018