Keep getting error 'str' object has no attribute '_get' when checking for ltp

being


Have uploaded the code and error to the image. Please let me know what is happening here.
  • Imran
    Hi @being
    You can't get LTP using the library name - KiteConnect.
    You have to create kite's object first and then call the LTP.
    Refer to below pseudocode-
    kite = KiteConnect(api_key=api_k)
    data = kite.generate_session(request_tkn, api_secret=api_s)
    access_token = data["access_token"]
    kite.set_access_token(access_token)

    # call all API call using kite object
    kite.ltp("NSE:ACC")
  • being
    Hi Thanks for the reply, This worked. I had done the access token but didn't run the cell.
Sign In or Register to comment.