Navigation

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

    AB1010: Invalid Session or Session is Expired Please Re-login

    General Discussion
    13
    50
    244
    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
      StocksDeveloper @admin last edited by

      @admin It looks like we are performing testing duties for you for free.

      Why were the changes not tested before going live?

      Who was responsible for this?

      What action have you taken?

      Absolutely bad experience from such a big broker. The worst reliability of all brokers we work with. Do something about it.

      1 Reply Last reply Reply Quote 1
      • S
        Sam4173 last edited by

        when will clear?

        T 1 Reply Last reply Reply Quote 0
        • T
          T167171 @Sam4173 last edited by

          @Sam4173 said in AB1010: Invalid Session or Session is Expired Please Re-login:

          will

          @admin
          Facing same

          R 1 Reply Last reply Reply Quote 0
          • M
            mihirshah2500 last edited by

            Facing this issue again.
            @admin when would this be cleared?

            T 1 Reply Last reply Reply Quote 0
            • T
              T167171 @mihirshah2500 last edited by

              @mihirshah2500 what error r u getting

              M 1 Reply Last reply Reply Quote 0
              • M
                mihirshah2500 @T167171 last edited by mihirshah2500

                @T167171 Invalid Session or Session is Expired Please Re-login.
                Happening with rmsLimit() api.

                T 1 Reply Last reply Reply Quote 0
                • T
                  T167171 @mihirshah2500 last edited by

                  @mihirshah2500

                  I tried multiple times by generating new sessions each time but still faile

                  1. Code to generate session which works fine
                  angel_api_key = os.environ.get("ANGEL_API_KEY")
                  angel_totp_key = os.environ.get("ANGEL_TOTP_KEY")
                  angel_client_id = os.environ.get("ANGEL_CLIENT_ID")
                  angel_password = os.environ.get("ANGEL_PASSWORD")
                  angel_toptp = pyotp.TOTP(angel_totp_key).now()
                  obj = SmartConnect(api_key=angel_api_key)
                  #print("totp is ", angel_toptp)
                  session = obj.generateSession(angel_client_id, angel_password, angel_toptp)
                  refreshToken = session['data']['refreshToken']
                  feedToken = obj.getfeedToken()
                  userProfile = obj.getProfile(refreshToken)
                  
                  
                  1. Order place API fails
                  order_params = {
                      "variety": "NORMAL",
                      "tradingsymbol": "HAVELLS-EQ",
                      "symboltoken": "9819",
                      "transactiontype": "BUY",
                      "exchange": "NSE",
                      "ordertype": "MARKET",
                      "producttype": "INTRADAY",
                      "duration": "DAY",
                      "quantity": 1
                  }
                  obj.placeOrder(orderparams=order_params)
                  
                  

                  with o/p:
                  1 order_params = {
                  2 "variety": "NORMAL",
                  3 "tradingsymbol": "HAVELLS-EQ",
                  (...)
                  10 "quantity": 1
                  11 }
                  ---> 12 obj.placeOrder(orderparams=order_params)

                  File ~/.local/lib/python3.10/site-packages/smartapi/smartConnect.py:299, in SmartConnect.placeOrder(self, orderparams)
                  296 if params[k] is None:
                  297 del (params[k])
                  --> 299 orderResponse = self._postRequest("api.order.place", params)[
                  300 'data']['orderid']
                  302 return orderResponse

                  TypeError: 'NoneType' object is not subscriptable

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    T167171 @T167171 last edited by

                    @T167171
                    Tries rmsLimit API. Getting error in that too
                    code:

                    obj.rmsLimit()
                    

                    o/p:

                    {'status': False,
                     'message': 'Invalid Session or Session is Expired Please Re-login',
                     'errorcode': 'AB1010',
                     'data': None}
                    

                    Other API's like obj.position(), obj.orderBook() working fine

                    @admin R u going to reply????

                    1 Reply Last reply Reply Quote 0
                    • R
                      rganapthy6 @T167171 last edited by

                      @T167171 Same issue happening

                      T 1 Reply Last reply Reply Quote 0
                      • T
                        T167171 @rganapthy6 last edited by

                        @rganapthy6
                        still hapening?

                        T R 2 Replies Last reply Reply Quote 0
                        • T
                          T167171 @T167171 last edited by

                          @T167171
                          can you post error screenshot or DM me?
                          We can figure out the cause

                          T 1 Reply Last reply Reply Quote 0
                          • T
                            T167171 @T167171 last edited by

                            @T167171 @rganapthy6

                            R 1 Reply Last reply Reply Quote 0
                            • R
                              rganapthy6 @T167171 last edited by

                              @T167171 Yes

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

                                @rganapthy6 38888804-3e0f-4c1e-8be2-cd29cdaea355-image.png

                                1 Reply Last reply Reply Quote 0
                                • R
                                  rganapthy6 @T167171 last edited by

                                  @T167171 f0949f15-6342-4303-8288-51fc4a9fb504-image.png

                                  C 1 Reply Last reply Reply Quote 0
                                  • C
                                    Chandra shekhar @rganapthy6 last edited by

                                    @rganapthy6 Same problem hear

                                    R 1 Reply Last reply Reply Quote 0
                                    • R
                                      rganapthy6 @Chandra shekhar last edited by

                                      @Chandra-shekhar @admin When this will be resolved

                                      S 1 Reply Last reply Reply Quote 0
                                      • S
                                        SSumit @rganapthy6 last edited by

                                        @admin facing this issue since yesterday.

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

                                          Hi @StocksDeveloper @T167171 @rganapthy6 @lakshmi_73 @mihirshah2500 @yash12392 @Sam4173 @Chandra-shekhar @SSumit
                                          We regret the inconvenience caused. The issue is now resolved.

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

                                            @admin The issue is still there. Just now I tried

                                            {'status': False,
                                             'message': 'Invalid Session or Session is Expired Please Re-login',
                                             'errorcode': 'AB1010',
                                             'data': None}
                                            
                                            C 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post