Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. himanshu15y
    H
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    himanshu15y

    @himanshu15y

    0
    Reputation
    3
    Posts
    3
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    himanshu15y Follow

    Best posts made by himanshu15y

    This user hasn't posted anything yet.

    Latest posts made by himanshu15y

    • RE: web sockets working today ?

      @himanshu15y still facing same issue

      posted in Python SDK
      H
      himanshu15y
    • RE: web sockets working today ?

      @admin is it fixed now?

      posted in Python SDK
      H
      himanshu15y
    • RE: web sockets working today ?

      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'}]
      
      
      posted in Python SDK
      H
      himanshu15y