|
17 | 17 | from webull.trade.request.v2.cancel_order_request import CancelOrderRequest |
18 | 18 | from webull.trade.request.v2.get_order_detail_request import OrderDetailRequest |
19 | 19 | from webull.trade.request.v2.get_order_history_request import OrderHistoryRequest |
| 20 | +from webull.trade.request.v2.get_order_open_request import OrderOpenRequest |
20 | 21 | from webull.trade.request.v2.palce_order_request import PlaceOrderRequest |
21 | 22 | from webull.trade.request.v2.place_option_request import PlaceOptionRequest |
22 | 23 | from webull.trade.request.v2.preview_option_request import PreviewOptionRequest |
@@ -118,6 +119,26 @@ def get_order_history_request(self, account_id, page_size=None, start_date=None, |
118 | 119 | order_history_request.set_last_client_order_id(last_client_order_id=last_client_order_id) |
119 | 120 | response = self.client.get_response(order_history_request) |
120 | 121 | return response |
| 122 | + |
| 123 | + def get_order_open(self, account_id, page_size=None, last_order_id=None): |
| 124 | + """ |
| 125 | + Paging query pending orders. |
| 126 | +
|
| 127 | + :param account_id: Account ID |
| 128 | + :param page_size: Limit the number of records per query to 10 by default. |
| 129 | + :param start_date: Start date (if empty, the default is the last 7 days), in the format of yyyy-MM-dd. |
| 130 | + :param last_client_order_id: The last order ID from the previous response. For the first page query, |
| 131 | + this parameter is not required. |
| 132 | + """ |
| 133 | + order_open_request = OrderOpenRequest() |
| 134 | + order_open_request.set_account_id(account_id=account_id) |
| 135 | + if page_size: |
| 136 | + order_open_request.set_page_size(page_size=page_size) |
| 137 | + if last_order_id: |
| 138 | + order_open_request.set_last_order_id(last_order_id=last_order_id) |
| 139 | + response = self.client.get_response(order_open_request) |
| 140 | + return response |
| 141 | + |
121 | 142 | def query_order_detail(self, account_id, client_order_id): |
122 | 143 | """ |
123 | 144 | This interface is currently available only to individual and institutional clients |
|
0 commit comments