tedchou12 / webull

Unofficial APIs for Webull.
MIT License
596 stars 181 forks source link

get_history_orders() returning empty array #434

Open mustafamasody opened 1 month ago

mustafamasody commented 1 month ago

get_history_orders() returns empty for me. I modified a few files:

endpoints.py (line 144, orders function): def orders(self, account_id, page_size): # &startTime=1970-0-1 return f'{self.base_ustradebroker_url}/trade/v2/option/list?secAccountId={account_id}&dateType=ORDER&pageSize={page_size}&status='

webull.py (line 374, get_history_orders() function): ` def get_history_orders(self, status='All', count=20): ''' Historical orders, can be cancelled or filled status = Cancelled / Filled / Working / Partially Filled / Pending / Failed / All ''' headers = self.build_req_headers(include_trade_token=True, include_time=True) response = requests.post(self._urls.orders(self._account_id, count) + str(status), headers=headers, timeout=self.timeout, json={ "pageIndex": 1, "pageSize": 50, "conditions": [{ "key": "date", "values": ["CY"] }, { "key": "category", "values": ["all"] } ]

    })
    return response.json()`

My code: print("OPTIONS DATA: ") print(wb.get_history_orders())

Output: []

mustafamasody commented 10 hours ago

Bump please