OpenAPI新增股票賣空及期權功能,內容請參考更新日誌。
OpenAPI新增股票賣空及期權功能,內容請參考更新日誌。
OpenAPI新增股票賣空及期權功能,內容請參考更新日誌。
OpenAPI新增股票賣空及期權功能,內容請參考更新日誌。
OpenAPI新增股票賣空及期權功能,內容請參考更新日誌。
OpenAPI新增股票賣空及期權功能,內容請參考更新日誌。
跳至主要内容

訂單詳情(v2)

接口说明

  • 功能描述:訂單詳情,通过订单id查询指定訂單詳情。

  • 请求URL: /openapi/account/orders/detail?account_id={account_id}

  • 请求方式: GET

  • 頻次限制:每個AppId調用頻次限制為2秒2次

请求参数

参数类型是否必须描述示例
account_idString账户id2847483
client_order_idString订单id0KGOHL4PR2SLC0DKIND4TI0002

回應參數

參數類型是否必須說明示例值
client_order_idString客戶端訂單id0KGOHL4PR2SLC0DKIND4TI0002
combo_order_idString組合訂單idOBJOAD3OV65I6UDLO1N70GOO78
order_idString訂單id1IJERLSNNMD88VTQ9RM8B00U9B
combo_typeString組合類型NORMAL
combo_instrument_typeString標的類型OPTION
option_strategyString期權策略SINGLE
support_trading_sessionString交易時段N
sideString買賣方向BUY
order_typeString訂單類型MARKET
time_in_forceString訂單有效期DAY
stop_priceString停損價11.00
limit_priceString限價11.00
quantityString數量1
filled_quantityString成交數量1
trailing_typeString跟踪類型AMOUNT
trailing_stop_stepString追蹤差價1
statusString訂單狀態SUBMITTED
items[]order_item訂單明細

order_item:

參數類型是否必須說明示例值
order_idString訂單idTHI82O5JB7MQ2K76LL5FSDS2CB
combo_typeString組合類型NORMAL
combo_order_idString組合訂單idOBJOAD3OV65I6UDLO1N70GOO78
instrument_typeString標的類型OPTION
symbolStringsymbolAAPL
sideString買賣方向BUY
order_typeString訂單類型MARKET
time_in_forceString訂單有效期DAY
stop_priceString停損價11.00
limit_priceString限價11.00
entrust_typeString訂單委託類型
QTY
total_quantityString數量1
filled_quantityString成交數量1
remain_quantityString剩餘數量1
place_timeString下單時間
單位:毫秒
1726745361658
filled_timeString成交時間
單位:毫秒
1726745361871
filled_priceString成交價11.00
support_trading_sessionString交易時段N
trailing_typeString跟踪類型AMOUNT
trailing_stop_stepString追蹤差價1
statusString訂單狀態SUBMITTED
option_typeString期權類型CALL
option_expire_dateString選擇權到期日:yyyy-MM-dd2019-09-20
option_exercise_priceString行使價190.00
option_categoryString期權种类AMERICAN
option_contract_multiplierString選擇權每個合約對應標的數量100
option_contract_deliverableString選擇權每個合約行使時所需的股票數量100
expiration_typeString期權到期類型AM

請求示例

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()

回應示例

股票

{
"combo_type":
"NORMAL"
"combo_order_id":
"THI82O5JB7MQ2K76LL5FSDS2CB"
"combo_instrument_type":
"EQUITY"
"client_order_id":
"0KGOHL4PR2SLC0DKIND4TI0002"
"order_id":
"THI82O5JB7MQ2K76LL5FSDS2CB"
"support_trading_session":
"N"
"quantity":
"1.00"
"filled_quantity":
"0.00"
"side":
"BUY"
"status":
"CANCELLED"
"time_in_force":
"DAY"
"order_type":
"LIMIT"
"limit_price":
"180.00"
"items":[
0:{
"combo_type":
"NORMAL"
"combo_order_id":
"54H8TBTVAUKD5E0HT7NTCIM0R8"
"instrument_type":
"EQUITY"
"order_id":
"THI82O5JB7MQ2K76LL5FSDS2CB"
"support_trading_session":
"N"
"entrust_type":
"QTY"
"total_quantity":
"1"
"filled_quantity":
"0"
"remain_quantity":
"1"
"symbol":
"AAPL"
"side":
"BUY"
"status":
"CANCELLED"
"time_in_force":
"DAY"
"order_type":
"LIMIT"
"limit_price":
"180.00"
}
]
}

期權單腳

{
"combo_type":
"STOP_LOSS"
"combo_order_id":
"1RGIBIOJFE1I9BS2DG6TMRPIVA"
"combo_instrument_type":
"OPTION"
"option_strategy":
"SINGLE"
"client_order_id":
"0KGOHL4PR2SLC0DKIND4TI0011"
"order_id":
"BBIIG4HCI0I21SQPQDFFLJLSD9"
"support_trading_session":
"N"
"quantity":
"2.00"
"filled_quantity":
"0.00"
"side":
"SELL"
"status":
"CANCELLED"
"time_in_force":
"DAY"
"order_type":
"STOP_LOSS"
"stop_price":
"11.00"
"items":[
0:{
"combo_type":
"STOP_LOSS"
"combo_order_id":
"1RGIBIOJFE1I9BS2DG6TMRPIVA"
"instrument_type":
"OPTION"
"order_id":
"BBIIG4HCI0I21SQPQDFFLJLSD9"
"support_trading_session":
"N"
"entrust_type":
"QTY"
"total_quantity":
"2"
"filled_quantity":
"0"
"remain_quantity":
"2"
"symbol":
"AAPL"
"side":
"SELL"
"status":
"CANCELLED"
"time_in_force":
"DAY"
"order_type":
"STOP_LOSS"
"stop_price":
"11.00"
"option_type":
"CALL"
"option_expire_date":
"2024-09-20"
"option_exercise_price":
"220.00"
"option_category":
"AMERICAN"
"option_contract_multiplier":
"100"
"option_contract_deliverable":
"100"
"expiration_type":
"PM"
}
]
}

異常示例

{
"error_code":
"OAUTH_OPENAPI_SYSTEM_ERROR"
"message":
"System error."
}