Skip to main content

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

ParameterTypeRequired fieldsDescriptionExample value
account_idStringYesAccount ID20150320010101001
client_order_idStringYesWEBULL system internal orderId2022021819071234

Response parameter

Order:

FieldTypeDescription
account_idStringAccount ID
categoryStringCategory: refer to data dictionary
currencyStringCurrency,such as: USD
client_order_idStringWEBULL system internal orderId
extended_hours_tradingBooleanWhether to support pre-market and post-market
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 values.
limit_priceStringLimit price: it only has values if the trade type is a limit order or stop limit order.
order_statusStringOrder status: referring to Order Status in the data dictionary.
order_typeStringOrder type: referring to OrderType in the data dictionary.
place_timeStringOrder time: UTC time. Time format: yyyy-MM-ddTHH:mm:ss.SSSZ
qtyStringQuantity
sideStringBuy and sell directions: referring to OrderSide in the data dictionary
stop_priceStringStop loss price: it only has value when the order type is stop loss order or stop loss limit order.
symbolStringStock code, eg: 01810
tifStringOrder validity period: referring to OrderTIF in the data dictionary.
trailing_stop_stepStringTrailing spread: it only has value when the order type is trailing stop order.
trailing_typeStringTrailing type, TrailingType only has value when the order type is trailing stop order
account_tax_typeStringAccount tax type refers to the dictionary value AccountTaxType
margin_typeStringMargin type refers to the dictionary value MarginType
close_contracts[]CloseContractList of contracts, if the position is closed with the field passed in, the position will be closed according to the contract dimension. If contract id is not passed, the position will be closed according to the first-in-first-out rule.

close_contracts:

ParameterTypeDescription
contract_idStringContract id
qtyStringThe quantities of orders to be closed under each contract ID.

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.JP.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

Exception example