Closed mrsprawin closed 1 year ago
Hi @mrsprawin, through the latest update for TOTP, should we enter the TOTP everyday in the configuration file or it will automatically do it as earlier? Because today it was sending OTP to my mobile since I am using the existing library and not the latest update (done 7 days ago) with the TOTP code. How do I update it?
Thanks
remove your account from authenticator app and Copy the Code key from the website
's the QR code prompt before scanning the QR Code.
You dont seem to have/had access_token.txt file. Create one.
I am also getting below error
Traceback (most recent call last):
File "
I have already created access_token.txt file. Please help.
This is fixed with the new version v1.0.0, pip install -U alphatrade
Take a look at the updated README
Giving this Error:
HTTPError Traceback (most recent call last) Input In [14], in <cell line: 10>() 7 totp = f"{int(pin):06d}" if len(pin) <=5 else pin
8 print(config.access_token) ---> 10 sas = AlphaTrade(login_id=config.login_id, password=config.password, twofa=totp, access_token=config.access_token) 11 socket_opened = False 12 def event_handler_quote_update(message):
File ~/opt/anaconda3/lib/python3.9/site-packages/alphatrade/alphatrade.py:240, in AlphaTrade.init(self, login_id, password, twofa, access_token, master_contracts_to_download) 238 if not self.is_token_valid(): 239 self.get_question_ids() --> 240 self.set_access_token() 241 else: 242 self.headers['X-Authorization-Token'] = self.__access_token
File ~/opt/anaconda3/lib/python3.9/site-packages/alphatrade/alphatrade.py:309, in AlphaTrade.__set_access_token(self) 306 response = self.reqsession.post( 307 'https://alpha.sasonline.in/api/v2/checktwofa', json=twofa_body) 308 if response.status_code != 200: --> 309 raise requests.HTTPError(response.text) 310 if 'error' in response.text: 311 raise requests.HTTPError(response.text)
HTTPError: {"errors":{"detail":"Internal server error"}}
I think it is still asking for old format of twofa password which is not part of latest config file. How to avoid this error?