It looks like you're new here. If you want to get involved, click one of these buttons!
KiteTicker {
modeFull: 'full',
modeQuote: 'quote',
modeLTP: 'ltp',
autoReconnect: [Function (anonymous)],
connect: [Function (anonymous)],
disconnect: [Function (anonymous)],
connected: [Function (anonymous)],
on: [Function (anonymous)],
subscribe: [Function (anonymous)],
unsubscribe: [Function (anonymous)],
setMode: [Function (anonymous)],
parseBinary: [Function (anonymous)]
}
KiteTicker {
root: 'wss://ws.kite.trade/',
api_key: '*************',
access_token: '******************',
modeFull: 'full',
modeQuote: 'quote',
modeLTP: 'ltp'
}
KiteTicker {
modeFull: 'full',
modeQuote: 'quote',
modeLTP: 'ltp',
autoReconnect: [Function (anonymous)],
connect: [Function (anonymous)],
disconnect: [Function (anonymous)],
connected: [Function (anonymous)],
on: [Function (anonymous)],
subscribe: [Function (anonymous)],
unsubscribe: [Function (anonymous)],
setMode: [Function (anonymous)],
parseBinary: [Function (anonymous)]
}
where did you get this code?
To get all the properties of class in typescript, you can print something like
console.log(Object.getOwnPropertyNames(Object.getPrototypeOf(ticker)));
Sample response: triggerDisconnect is working fine for me. Can you let me know, what exactly are you facing error? Is reconnect failing?
Let me ask differently.
i have my instance created as below
tickInstance = await new KiteTicker({
api_key: this.zerodhaApiKey,
access_token: this.zerodhaAccessToken,
});
tickInstance.connect();
and i have my logic which will watch the trade and at 3:25pm i want to stop everything... so i used something like this
if (tickInstance) tickInstance.disconnect();
The above logic works fine with v4.1.0 but it says .disconnect() is not a function if i use v5.0.0.
the code which i shared in my first thread is console.log(tickInstance) before calling .disconnect()