Order Details(v2)
Interface description
Function Description: Order details, query the specified order details through the order ID.
Request URL: /openapi/account/orders/detail?account_id={account_id}
Request method: GET
Frequency limit: The calling frequency of each AppId is limited to 2 times in 2 seconds.
Parameters
Parameter | Type | Required | Description | Example value |
---|---|---|---|---|
account_id | String | Required | Account ID | 2847483 |
client_order_id | String | Optional | Order ID | 0KGOHL4PR2SLC0DKIND4TI0002 |
Response
Parameter | Type | Required | Description | Example value |
---|---|---|---|---|
client_order_id | String | Required | Client Order ID | 0KGOHL4PR2SLC0DKIND4TI0002 |
combo_order_id | String | Required | Combo Order ID | OBJOAD3OV65I6UDLO1N70GOO78 |
order_id | String | Required | Order ID | 1IJERLSNNMD88VTQ9RM8B00U9B |
combo_type | String | Required | ComboType | NORMAL |
combo_instrument_type | String | Required | InstrumentTypes | OPTION |
option_strategy | String | Optional | OptionsStrategy | SINGLE |
support_trading_session | String | Optional | ExtendedHours | N |
side | String | Required | OrderSide | BUY |
order_type | String | Required | OrderType | MARKET |
time_in_force | String | Required | OrderTIF | DAY |
stop_price | String | Optional | Stop Price | 11.00 |
limit_price | String | Optional | Limit Price | 11.00 |
quantity | String | Required | Quantity | 1 |
filled_quantity | String | Optional | Filled Quantity | 1 |
trailing_type | String | Optional | TrailingType | AMOUNT |
trailing_stop_step | String | Optional | Trailing Stop Spread | 1 |
status | String | Required | OrderStatus | SUBMITTED |
items | []order_item | Required | Order Details |
order_item:
Parameter | Type | Required | Description | Example value |
---|---|---|---|---|
order_id | String | Required | Order ID | THI82O5JB7MQ2K76LL5FSDS2CB |
combo_type | String | Required | ComboType | NORMAL |
combo_order_id | String | Required | Combo Order ID | OBJOAD3OV65I6UDLO1N70GOO78 |
instrument_type | String | Required | InstrumentTypes | EQUITY |
symbol | String | Required | Symbol | AAPL |
side | String | Required | OrderSide | BUY |
order_type | String | Required | OrderType | MARKET |
time_in_force | String | Required | OrderTIF | DAY |
stop_price | String | Optional | Stop Price | 11.00 |
limit_price | String | Optional | Limit Price | 11.00 |
entrust_type | String | Required | EntrustType | QTY |
total_quantity | String | Required | Quantity | 1 |
filled_quantity | String | Optional | Filled Quantity | 1 |
remain_quantity | String | Required | Unfilled Quantity | 1 |
place_time | String | Required | Order Time Unit: millisecond | 1726745361658 |
filled_time | String | Optional | Last trade time Unit: millisecond | 1726745361871 |
filled_price | String | Optional | Average transaction price | 11.00 |
support_trading_session | String | Required | ExtendedHours | N |
trailing_type | String | Optional | TrailingType | AMOUNT |
trailing_stop_step | String | Optional | Trailing Stop Spread | 1 |
status | String | Required | OrderStatus | SUBMITTED |
option_type | String | Optional | OptionsType | CALL |
option_expire_date | String | Optional | Option expiration date Format: yyyy-MM-dd | 2019-09-20 |
option_exercise_price | String | Optional | Exercise Price | 190.00 |
option_category | String | Optional | OptionsCategory | AMERICAN |
option_contract_multiplier | String | Optional | The number of shares corresponding to each option contract | 100 |
option_contract_deliverable | String | Optional | The number of shares required to exercise each contract | 100 |
expiration_type | String | Optional | OptionExpirationTypes | AM |
Request Example
- 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());