Closed ronaldpaul closed 1 year ago
Even today I received the same error multiple times. Earlier I never got such errors. I even tried upgrading it to the latest version but still it doesn't resolve the issue. Please check. Thanks.
Hi! It looks like you are asking for support for your application, and your employer is using PyOTP in a for-profit algorithmic trading application. If you need help, please first ask your employer to donate to support the continued development and maintenance of this project using the "Sponsor" button above.
Since this issue does not appear to be a bug in PyOTP itself, I am going to close it now. Once you have satisfied the above requirements, please feel free to reopen the issue or add information here, and we'll see what we can do.
Frequently receiving
{"data":{},"error_code":49008,"message":"Invalid TOTP, please try again","status":"error"}
message. Following is the code snipped used to generate the totp.pin = pyotp.TOTP(Totp)
totp = f"{int(pin.now()):06d}" if len(pin.now()) <=5 else pin.now()
sas = AlphaTrade(login_id=login_id, password=password, twofa=totp, master_contracts_to_download=["NFO","NSE"], tokenPath = path)
The library to which I am passing the generated code is https://github.com/algo2t/alphatrade. Details are mentioned in the documentation section. How can I avoid these "Invalid TOTP" error messages? Thanks.