Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Websocket

    NodeJS SDK
    0
    6
    79
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      akshay1996 last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H
        hashmeet last edited by

        @admin @akshay1996 Were you able to resolve the issue? Can anyome please help here.

        1 Reply Last reply Reply Quote 0
        • T
          tsingh last edited by

          I am also facing this issue

          M T 2 Replies Last reply Reply Quote 0
          • M
            Moderator_1 @tsingh last edited by

            Hello @tsingh,

            Which SDK and specific version are you using to connect to websocket?

            Thank you.
            Regards
            SmartAPI Team

            T 1 Reply Last reply Reply Quote 0
            • T
              tsingh @Moderator_1 last edited by

              @Moderator_1
              I am using com.angelbroking.smartapi:smartapi-java:jar:2.2.3

              Also 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
              
              1 Reply Last reply Reply Quote 0
              • T
                tsingh @tsingh last edited by

                Consider the issue closed, issue was that I was passing incorrect token's list

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post