Navigation

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

    web sockets working today ?

    Python SDK
    4
    10
    52
    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.
    • S
      Surya 1 last edited by

      Hi @admin,

      Is web sockets working today ?? we don't seems to get any candles..

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

        Hi @rajanprabu can you check it from your end we have tested it with 4 scripts working fine.

        James Bond S 2 Replies Last reply Reply Quote 0
        • James Bond
          James Bond @admin last edited by James Bond

          @admin

          (2021-05-18 14:44:42,193)  -  (Connection error: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake))
          (2021-05-18 14:44:42,194)  -  (Connection closed: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake))
          

          WebSocket not working. It's getting closed and won't reconnect automatically.

          “Bond. James Bond.”

          1 Reply Last reply Reply Quote 0
          • S
            Surya 1 @admin last edited by

            @admin

            I had older SDK.. Now I have updated to new one and smithed to multiprocessing. It ran ok, but with HeartBeat Failed message in between.

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

              HI @rajanprabu we will soon update the code for websocket which is tested today.

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

                I am also not able to access websocket

                def on_tick(ws, tick):
                    print(ss.is_connected())
                    print("Ticks: {}".format(tick))
                
                
                def on_connect(ws, response):
                    print("connected",response)
                    # ws.websocket_connection()  # Websocket connection
                    ws.send_request(token,task)
                    print(ss.is_connected())
                
                
                def on_close(ws, code, reason):
                    print(str(reason), code)
                    ws.stop()
                
                
                def on_error(ws, code, reason):
                    print(str(reason),code)
                
                token = "nse_cm|5900"
                task ="mw"
                ss = WebSocket(feedToken, CLIENT_CODE)
                
                # Assign the callbacks.
                ss.on_ticks = on_tick
                ss.on_connect = on_connect
                ss.on_close = on_close
                ss.on_error = on_error
                
                

                respose

                connected {"peer": "tcp4:<url>", "headers": {"server": "Apache-Coyote/1.1", "upgrade": "websocket", "connection": "upgrade", "sec-websocket-accept": "", "date": "Thu, 20 May 2021 08:45:54 GMT"}, "version": 18, "protocol": null, "extensions": []}
                True
                True
                Ticks: [{'ak': 'nk', 'msg': 'mw', 'task': 'mw'}]
                
                
                A 1 Reply Last reply Reply Quote 0
                • A
                  admin @himanshu15y last edited by

                  HI @himanshu15y our team is working on this internally to fix this asap.

                  H 1 Reply Last reply Reply Quote 0
                  • H
                    himanshu15y @admin last edited by

                    @admin is it fixed now?

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      himanshu15y @himanshu15y last edited by

                      @himanshu15y still facing same issue

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

                        HI @himanshu15y @James-Bond @rajanprabu our team is still working on it we will soon update the sdk once we are ready.

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