Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_history_orders() returning empty array #434

Open
mustafamasody opened this issue Jun 6, 2024 · 1 comment
Open

get_history_orders() returning empty array #434

mustafamasody opened this issue Jun 6, 2024 · 1 comment

Comments

@mustafamasody
Copy link

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
Copy link
Author

Bump please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant