订单详情(v2)
接口描述
功能描述:订单详情,通过订单id查询指定订单详情。
请求URL: /openapi/account/orders/detail?account_id={account_id}
请求方式: GET
频次限制:每个AppId调用频次限制为2秒2次。
请求参数
参数 | 类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
account_id | String | 是 | 账户id | 2847483 |
client_order_id | String | 否 | 订单id | 0KGOHL4PR2SLC0DKIND4TI0002 |
响应参数
参数 | 类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
client_order_id | String | 是 | 客户端订单id | 0KGOHL4PR2SLC0DKIND4TI0002 |
combo_order_id | String | 是 | 组合订单id | OBJOAD3OV65I6UDLO1N70GOO78 |
order_id | String | 是 | 订单id | 1IJERLSNNMD88VTQ9RM8B00U9B |
combo_type | String | 是 | 组合类型 | NORMAL |
combo_instrument_type | String | 是 | 标的类型 | OPTION |
option_strategy | String | 否 | 期权策略 | SINGLE |
support_trading_session | String | 否 | 交易时段 | N |
side | String | 是 | 买卖方向 | BUY |
order_type | String | 是 | 订单类型 | MARKET |
time_in_force | String | 是 | 订单有效期 | DAY |
stop_price | String | 否 | 止损价 | 11.00 |
limit_price | String | 否 | 限价 | 11.00 |
quantity | String | 是 | 数量 | 1 |
filled_quantity | String | 否 | 成交数量 | 1 |
trailing_type | String | 否 | 追踪类型 | AMOUNT |
trailing_stop_step | String | 否 | 跟踪差价 | 1 |
status | String | 是 | 订单状态 | SUBMITTED |
items | []order_item | 是 | 订单明细 |
order_item:
参数 | 类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
order_id | String | 是 | 订单id | THI82O5JB7MQ2K76LL5FSDS2CB |
combo_type | String | 是 | 组合类型 | NORMAL |
combo_order_id | String | 是 | 组合订单id | OBJOAD3OV65I6UDLO1N70GOO78 |
instrument_type | String | 是 | 标的类型 | EQUITY |
symbol | String | 是 | symbol | AAPL |
side | String | 是 | 买卖方向 | BUY |
order_type | String | 是 | 订单类型 | MARKET |
time_in_force | String | 是 | 订单有效期 | DAY |
stop_price | String | 否 | 止损价 | 11.00 |
limit_price | String | 否 | 限价 | 11.00 |
entrust_type | String | 是 | 订单委托类型 | QTY |
total_quantity | String | 是 | 数量 | 1 |
filled_quantity | String | 否 | 成交数量 | 1 |
remain_quantity | String | 是 | 剩余数量 | 1 |
place_time | String | 是 | 下单时间 单位:毫秒 | 1726745361658 |
filled_time | String | 否 | 成交时间 单位:毫秒 | 1726745361871 |
filled_price | String | 否 | 成交价 | 11.00 |
support_trading_session | String | 是 | 交易时段 | N |
trailing_type | String | 否 | 追踪类型 | AMOUNT |
trailing_stop_step | String | 否 | 跟踪差价 | 1 |
status | String | 是 | 订单状态 | SUBMITTED |
option_type | String | 否 | 期权类型 | CALL |
option_expire_date | String | 否 | 期权到期日:yyyy-MM-dd | 2019-09-20 |
option_exercise_price | String | 否 | 行权价 | 190.00 |
option_category | String | 否 | 期权种类 | AMERICAN |
option_contract_multiplier | String | 否 | 期权每个合约对应标的数量 | 100 |
option_contract_deliverable | String | 否 | 期权每个合约行权时需要的股票数量 | 100 |
expiration_type | String | 否 | 期权到期类型 | AM |
请求示例
- Python
- Java
api_client = ApiClient(your_app_key, your_app_secret, Region.HK.value)
api = API(api_client)
response = api.order_v2.get_order_detail(account_id=account_id, client_order_id=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();
TradeHttpApiV2Service apiService = new TradeHttpApiV2Service(apiConfig);
OrderHistory optionDetailResponse = apiService.getOrderDetails(accountId, optionOrderItem.getClientOrderId());