Navigation

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

    WebSocket 2.0 Streaming is not Receiving the Live Price Feed

    General Discussion
    0
    17
    251
    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.
    • L
      last @anil_patel last edited by

      @anil_patel Facing same issue

      1 Reply Last reply Reply Quote 0
      • M
        mohan1710 @anil_patel last edited by

        @anil_patel
        Are you able to receive the live feed using websocket 2.9?

        P 1 Reply Last reply Reply Quote 0
        • P
          pkbsdmp last edited by

          No tick data

          1 Reply Last reply Reply Quote 0
          • P
            praveen3405 @mohan1710 last edited by

            @admin I'm facing the same issue on 18 May. No information in Ticks, just heartbeat messages.

            1 Reply Last reply Reply Quote 0
            • V
              Vignesha last edited by

              I have this issue but seems no one is talking about it not really sure whats happening with the smart api @admin can this be addressed? Github example is not working at all if there is any issue let us know so we can wait

              1 Reply Last reply Reply Quote 1
              • punit
                punit last edited by

                @anil_patel @Vignesha PM me. WS 2.0 is indeed working fine. Let me know any help is required.

                V 1 Reply Last reply Reply Quote 0
                • V
                  Vignesha @punit last edited by

                  @Ashok Thanks for the reply yes I have issue with getting live data from smartapi. I even can get historical data, ltp but i just cant get live data from it... It would be great if you cold help.
                  This is my code

                  from cred import username, apikey, pwd
                  from smartapi import SmartConnect
                  from smartapi import SmartWebSocket
                  import pandas as pd
                  import pyotp
                  import time
                  
                  <Authentication part>
                  
                  token = "nse_cm|2885"
                  
                  task = "mw"  
                  
                  ss = SmartWebSocket(feedToken, username)
                  
                  def on_message(ws, message):
                      print("Ticks: {}".format(message))
                  
                  def on_open(ws):
                      print("on open")
                      ss.subscribe(task, token)
                  
                  
                  def on_error(ws, error):
                      print(error)
                  
                  
                  def on_close(ws):
                      print("Close")
                  
                  # Assign the callbacks.
                  ss._on_open = on_open
                  ss._on_message = on_message
                  ss._on_error = on_error
                  ss._on_close = on_close
                  
                  ss.connect()
                  

                  Since today is sunday cant test this will try it tomorrow and let you know if it has started to work...

                  Can you please let me know if my code is right and also out of this topic - is there a way to stock fetching the live data? previous when it worked i had to interpret the code for this to stop fetching the data

                  V 1 Reply Last reply Reply Quote 1
                  • V
                    Vignesha @Vignesha last edited by

                    @Vignesha @Ashok Not working
                    tried today with the same code but still gives me the HeartBeat Sending Failed Not sure how it is working for everyone else... if something has changed that im not aware of? But im getting ltp and my holdings and things like that

                    2023-06-12 07:13:48.017326 : Start task in the background
                    {'task': 'hb', 'channel': '', 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6IkExMjAyNDY5IiwiaWF0IjoxNjg2NTUyMzQ4LCJleHAiOjE2ODY2Mzg3NDh9.hjMewZOkbEL3zOmXWX_Gd1VF0CidQmRayeXhqRaMf8IcViFxy9sdfXcsJTWRWHxdEuAo3r1hbpz_WpP_aMCivQ', 'user': 'A1202469', 'acctid': '<myaccountid>'}
                    HeartBeat Sending Failed
                    __on_open################
                    {'task': 'cn', 'channel': 'NONLM', 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6IkExMjAyNDY5IiwiaWF0IjoxNjg2NTUyMzQ4LCJleHAiOjE2ODY2Mzg3NDh9.hjMewZOkbEL3zOmXWX_Gd1VF0CidQmRayeXhqRaMf8IcViFxy9sdfXcsJTWRWHxdEuAo3r1hbpz_WpP_aMCivQ', 'user': 'A1202469', 'acctid': '<myaccountid>'}
                    2023-06-12 07:13:49.514800 : Start task in the background
                    on open{'task': 'hb', 'channel': '', 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6IkExMjAyNDY5IiwiaWF0IjoxNjg2NTUyMzQ4LCJleHAiOjE2ODY2Mzg3NDh9.hjMewZOkbEL3zOmXWX_Gd1VF0CidQmRayeXhqRaMf8IcViFxy9sdfXcsJTWRWHxdEuAo3r1hbpz_WpP_aMCivQ', 'user': 'A1202469', 'acctid': '<myaccountid>'}
                    
                    2023-06-12 07:13:49.884945 : Start task in the background
                    {'task': 'hb', 'channel': '', 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6IkExMjAyNDY5IiwiaWF0IjoxNjg2NTUyMzQ4LCJleHAiOjE2ODY2Mzg3NDh9.hjMewZOkbEL3zOmXWX_Gd1VF0CidQmRayeXhqRaMf8IcViFxy9sdfXcsJTWRWHxdEuAo3r1hbpz_WpP_aMCivQ', 'user': 'A1202469', 'acctid': '<myaccountid>'}
                    HeartBeat Sending Failed
                    
                    1 Reply Last reply Reply Quote 0
                    • V
                      Vyju75 last edited by

                      Yes I agree with Anil, websocket not working, the event corresponding to
                      _WS.MessageReceived += WriteResult;
                      the event is not getting fired.

                      It was working few until months back.

                      Has any one got the working version of the angelbroking.dll and websocket.dll,
                      please post it here.

                      Regards

                      V 1 Reply Last reply Reply Quote 1
                      • V
                        Vyju75 @Vyju75 last edited by

                        @admin , @administrators Kindly help at the earliest.

                        Regards

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

                          HI @Vyju75 @Vignesha @mohan1710 @anil_patel @Ashok

                          We are excited to announce the release of updated SmartAPI libraries that now fully support WebSocket 2.0, further enhancing your trading experience. The latest versions of the SmartAPI Python SDK (1.3.4), SmartAPI Java SDK (2.1.0) and the SmartAPI Node.js Library (1.0.15) incorporate WebSocket 2.0 implementation, ensuring faster market data updates, reduced latency, and improved overall performance.

                          https://smartapi.angelbroking.com/topic/3660/upgraded-smartapi-libraries-to-support-websocket-2-0-python-java-sdk-and-node-js-library

                          V 1 Reply Last reply Reply Quote 0
                          • V
                            Vyju75 @admin last edited by

                            @admin @administrators
                            Great news, indeed!
                            When shall the new version of .Net libraries be available?
                            My existing tool is written in C# and is not working since past few months.
                            Update to .Net version is much appreciated.

                            Regards

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

                              HI @Vyju75 , I am sorry but modifying C# library is not on our list. Our SDKs are all open source, and we encourage pull requests and other contributions from the community.

                              V 1 Reply Last reply Reply Quote 0
                              • V
                                Vyju75 @admin last edited by

                                @admin
                                Terribly disappointed 😞

                                Regards

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