訂單詳情(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 | 是 | 標的類型 | OPTION |
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());