Navigation

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

    HeartBeats Failed

    General Discussion
    5
    40
    291
    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 @PandaTrade last edited by

      @PandaTrade

      @PandaTrade said in HeartBeats Failed:

      HeartBeats Failed

      with new updated SDK ??

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

        @rajanprabu yes

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

          @PandaTrade

          Thats sad :(. Thanks for testing..

          1 Reply Last reply Reply Quote 0
          • PandaTrade
            PandaTrade last edited by

            Hi @admin,
            from smartapiwebsocket import SmartWebSocket
            This is the import that is given in the examples section of github.
            When i try to use this it doesn't work.

            Could you let me know what are the imports that i need to do?
            FYI, earlier used this from smartapi import WebSocket;from smartapi import SmartConnect

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

              Hi @PandaTrade from smartapi import SmartWebSocket

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

                @admin

                2021-06-01 10:55:23.634091 : Start task in the background
                {'task': 'hb', 'channel': '', 'token': '092017127', 'user': 'X63314', 'acctid': 'X63314'}```
                hello @admin, 
                I am not getting tick data except the above response.
                could you please paste your sample code for the same.
                PandaTrade 1 Reply Last reply Reply Quote 0
                • PandaTrade
                  PandaTrade @PandaTrade last edited by

                  @admin any update on this?

                  @rajanprabu are you able to test websocket streaming?

                  A S 2 Replies Last reply Reply Quote 0
                  • A
                    admin @PandaTrade last edited by admin

                    Hi @PandaTrade can you mail us your request and response.

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

                      @PandaTrade

                      Im using an older SDK for production. Didnt get time to test the new one. But I face Heartbeat failure message twice today.

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

                        Hi @rajanprabu try with this example its already available in read me file kindly update your sdk to 1.2.7.
                        from smartapi import SmartWebSocket

                        feed_token=092017047

                        FEED_TOKEN="YOUR_FEED_TOKEN"
                        CLIENT_CODE="YOUR_CLIENT_CODE"

                        token="mcx_fo|224395"

                        token="EXCHANGE|TOKEN_SYMBOL" #SAMPLE: nse_cm|2885&nse_cm|1594&nse_cm|11536&nse_cm|3045

                        token="mcx_fo|226745&mcx_fo|220822&mcx_fo|227182&mcx_fo|221599"

                        task="mw" # mw|sfi|dp

                        ss = SmartWebSocket(FEED_TOKEN, CLIENT_CODE)

                        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()

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

                          @admin

                          Taking a new SDK live is very risky ( I learned my lesson in the past ). When real money is involved I cant take any risk. I will do my testing for a week before I move this to production. When I get time I will test it..

                          Thanks

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

                            @admin
                            I get this status when i read the data .i.e return of the obj.generatesession
                            datais={'status': False, 'message': 'User Is Blocked', 'errorcode': 'AB1007', 'data': None}

                            PandaTrade 1 Reply Last reply Reply Quote 0
                            • PandaTrade
                              PandaTrade @PandaTrade last edited by

                              @admin
                              Could you please tell me why is the user blocked here.

                              PandaTrade 1 Reply Last reply Reply Quote 0
                              • PandaTrade
                                PandaTrade @PandaTrade last edited by

                                @admin
                                Do not bother it is working fine now.
                                HAd to reset my password

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

                                  Hi @PandaTrade ok .

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