Skip to main content

Query Order Detail

Interface Description

  • Function description: Query order details.

  • URL: /trade/order/detail

  • Method: GET

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

Request Parameters

ParameterTypeRequired fieldsDescriptionExample value
account_idStringYesAccount IDace1oe2y
client_order_idStringYesWebull Pay Order IDCO0358O5QRRC83E0KHK8G8000000

Response Parameter

FieldTypeDescription
account_idStringAccount ID
instrument_idStringInstrument ID
symbolStringCrypto code, eg: BTCUSD
categoryStringSecurity type, enumeration. Reference: Category, Currently only CRYPTO is supported.
short_nameStringCrypto short name, eg: BTC
currencyStringCurrency,eg: USD
client_order_idStringWebull Pay Order ID
entrust_typeStringEntrust type: AMT (by amount), QTY (by quantity)
place_amtStringplace amount
place_qtyStringplace quantity
filled_priceStringAverage transaction price
filled_qtyStringThe number of transactions
filled_amtStringThe amount of transactions
filled_timeStringTransaction time, EST time, time format: yyyy-MM-dd HH:mm:ss Z (Only the completed orders have value)
limit_priceStringLimit price: it only has values if the order type is a limit order or stop limit order.
stop_priceStringStop loss price: it only has values when order type is stop loss order or stop loss limit.
order_statusStringFor order status, please refer to OrderStatus in the data dictionary
order_typeStringFor order type, please refer to OrderType in the data dictionary
create_timeStringOrder time: EST time. Time format: yyyy-MM-dd HH:mm:ss Z
sideStringFor buy and sell directions, please refer to OrderSide in the data dictionary
tifStringFor order validity period, please refer to OrderTIF in the data dictionary
update_timeStringUpdate time: EST time. Time format: yyyy-MM-dd HH:mm:ss Z

Request Example

from webullpaysdktrade.api import API
from webullpaysdkcore.client import ApiClient
from webullpaysdkcore.common.region import Region

your_app_key = "<your_app_key>"
your_app_secret = "<your_app_secret>"
account_id = "account_id"
client_order_id = ""


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

Response Example

{
"symbol": "BTCUSD",
"currency": "USD",
"account_id": "co393b0b701",
"category": "CRYPTO",
"instrument_id": "950160802",
"short_name": "BTC",
"client_order_id": "CO0358SRINIE83E0KHK1DS000000",
"order_status": "CANCELLED",
"order_type": "STP_LMT",
"limit_price": "89607.27",
"stop_price": "91493.74",
"side": "SELL",
"tif": "GTC",
"entrust_type": "QTY",
"place_amt": "0.00",
"place_qty": "0.22821659",
"filled_qty": "0",
"filled_amt": "0.00",
"create_time": "2025-02-19 01:19:39 EST",
"update_time": "2025-02-19 01:29:50 EST"
}

Exception Example

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