Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. T167171
    3. Posts
    T
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by T167171

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

      @rganapthy6 yes. mine too

      posted in General Discussion
      T
      T167171
    • RE: AB1010 ERROR

      @admin
      I tried just now. For now it started working again. Hope it works well from now.
      Thanks!

      posted in Python SDK
      T
      T167171
    • RE: AB1010 ERROR

      @admin said in AB1010 ERROR:

      loginBypassword

      I tried generateSession() in python SDK.
      But still getting same session expired error

      posted in Python SDK
      T
      T167171
    • RE: AB1010 ERROR

      @admin where is the documentation for loginByPassword()

      posted in Python SDK
      T
      T167171
    • RE: AB1010 ERROR

      @aruntk123 what do u meann?

      posted in Python SDK
      T
      T167171
    • RE: AB1010 ERROR

      @aruntk123 many people are getting. I'm getting same error from yesterday

      posted in Python SDK
      T
      T167171
    • RE: Not able to get Order Book

      @admin
      @Ashokg @panku24 I'm still facing the same issue

      posted in Bugs
      T
      T167171
    • RE: AB1010: Invalid Session or Session is Expired Please Re-login

      @Chandra-shekhar
      @admin is pasting the same reply everywhere without looking into the problem. Such a joke company that claims to be one of the oldest broker and also listed company. I cant believe

      posted in General Discussion
      T
      T167171
    • RE: AB1010: Invalid Session or Session is Expired Please Re-login

      @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}
      
      posted in General Discussion
      T
      T167171
    • RE: AB1010: Invalid Session or Session is Expired Please Re-login

      @T167171 @rganapthy6

      posted in General Discussion
      T
      T167171
    • RE: AB1010: Invalid Session or Session is Expired Please Re-login

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

      posted in General Discussion
      T
      T167171
    • RE: AB1010: Invalid Session or Session is Expired Please Re-login

      @rganapthy6
      still hapening?

      posted in General Discussion
      T
      T167171
    • RE: Getting error on Place Order

      @Chandra-shekhar
      Facing same issues

      code:

      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)
      

      o/p:

      TypeError                                 Traceback (most recent call last)
      Cell In [9], line 12
            1 order_params = {
            2     "variety": "NORMAL",
            3     "tradingsymbol": "HAVELLS-EQ",
         (...)
           10     "quantity": 1
           11 }
      ---> 12 obj.placeOrder(orderparams=order_params)
           13 #obj.rmsLimit()
      
      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
      

      @admin @administrators

      posted in General Discussion
      T
      T167171
    • RE: AB1010: Invalid Session or Session is Expired Please Re-login

      @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????

      posted in General Discussion
      T
      T167171
    • RE: AB1010: Invalid Session or Session is Expired Please Re-login

      @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

      posted in General Discussion
      T
      T167171
    • RE: AB1010: Invalid Session or Session is Expired Please Re-login

      @mihirshah2500 what error r u getting

      posted in General Discussion
      T
      T167171
    • RE: AB1010: Invalid Session or Session is Expired Please Re-login

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

      will

      @admin
      Facing same

      posted in General Discussion
      T
      T167171
    • RE: unable to place order

      @T167171 @angelbroking @Angel

      posted in Python SDK
      T
      T167171
    • RE: TypeError: 'NoneType' object is not subscriptable

      I'm also facing issues

      01-Nov-22 05:51:46 - Exception occured while placing order for ticker: AXISBANK-EQ
      Traceback (most recent call last):
        File "/home/a/Desktop/angel_st/src/main.py", line 354, in place_order_cash_mkt_sl
          mkt_order_id = obj.placeOrder(mkt_order_params)
        File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 299, in placeOrder
          orderResponse = self._postRequest("api.order.place", params)[
      TypeError: 'NoneType' object is not subscriptable
      01-Nov-22 05:51:46 - Exception: 'NoneType' object is not subscriptable
      Traceback (most recent call last):
        File "/home/a/Desktop/angel_st/src/main.py", line 354, in place_order_cash_mkt_sl
          mkt_order_id = obj.placeOrder(mkt_order_params)
        File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 299, in placeOrder
          orderResponse = self._postRequest("api.order.place", params)[
      TypeError: 'NoneType' object is not subscriptable
      
      posted in Python SDK
      T
      T167171
    • RE: unable to place order

      @admin @administrators Please rectify it on priority. Got huge loss due to this

      posted in Python SDK
      T
      T167171