Closed hadenponish1 closed 1 year ago
me too. seems webull change api
I fix it. just change '1970-0-1' to '1970-1-1' in entpoints.py file
hmm. Doesn't seem to work for me @BobLiu20 Did you happen to change anything else? I replaced in these lines
def orders(self, account_id, page_size):
return f'{self.base_ustradebroker_url}/trade/v2/option/list?secAccountId={account_id}&startTime=1970-1-1&dateType=ORDER&pageSize={page_size}&status='
def history(self, account_id):
return f'{self.base_ustrade_url}/trading/v1/webull/order/list?secAccountId={account_id}'
def paper_orders(self, paper_account_id, page_size):
return f'{self.base_paper_url}/paper/1/acc/{paper_account_id}/order?&startTime=1970-1-1&dateType=ORDER&pageSize={page_size}&status='
@BobLiu20 wanted to bump this. Did you happen to change anything else in the endpoints.py file? I provided the code where I changed the 1970-0-1 to 1970-1-1 like you suggested with no luck. I had also tried variations like 1970-01-01 and others.
Just removed the startTime parameter in request URL and does is the trick. I know it's not the ideal way but does the job for now. Closing and will continue to debug for a more correct solution.
return f'{self.base_ustradebroker_url}/trade/v2/option/list?secAccountId={account_id}&dateType=ORDER&pageSize={page_size}&status=' ##work around for now, removed the date parameter and works correctly.
I had previously been able to retrieve orders using the get_history_orders() function but as of this morning seems to be raising errors I'm unable to troubleshoot or seen solutions for.
My code is pretty simple,
I previously used this line to get order history no problem but today am recieving the following response
orders = wb.get_history_orders(status = 'All', count = 20)
I've tried uninstalling webull, reinstalling, and upgrading package thinking there may have been an update I missed but no luck. Given the error, I also tried including startTime parameters with no luck. Adding these return a different error which is somewhat expected of "unexpected keyword argument 'startTime'.
I've tested other functions to confirm I'm logged in properly testing wb.is_logged_in() and wb.get_watchlists() which both work as expected.
Any help would be greatly appreciated.
*** also tried following solutions here https://github.com/tedchou12/webull/issues/394 with no luck.