tedchou12 / webull

Unofficial APIs for Webull.
MIT License
601 stars 185 forks source link

Fixed accountType typo for login #194

Closed itsjafer closed 3 years ago

itsjafer commented 3 years ago

A recent pull request (#186) fixed the MFA verification issues. However, it included a typo that prevented the fix from being complete. In particlar, running the webull.login() function resulted in an error saying accountType not defined. That was because the variable was actually named acccount_type. This PR fixes that and, in turn, completes the fix for logging in with new webull accounts!

tedchou12 commented 3 years ago

Thanks for the catch!

PageMastr commented 3 years ago

Thank you for catching that!!!

bjacobo20 commented 3 years ago

For some reason I keep getting

{'msg': 'user security question expired', 'traceId': 'f6f3d83c3c484c8882dfd99893c7330b', 'code': 'user.security.question.expired'}

even though im using:

email = input('Please Enter Webull Email: ')
password = input('Please Enter Webull Password: ')
device = 'home pc'
print(wb.get_mfa(email))
mfa = input('Please enter 6 digit security key: ')
print(str(wb.get_security(email)))
mfaqid  = input('Please enter question id: ')
mfaq    = input('Please enter question answer: ')
data = wb.login(email, password, device, mfa, mfaqid, mfaq) # 6 digits MFA, Security Question ID, Question Answer.
print("\n\n\n\n"+ str(data) + "\n\n\n\n\n")

I kept getting this issue even before the fix, Not sure why.

PageMastr commented 3 years ago

Have you updated your Webull installation to be using the latest source version?

If you didnt update your pip install manually, then it doesnt have the code changes merged 2 days ago that fixes this.

bjacobo20 commented 3 years ago

That was it! Got it to work! Thanks!