Skip to content

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/orders

Request Parameters

NameTypeRequiredDescription
marketENUMNoMarket code. See market enum for supported values.
start_timeLONGNoStart time in UNIX timestamp (seconds).
end_timeLONGNoEnd time in UNIX timestamp (seconds).
portfolio_idSTRINGNoPortfolio ID (which is a user-defined external id ) to distinguish between orders from different portfolios.
page_indexINTYesPage number, default is 1.
page_sizeINTYesNumber 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

FieldTypeDescription
marketENUMMarket code
order_typeENUMOrder type
symbolSTRINGProduct code
nameSTRINGProduct name
order_sideENUMBuy/sell direction
account_codeSTRINGTrading account
order_noSTRINGSystem-generated order number
order_statusENUMOrder status
priceDECIMALOrder price
qtyDECIMALTotal quantity
outstand_qtyDECIMALUnfilled quantity
execute_qtyDECIMALFilled quantity
execute_priceDECIMALExecution price
execute_amountDECIMALTotal executed amount
chargeDECIMALTrading fee
charge_base_currencySTRINGFee currency code
base_currencySTRINGSettlement currency
trigger_priceDECIMALTrigger price, if applicable
reference_idSTRINGClient-defined ID
portfolio_idSTRINGPortfolio ID
reject_reasonSTRINGReason for rejection (if any)
update_timeLONGLast updated timestamp
create_timeLONGOrder 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": ""
}