Websocket
-
Hi Team I am getting following error when I try to connect with Websocket :
{"sourceID":"WEB","clientPublicIP":"103.55.89.133","macAddress":"5A-90-46-96-FC-61","userType":"USER","clientLocalIP":"127.0.0.1","accept":"application/json"}***************************
{"data":{"feedToken":"eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6IkExNDE1MDA0IiwiaWF0IjoxNjg1OTk1NzUxLCJleHAiOjE2ODYwODIxNTF9.9YncbjDjB97-nm3agZnZGpmMVH_A2mgydc4Fx2O7qBWZsk4FmwSOuZcT9p0dLfVu_uwbuDYoBlDhD5m9Uy5hMw","jwtToken":"eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6IkExNDE1MDA0Iiwicm9sZXMiOjAsInVzZXJ0eXBlIjoiVVNFUiIsImlhdCI6MTY4NTk5NTc1MSwiZXhwIjoxNjg2MDgyMTUxfQ.WZogkH4Sy8O5-ltpYnS-BTHOyDJD7zRnwhEmBdeGC1UeFR-SvRtV7EFrLaLXeZJPt5SAUM3OhNH6lKHsgaUskQ","refreshToken":"eyJhbGciOiJIUzUxMiJ9.eyJ0b2tlbiI6IlJFRlJFU0gtVE9LRU4iLCJpYXQiOjE2ODU5OTU3NTF9.5Q6mx3OfAqQ0bx_BRpX0QXgJLVMRsdJLlvI6iKc01_dcdBqSgt7102IYsm-UyPTzFGBhNnhhN1Nfgv4U9_ZO2Q"},"message":"SUCCESS","errorcode":"","status":true}***************************
com.neovisionaries.ws.client.WebSocketException: The status line of the opening handshake response is empty.
false
at com.neovisionaries.ws.client.HandshakeReader.readStatusLine(HandshakeReader.java:99)
at com.neovisionaries.ws.client.HandshakeReader.readHandshake(HandshakeReader.java:48)
at com.neovisionaries.ws.client.WebSocket.readHandshake(WebSocket.java:3440)
at com.neovisionaries.ws.client.WebSocket.shakeHands(WebSocket.java:3319)
at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2354)
at com.angelbroking.smartapi.smartTicker.SmartWebsocket.connect(SmartWebsocket.java:257)
at com.angelbroking.smartapi.sample.Examples.smartWebSocketUsage(Examples.java:362)
at com.angelbroking.smartapi.sample.Test.main(Test.java:111)can any please help me on this
-
Consider the issue closed, issue was that I was passing incorrect token's list
-
@Moderator_1
I am using com.angelbroking.smartapi:smartapi-java:jar:2.2.3Also I am using SmartStreamTicker.
Kotlin code snippet :-val smartStreamTicker = SmartStreamTicker(clientId, feedtoken, smartStreamListener, delay, period) smartStreamTicker.connect() smartStreamTicker.subscribe(SmartStreamSubsMode.SNAP_QUOTE, tokens.toSet()) return smartStreamTicker
-
Hello @tsingh,
Which SDK and specific version are you using to connect to websocket?
Thank you.
Regards
SmartAPI Team -
I am also facing this issue
-
@admin @akshay1996 Were you able to resolve the issue? Can anyome please help here.