Navigation

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

    WebSocket for getting Market dat

    NodeJS SDK
    3
    11
    199
    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.
    • P
      praj123 @praj123 last edited by

      @kripabhat said in WebSocket for getting Market dat:

      Did any one try getting market data via websocket? I am getting error while trying to use the example code given in SmartAPITicker.java

      Can someone confirm if the java is supported for websocket?

      onTextMessage Message received...
      eJyLrlZKzFayUsrPVtJRKkksBrFzy4Hs3OJ0CLM2FgDEIQq3
      at org.json.JSONTokener.syntaxError(JSONTokener.java:505)
      at org.json.JSONObject.<init>(JSONObject.java:214)
      at org.json.JSONObject.<init>(JSONObject.java:357)
      at com.angelbroking.smartapi.ticker.SmartAPITicker.parseTextMessage(SmartAPITicker.java:775)
      at com.angelbroking.smartapi.ticker.SmartAPITicker.access$9(SmartAPITicker.java:771)
      at com.angelbroking.smartapi.ticker.SmartAPITicker$3.onTextMessage(SmartAPITicker.java:306)
      at com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352)

      @bhaveshjain, please confirm Java SDK supports websocket streaming of market data

      A 1 Reply Last reply Reply Quote 0
      • A
        admin @praj123 last edited by

        We have raised your query to our development team, will keep you posted. @kripabhat

        P 1 Reply Last reply Reply Quote 0
        • P
          praj123 @admin last edited by

          @admin Below is some more details,

          I am sending correct message(subscription) to WebSocket after opening connection.
          ws.sendText("{ "task":"cn","channel":"","token":""+feedToken+"","user":"<ClientCode>","acctid":"<ClientCode>" }");
          ws.sendText("{"task":"mw","channel":"nse_cm|3045","token":""+feedToken+"","user":"<ClientCode>","acctid":"<ClientCode>"}");

          Once after sending the above message then below text message is received continuously,. Looks like issue with conversion of message??
          WebSocket Connection Status=true
          onTextMessage
          eJyLrlYqKUvMKU1VslIyNI3RNzSK0TcyMDJQMDS0MjK0MjVW0lHKS8wFSZfkKtXqVCuBmHnFqfHJuQip4jQgO6ekAMg0MrPUMzcAcwtBZoKYJdlAlrGBiSlYuATI8XNUqo0FAB9nIH4=

          A 1 Reply Last reply Reply Quote 0
          • A
            admin @praj123 last edited by

            Hi @kripabhat , team has identified an issue. Will let you know once the issue is fixed.

            P 2 Replies Last reply Reply Quote 0
            • P
              praj123 @admin last edited by

              @admin Ok thanks, let me know once the fix is available

              1 Reply Last reply Reply Quote 0
              • P
                praj123 @admin last edited by

                @admin Please let me know when the fix will be available?

                A 1 Reply Last reply Reply Quote 0
                • A
                  admin @praj123 last edited by

                  Hi @kripabhat , we have fixed the issue. Please refer latest Java SDK repository.

                  P 1 Reply Last reply Reply Quote 0
                  • P
                    praj123 @admin last edited by

                    @admin Thanks for the fix. I am yet to check the latest code, will check and let you know if any further issue found.

                    R 1 Reply Last reply Reply Quote 0
                    • R
                      rahulmyzone @praj123 last edited by

                      @kripabhat I am getting the same issue. If this is fixed for you let me know the fix.

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        admin @rahulmyzone last edited by

                        Hi @rahulmyzone Team is working on it we will update here.

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