Closed hadenponish1 closed 1 year ago
resolved with a workaround/hybrid of the suggestions left in this thread -> https://github.com/tedchou12/webull/issues/410
I noticed my access_token and did had changed from the previously stored creds I had. Manually pulled by opening network tab after logging in an incognito browser (v2 query for those looking) and replaced these as well as the UUID which I didn't use before. Adjusted the code to
from webull import webull # for paper trading, import 'paper_webull'
from dotenv import load_dotenv
import os
# Load environment variables from .env file
load_dotenv()
webull_email = os.environ['webull_email']
webull_pass = os.environ['webull_pass']
webull_access_token = os.environ['access_token']
webull_uuid = os.environ['webull_uuid']
wb = webull()
creds = wb.login(webull_email, webull_pass)
wb.api_login(access_token= webull_access_token, uuid = webull_uuid)
orders = wb.get_history_orders(status = 'All', count = 10000)
print(len(orders))
and works like a charm. Closing issue.
closing
This seems to be an issue that's occurred in the last 48 hrs or so as I was previsouly able to extract orders no problem.
my code looks like this
now my error message returned is
{'msg': 'secAccountId=null', 'code': '400', 'success': False}
adding an secAccountId parameter to the function returns an error as an unexpected keyword argument. I also tried updating webull module with no luck.