Not able to connect to WebSocket


  • Hi @admin , I tried connecting to WS but getting below response:

    {
    "ak": "nk",
    "task": "cn",
    "msg": "cn"
    }
    Input Parameters:
    WS url : wss://omnefeeds.angelbroking.com/NestHtml5Mobile/socket/stream
    Req : {"task":"cn","channel":"","token":"Generated Feed Token","user":"VIYV1028","acctid":"VIYV1028"}

    Am I doing anything wrong or WebSocket connections only allowed during market hours?


  • HI @jax248 Our team is working on web socket we will update you once we fix this.


  • @admin Hi..still getting same issue. I am using below JS code.

                var ws =new  websocket('VIYV1028', 'XXXXXXXX');
                
                //connect to server
                ws.connection();
                //add callback after socket connection
                ws.on('connect', connectionOpen);
                function connectionOpen(){   
                 ws.runScript("nse_cm|2885", "mw");
                  // SCRIPT: exchange|token for multi stocks use & seperator, mcx_fo|222900  ### TASK: mw|sfi|dp
                }
                
                //add callback method where you can manipulate socket data
                ws.on('tick', receiveTick);
                
                //user defined function
                function receiveTick(data) {
                    console.log(data);
                    if (data.length == 0) {
                         ws.close();
                    }
                }
    

  • @admin Thanks. Will check on Monday then.


  • HI @jax248 You will only get the data during market hours.