查询待成交订单
接口说明
功能说明:分页查询待成交订单。
适用对象:通过OpenApi开发平台对接webull的客户。
请求URL:/trade/orders/list-open
请求方式:GET
频次限制:每个AppId调用频次限制为2秒2次。
请求参数
| 参数 | 类型 | 是否必填 | 描述 | 示例值 |
|---|---|---|---|---|
| account_id | String | 是 | 账户id | 20150320010101001 |
| page_size | int | 是 | 每页条数。 默认值:10;最大值:100, 可填整数。 | 10 |
| last_client_order_id | String | 否 | 第三方订单ID, 不传默认查第一页 | 2022021819071234 |
响应参数
| 参数 | 类型 | 是否必填 | 描述 | 示例值 |
|---|---|---|---|---|
| has_next | Boolean | true | 是否还有下一页 | true |
| orders | [ ]Order | 否 | 订单列表 | 参考示例代码 |
Order:
| 字段 | 类型 | 说明 |
|---|---|---|
| account_id | String | 账户ID |
| category | String | 品类, Category数据字典 |
| currency | String | 币种, 取值参考字典值:Currency, 如: HKD |
| client_order_id | String | 客户下单传入的ID |
| extended_hours_trading | Boolean | 是否支持盘前盘后 |
| filled_price | String | 平均成交价格 |
| filled_qty | String | 成交数量 |
| instrument_id | String | 标的ID |
| last_filled_time | String | 最后一次成交时间, UTC时间, 时间格式:yyyy-MM-ddTHH:mm:ss.SSSZ只有成交的订单才有值 |
| limit_price | String | 限价, 订单类型如果是限价单、止损限价时, 才有值 |
| order_id | String | 订单ID |
| order_status | String | 订单状态, OrderStatus数据字典 |
| order_type | String | 订单类型, OrderType数据字典 |
| place_time | String | 下单时间, UTC时间, 时间格式:yyyy-MM-ddTHH:mm:ss.SSSZ |
| qty | String | 数量 |
| side | String | 买卖方向, OrderSide数据字典 |
| stop_price | String | 止损价, 订单类型为止损单、止损限价的时候, 才有值 |
| symbol | String | 股票代码, 如:01810 |
| short_name | String | 股票名称, 如:小米集团-W |
| tif | String | 订单有效期, OrderTIF数据字典 |
| trailing_stop_step | String | 跟踪差价, 订单类型为跟踪止损单时, 才有值 |
| trailing_type | String | 跟踪类型, TrailingType 订单类型为跟踪止损单时, 才有值 |
请求示例
- Python
- Java
from webullsdktrade.api import API
from webullsdkcore.client import ApiClient
from webullsdkcore.common.region import Region
api_client = ApiClient(your_app_key, your_app_secret, Region.HK.value)
api = API(api_client)
response = api.order.list_open_orders(account_id, page_size, last_client_order_id)
if response.status_code == 200:
open_orders = response.json()
HttpApiConfig apiConfig = HttpApiConfig.builder()
.appKey(Env.APP_KEY)
.appSecret(Env.APP_SECRET)
.regionId(Region.hk.name())
.build();
TradeApiService apiService = new TradeHttpApiService(apiConfig);
Orders openedOrders = apiService.getOpenedOrders(accountId, pageSize, lastClientOrderId);