Websocket gives 401
-
I am setting live market data, by going through README.md file https://github.com/angel-one/smartapi-java/blob/main/README.md#websocket-live-streaming-data
but it returns following error
Error connecting to WebSocket: The status code of the opening handshake response is not '101 Switching Protocols'. The status line is: HTTP/1.1 401 Unauthorized
I am generating session using following code, and I do get FeedToken as well as JwtToken and refreshToken, so I think following part is correct.
User user = smartConnect.generateSession(clientCode, "<password>", "<totp>"); String feedToken = user.getFeedToken();