Navigation

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

    Topics created by nishi21694

    • N

      Invalid totp
      General Discussion • • nishi21694  

      10
      0
      Votes
      10
      Posts
      62
      Views

      K

      @Moderator_2 getting TOTP error again. Here is the code I am running. Anything changed in the code? from SmartApi.smartConnect import SmartConnect #or from SmartApi.smartConnect import SmartConnect import pyotp from logzero import logger with open("angelConfig.json", 'r') as f: data = json.load(f) api_key = data['api_key'] # username = data['username'] pwd = data['pwd'] clientID = data["clientID"] smartConn = SmartConnect(api_key) try: token = data['otp_token'] totp = pyotp.TOTP(token).now() except Exception as e: logger.error("Invalid Token: The provided token is not valid.") raise e data = smartConn.generateSession("clientID", "pwd", "totp") refreshToken = data['data']['refreshToken'] userProfile = smartConn.getProfile(refreshToken) payload = { "mode": "FULL", "exchangeTokens": { "NSE": ["3045"] } } MarketQuoteData = smartConn.getMarketData(payload)
    • N

      Getting error while placing MCX order
      General Discussion • • nishi21694  

      3
      0
      Votes
      3
      Posts
      13
      Views

      M

      Hi @ishank0goyal4 Apologies for delayed response. Thank you for writing this query. The error "TypeError: 'NoneType' object is not subscriptable". has been fixed in one of release. Please use the latest SDK version Thanks & Regards, SmartAPI team