Hello there team, I'm trying to connect to the websocket using the NodeJS library but I'm getting the following error. {"type":"error","target":{"domain":null,"_events":{},"_eventsCount":4,"_socket":null,"_ultron":null,"_closeReceived":false,"bytesReceived":0,"readyState":0,"supports":{"binary":true},"extensions":{},"_binaryType":"arraybuffer","_isServer":false,"url":"wss://ws.kite.trade/?api_key=0i3887nnqsdaadfytsq0un&access_token=ag0spuQ7padfa8DuOspNBcGXeWukp5Q58fgL&uid=1582540313380","protocolVersion":13}} i'm not sure what I am doing wrong
Can you paste complete code here? Please don't paste app or user-related tokens on public threads. If you have to share these details then you can private message us.
var ticker = new KiteTicker({ api_key: "Key", access_token: "token" });
console.log("this is called"); // 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("error", onError); ticker.on("noreconnect", function() { console.log("noreconnect"); });
Please don't paste app or user-related tokens on public threads. If you have to share these details then you can private message us.
Have you implemented onError? Can you log the error?