Skip to content

Active Orders

This endpoint retrieves a list of active (i.e., not fully filled or canceled) orders for the authenticated account. It can be filtered by market. This is typically used to monitor outstanding orders in real-time.


HTTP Request

bash
GET /trade/v1/orders/active

Request Parameters

NameTypeRequiredDescription
marketENUMNoMarket code to filter orders (see market enum definition)
portfolio_idSTRINGNoPortfolio ID
page_indexINTYESCurrent page index, 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/active?market=hkex' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'X-API-Signature: YOUR_GENERATED_SIGNATURE' \
--header 'X-API-Timestamp: 1746774142003'

Successful Response Format

FieldTypeDescription
marketENUMMarket code
order_typeENUMOrder type (e.g., limit, enhanced limit)
symbolSTRINGProduct code
nameSTRINGProduct name
order_sideENUMOrder direction: buy or sell
account_codeSTRINGTrading account identifier
order_noSTRINGSystem-generated order ID
order_statusENUMCurrent order status
priceDECIMALOrder price
qtyDECIMALTotal order quantity
outstand_qtyDECIMALRemaining unexecuted quantity
execute_qtyDECIMALQuantity that has been executed
execute_priceDECIMALAverage execution price
execute_amountDECIMALTotal value of executed quantity
chargeDECIMALTransaction fee
charge_base_currencySTRINGFee currency code
base_currencySTRINGTrade currency code
trigger_priceDECIMALTrigger price (for conditional orders)
reference_idSTRINGCustom client-defined order ID
portfolio_idSTRINGPortfolio ID (which is a user-defined external id )
reject_reasonSTRINGReason for rejection (if any)
update_timeLONGLast update timestamp (UNIX format)
create_timeLONGOrder creation timestamp (UNIX format)

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 Response Example

json
{
	"code": 500,
	"message": "Internal Service Error",
	"details": ""
}

See the Error Code Reference for full error descriptions.