Skip to content

Test Code Snippets

Jason E Rush edited this page Nov 17, 2023 · 3 revisions

Here I will provide usage examples for testing when working with the API.

Last Updated: 2021/03/04

Login 2fa

Test Snippet for verifying successful 2fa login

from webull import webull

wb = webull()
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")```