Websocket not working in Node JS
-
Hi,
Facing issue in websocket. here is my code.
Output : Connected To websocket but not receiving any data.Also logged in Successfully and generated Token as well.
let web_socket = new WebSocketClient({
clientcode: CLIENT_CODE,
jwttoken: JWT_TOKEN,
apikey: API_KEY,
feedtype: "order_feed",
script:"nse_cm|11536"
});web_socket.connect() .then(() => { var ACTION_TYPE = "subscribe"; var FEED_TYPE = "order_feed"; console.log("Connected to Web Socket"); web_socket.fetchData(ACTION_TYPE,FEED_TYPE); // ACTION_TYPE: subscribe | unsubscribe FEED_TYPE: order_feed setTimeout(function () { web_socket.close() }, 60000) }); web_socket.on('tick', receiveTick); function receiveTick(data) { console.log("receiveTick:::::", data); }
-
@goutamjaiswal Did you get any error named web_socket not defined?
If yes then how did you solved it ?
-
Hi @ommahato Currently we dont have any update on this.
-
@admin hi am also getting this issue any update on this ?
-
HI @goutamjaiswal Our team is working on this we will update you once fixed.