Query Order Detail
Interface Description
Function description: Query order details.
Applicable objects: Customers who connect to Webull through the OpenApi development platform.
Request URL: /trade/order/detail
Request method: GET
Frequency limit: The calling frequency of each AppId is limited to 2 times in 2 seconds.
Request Parameters
Parameter | Type | Required fields | Description | Example value |
---|---|---|---|---|
account_id | String | Yes | Account ID | 20150320010101001 |
client_order_id | String | Yes | The 3rd party order ID | 2022021819071234 |
Response Parameter
Order:
Field | Type | Description |
---|---|---|
account_id | String | Account ID |
category | String | Category: refer to data dictionary |
currency | String | Currency,such as: HKD |
client_order_id | String | The ID passed in when the customer places an order. |
extended_hours_trading | Boolean | Whether to support pre-market and post-market |
filled_price | String | Average transaction price |
filled_qty | String | The number of transactions |
instrument_id | String | Symbol ID |
last_filled_time | String | Last trade time: UTC time. Time format: yyyy-MM-ddTHH:mm:ss.SSSZ. Only traded orders have values. |
limit_price | String | Limit price: it only has values if the trade type is a limit order or stop limit order. |
order_id | String | Order ID |
order_status | String | Order status: referring to OrderStatus in the data dictionary. |
order_type | String | Order type: referring to OrderType in the data dictionary. |
place_time | String | Order time: UTC time. Time format: yyyy-MM-ddTHH:mm:ss.SSSZ |
qty | String | Quantity |
side | String | Buy and sell directions: referring to OrderSide in the data dictionary |
stop_price | String | Stop loss price: it only has value when the order type is stop loss order or stop loss limit order. |
symbol | String | Stock code, eg: 01810 |
short_name | String | Stock name, such as: Xiaomi Group-W |
tif | String | Order validity period: referring to OrderTIF in the data dictionary. |
trailing_stop_step | String | Trailing spread: it only has value when the order type is trailing stop order. |
trailing_type | String | Trailing type, TrailingType only has value when the order type is trailing stop order |
Request Example
- 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.query_order_detail(account_id,client_order_id)
if response.status_code == 200:
order_detail = response.json()
HttpApiConfig apiConfig = HttpApiConfig.builder()
.appKey(Env.APP_KEY)
.appSecret(Env.APP_SECRET)
.regionId(Region.hk.name())
.build();
TradeApiService apiService = new TradeHttpApiService(apiConfig);
Order orderDetail = apiService.getOrderDetails(accountId, clientOrderId);