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 @StocksDeveloper last edited by StocksDeveloper

      @StocksDeveloper Many errors observed in the logs.

      [P252587 : P252587]: Cached POSITION size 22 is more than received data 20.
      
      [RPLD1002 : RPLD1002]: Cached POSITION size 20 is more than received data 18.
      
      [KSST1004] Cached POSITION size 4 is more than received position data 0
      
      • Data not coming (orders, positions). Getting zero rows or less than earlier rows (which should not happen)
      • Invalid session errors
      Y 1 Reply Last reply Reply Quote 0
      • Y
        yash12392 @StocksDeveloper last edited by

        @StocksDeveloper Happened the same with me, we rely on the Orderbook endpoint which did not return any response even when trades were being taken into account. Quite annoying as clients complaint and don't understand these issues.

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

          @StocksDeveloper another error...

          TTVP1004:210901000065148:Error from Angel: Internal server error.. Angel error code: AB2000, Message: 172
          
          1 Reply Last reply Reply Quote 0
          • S
            StocksDeveloper @yash12392 last edited by

            @yash12392 yes, normally throughout the trading day the number of orders or positions in an account always stay the same or increase. They can never decrease.

            But read order or position response is returning lesser or zero number of rows than what was received just before.

            Very strange.

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