tedchou12 / webull

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

Not Found Error #359

Closed ajiybanesij closed 1 year ago

ajiybanesij commented 1 year ago

I was using some paper trade methods for the bot before, but now I am getting the No message available error. Has the Webull url changed?


tedchou12 commented 1 year ago

Sorry for the delayed reply. Try calling this function before get_account() get_account_id()

ajiybanesij commented 1 year ago

from webull import paper_webull

wb = paper_webull() wb.login('nad......, 'A....') wb.get_trade_token('A.....')

res1=wb.get_account_id() print(res1)

I tried your solution but still I have error. Output is :

Traceback (most recent call last): File "/home/ubuntu/bot/bot0/utils/webull_papertrade.py", line 182, in res1=wb.get_account_id() File "/home/ubuntu/.local/lib/python3.8/site-packages/webull/webull.py", line 1404, in get_account_id if result is not None and len(result) > 0 and 'id' in result[0]: KeyError: 0

If I look with debug I take this error "AccessToken is expire". I delete did.bin but still continue.

tedchou12 commented 1 year ago

if you output wb.login('nad......, 'A....') print(wb.login('nad......, 'A....')) what do you get? If you cannot login correctly, get_account_id wouldnt work as well.

ajiybanesij commented 1 year ago

print(wb.login('nad......, 'A....'))

Output: {'success': False, 'code': 'account.version.upgrade', 'msg': 'You are using an outdated version of Webull Desktop. Please update your application by visiting www.webull.com/introduce.'}

I researched this issue https://github.com/tedchou12/webull/issues/353 and I set device_name = "MacOS Chrome" in the login method still I take same error.

print(wb.login('nad......, 'A....',device_name = "MacOS Chrome"))