Query Orders
This endpoint retrieves a paginated list of historical and current orders placed by the user. It supports filtering by market and time range.
HTTP Request
bash
GET /trade/v1/ordersRequest Parameters
| Name | Type | Required | Description |
|---|---|---|---|
market | ENUM | No | Market code. See market enum for supported values. |
start_time | LONG | No | Start time in UNIX timestamp (seconds). |
end_time | LONG | No | End time in UNIX timestamp (seconds). |
portfolio_id | STRING | No | Portfolio ID (which is a user-defined external id ) to distinguish between orders from different portfolios. |
page_index | INT | Yes | Page number, default is 1. |
page_size | INT | Yes | Number of records per page, default is 20, max limit is 100. |
Example cURL Request
bash
curl --location --request GET '{$base_url}/trade/v1/orders?page_index=1&page_size=100&market=hkex' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'X-API-Signature: YOUR_GENERATED_SIGNATURE' \
--header 'X-API-Timestamp: 1746774142'Response Fields
| Field | Type | Description |
|---|---|---|
market | ENUM | Market code |
order_type | ENUM | Order type |
symbol | STRING | Product code |
name | STRING | Product name |
order_side | ENUM | Buy/sell direction |
account_code | STRING | Trading account |
order_no | STRING | System-generated order number |
order_status | ENUM | Order status |
price | DECIMAL | Order price |
qty | DECIMAL | Total quantity |
outstand_qty | DECIMAL | Unfilled quantity |
execute_qty | DECIMAL | Filled quantity |
execute_price | DECIMAL | Execution price |
execute_amount | DECIMAL | Total executed amount |
charge | DECIMAL | Trading fee |
charge_base_currency | STRING | Fee currency code |
base_currency | STRING | Settlement currency |
trigger_price | DECIMAL | Trigger price, if applicable |
reference_id | STRING | Client-defined ID |
portfolio_id | STRING | Portfolio ID |
reject_reason | STRING | Reason for rejection (if any) |
update_time | LONG | Last updated timestamp |
create_time | LONG | Order creation timestamp |
Successful Response Example
json
{
"code": 0,
"data": {
"total_records": 1,
"page": 1,
"page_size": 20,
"orders": [
{
"market": "hkex",
"order_type": "enhanced_limit_order",
"symbol": "00700",
"name": "TENCENT",
"order_side": "buy",
"account_code": "80114138",
"order_no": "22000000022",
"order_status": "can",
"price": 423.83,
"qty": 1000,
"outstand_qty": 0,
"execute_qty": 1000,
"execute_amount": 423.83,
"charge": 20.03,
"charge_base_currency": "HKD",
"base_currency": "HKD",
"reference_id": "",
"portfolio_id": "",
"reject_reason": "",
"update_time": 1746775317,
"create_time": 1746775257
}
]
}
}Error Example
json
{
"code": 500,
"message": "Internal Service Error",
"details": ""
}
