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
Parameter | Type | Required fields | Description | Example value |
---|---|---|---|---|
account_id | String | Yes | Account ID | ace1oe2y |
client_order_id | String | Yes | Webull Pay Order ID | CO0358O5QRRC83E0KHK8G8000000 |
Response Parameter
Field | Type | Description |
---|---|---|
account_id | String | Account ID |
instrument_id | String | Instrument ID |
symbol | String | Crypto code, eg: BTCUSD |
category | String | Security type, enumeration. Reference: Category, Currently only CRYPTO is supported. |
short_name | String | Crypto short name, eg: BTC |
currency | String | Currency,eg: USD |
client_order_id | String | Webull Pay Order ID |
entrust_type | String | Entrust type: AMT (by amount), QTY (by quantity) |
place_amt | String | place amount |
place_qty | String | place quantity |
filled_price | String | Average transaction price |
filled_qty | String | The number of transactions |
filled_amt | String | The amount of transactions |
filled_time | String | Transaction time, EST time, time format: yyyy-MM-dd HH:mm:ss Z (Only the completed orders have value) |
limit_price | String | Limit price: it only has values if the order type is a limit order or stop limit order. |
stop_price | String | Stop loss price: it only has values when order type is stop loss order or stop loss limit. |
order_status | String | For order status, please refer to OrderStatus in the data dictionary |
order_type | String | For order type, please refer to OrderType in the data dictionary |
create_time | String | Order time: EST time. Time format: yyyy-MM-dd HH:mm:ss Z |
side | String | For buy and sell directions, please refer to OrderSide in the data dictionary |
tif | String | For order validity period, please refer to OrderTIF in the data dictionary |
update_time | String | Update time: EST time. Time format: yyyy-MM-dd HH:mm:ss Z |
Request Example
- Python
- Java
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)
HttpApiConfig apiConfig = HttpApiConfig.builder()
.appKey("<your_app_key>")
.appSecret("<your_app_secret>")
.regionId(Region.us.name())
.build();
TradeApiService apiService = new TradeHttpApiService(apiConfig);
SimpleOrder orderDetail = apiService.getOrderDetails("accountId", "clientOrderId");
//print
System.out.println(JsonSerializer.toJson(orderDetail, SerializeConfig.builder().underscoresToCamel(true).build()));
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)"
}