Error while subscribing for live data feed in websocket in javascript
-
Hi @admin and everyone,
I am trying to subscribe to a token using webscoket V2 in javascript. After making a websocket connection I am running following code inside fetchData function:let req = '{"correlationID":"' + "abcde12345" + '","action":"'+ 1 + '","params":"' + '{"mode":"'+ 1 + '","tokenList":"' + '[{"exchangeType":"' + 1 + '","tokens":"' + '["3045"]'+'"}]}}';
ws.send(req);
I am getting following error:
Error while processing messageIs there anything wrong in the request string?
Please help.Thanks and regards,
Prashant