webull
webull copied to clipboard
Trouble working in colab
Hello,
I am working on this in colab and keep ending up with the same message after trying multiple workarounds. I have a True when I log in but with the next line 'get_account_info()' I continue to get this message. Thank you in advance.
`---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
KeyError: 'secAccountId'`
When I comment out the above code the results show as '{'success': True, 'data': [{'brokerId': 8, 'brokerName': 'Individual', 'status': 'unopen', 'registerTradeUrl': '/mgt/redirect/tradeh5', 'openAccountUrl': 'https://tradeh5.webull.com/register/ib/continue.html', 'supportOutsideRth': True, 'userTradePermissionVOs': [{'type': 'stock', 'hasPermission': False, 'brokerId': 8}], 'supportClickIPO': True, 'isDefaultChecked': False, 'supportOpenOption': True}]}'
From the response you posted, it doesn't look like your account has been approved.
'status': 'unopen',
Could it be a result of using a mobile login? I am not sure why I am having these issues. I have one account that has been approved and has money deposited. Yet, I am still returned the same result.
@giterdun345 Yes, the version you are using does not support login using mobile number. The pending pull request addresses this issue.
Thank you Christian!
On Tue, May 12, 2020 at 1:52 AM Christian [email protected] wrote:
@giterdun345 https://github.com/giterdun345 Yes, the version you are using does not support login using mobile number. The pending pull request addresses this issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tedchou12/webull/issues/23#issuecomment-627125524, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCTCNEP5I3JUQOHV2QRDSDRRDPZFANCNFSM4LDU373Q .
I am having a similar issue. Regardless of whether I use the email or phone for initial auth, I am receiving a payload that appears to state my account is not real (which it very much so is / lots of trades taking place).
from webull import webull # for paper trading, import 'paper_webull' webull_email = '[email protected]' webull_pass = 'MyPassword' webull_phone = '+1-2105551212' webull_client_name = 'WeBull API Client' webull_security_question_id = '1001' webull_dob = '0000' webull_mfa = webull_email # Can be webull_phone or webull_email
wb = webull()
webull_account_id_exists = wb._account_id print(webull_account_id_exists) if webull_account_id_exists: wb.login(webull_email,webull_pass) else: wb.login(webull_email,webull_pass) wb.get_mfa(webull_mfa) wb.get_security(webull_email) #get your security question. otp = input("Provide the OTP from your email/phone: ") data = wb.login(webull_email, webull_pass, webull_client_name, otp, webull_security_question_id, webull_dob) print(data)
print('Finished with login routine.') print('Running get_account_id:') print(wb.get_account_id())
Endpoint: https://tradeapi.webullbroker.com/api/trade/account/getSecAccountList/v5
<Response [200]>
{'brokerId': 8, 'brokerName': 'Individual', 'status': 'unopen', 'registerTradeUrl': '/mgt/redirect/tradeh5', 'openAccountUrl': 'https://tradeh5.webull.com/register/ib/continue.html', 'supportOutsideRth': True, 'userTradePermissionVOs': [{'type': 'stock', 'hasPermission': False, 'brokerId': 8}, {'type': 'crypto', 'hasPermission': False, 'brokerId': 8}], 'accountPermissions': [{'type': 'stock', 'hasPermission': False, 'brokerId': 8}, {'type': 'crypto', 'hasPermission': False, 'brokerId': 8}], 'supportClickIPO': True, 'supportOpenOption': True, 'supportOpenCrypto': False, 'defaultChecked': False}
Traceback (most recent call last):
File "./test.py", line 34, in
Thank you in advance for any thoughts you have. I greatly appreciate your time and attention to this!