The OpenAPI service is currently suspended for new applications. We will inform you once the service is restored. Existing users who have already been granted access to the OpenAPI can continue to use it as usual.
Skip to main content

Query Order Detail

Interface Description

  • Function description: Query order details.

  • Applicable objects: Customers who integrate into Webull through Webull OpenAPI.

  • Request URL: /trade/order/detail

  • Request method: GET

  • Frequency limit: The calling frequency of each App ID is limited to 10 times in 30 seconds.

Request Parameters

ParameterTypeRequired fieldsDescriptionExample value
account_idStringYesAccount ID20150320010101001
client_order_idStringYesUser-defined order ID2022021819071234

Response Parameter

Order:

FieldTypeDescription
account_idStringAccount ID
combo_typeStringGroup Order Types
combo_ticker_typeStringCategories of Group Orders
client_order_idStringThe ID passed in when the customer places an order
extended_hours_tradingBooleanWhether to support pre-market and post-market
order_idStringOrder ID
tifStringFor order validity period, please refer to OrderTIF in the data dictionary
itemsItem[]Order item list

Item:

FieldTypeDescription
categoryStringFor Category,please refer to Category in the data dictionary
currencyStringCurrency. Reference: Currency, such as: USD.
filled_priceStringAverage transaction price
filled_qtyStringThe number of transactions
instrument_idStringSymbol ID
last_filled_timeStringLast trade time, UTC time, time format: yyyy-MM-ddTHH:mm:ss.SSSZ. Only traded orders have value
limit_priceStringLimit price: it only has values if the order type is a limit order or stop limit order.
order_statusStringFor order status, please refer to OrderStatus in the data dictionary
order_typeStringFor order type, please refer to OrderType in the data dictionary
place_timeStringOrder time: UTC time. Time format: yyyy-MM-ddTHH:mm:ss.SSSZ
qtyStringQuantity
sideStringFor buy and sell directions, please refer to OrderSide in the data dictionary.
stop_priceStringStop loss price: it only has values when order type is stop loss order or stop loss limit.
symbolStringStock code, eg: AAPL
trailing_stop_stepStringTrailing spread: it has values when the order type is trailing stop order.
trailing_typeStringTrailing type, only has value when the order type is trailing stop order.

Request Example

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

Response Example

{
"items":[
0:{
"symbol":
"AAPL"
"category":
"US_STOCK"
"filled_price":
"10.00"
"filled_qty":
"100"
"last_filled_time":
"2022-12-19 11:29:49.057+0000"
"order_status":
"FILLED"
"order_type":
"MARKET"
"place_time":
"2022-12-19 11:29:48.672+0000"
"qty":
"100"
"side":
"BUY"
"instrument_id":
"913256135"
"currency":
"USD"
}
]
"combo_ticker_type":
"STOCK"
"client_order_id":
"APG63S4F36TM94T4SRQ3K7IE7B"
"order_id":
"658520233254322176"
"extended_hours_trading":
false
"tif":
"DAY"
"account_id":
"6TGIBSMG28Q35OVA465T99VHPB"
}

Exception Example

{
"error_code":
"SYSTEM_ERROR"
"message":
"status 500 reading IOpenApiServiceFacade#getOrder(OpenApiOrderQueryParam)"
}