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.
    • A
      admin last edited by admin

      Hi @lakshmi_73 @StocksDeveloper @yash12392 this issue has been resolved.

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

        @admin thanks for the update.

        what about less or zero records coming in orders/positions response? Is that also resolved?

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

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

          what about less or zero records coming in orders/positions response? Is that also resolved?
          We will update you on this part asap.

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

            @StocksDeveloper Too many internal server errors in the logs.

            STGN1003 @ 12:52:39
            TZ7990 @ 12:52:38

            HTTP Status 500 – Internal Server Error
            

            This is totally unacceptable.........horrible experience guys.

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

              HI @StocksDeveloper We regret the inconvenience we will update you asap.

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

                @admin No update yet, is this resolved?

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

                  HI @StocksDeveloper This issue has been solved.

                  S 1 Reply Last reply Reply Quote 0
                  • 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
                                            • First post
                                              Last post