Skip to main content

query.trade_order.list

List trade orders.

Method

query.trade_order.list

Description

Returns a paginated list of trade orders with filtering options. Filter by trading account, instrument, status, and time range.

Parameters

FieldTypeRequiredDescription
tradeOrderIdstringNoFilter by specific order ID
tradingAccountIdstringNoFilter by trading account
instrumentIdstringNoFilter by instrument
statusstringNoFilter by order status
startTimeintegerNoStart timestamp (ms)
endTimeintegerNoEnd timestamp (ms)
limitintegerNoMaximum results (default: 100)
offsetintegerNoPagination offset
cursorstringNoPagination cursor
ascendingbooleanNoSort order (default: false)

Result

Returns an array of trade order objects.

Trade Order Object

FieldTypeDescription
tradeOrderIdstringUnique order identifier (UUID)
tradingAccountIdstringTrading account ID
venuestringExchange venue
instrumentIdstringInstrument identifier
baseAssetstringBase asset (e.g., "BTC")
quoteAssetstringQuote asset (e.g., "USDT")
orderSidestringOrder side (BUY, SELL)
orderTypestringOrder type (MARKET, LIMIT, etc.)
timeInForcestringTime in force (GTC, IOC, FOK)
statusstringOrder status
limitPricestringLimit price (for limit orders)
stopPricestringStop price (for stop orders)
quantitystringRequested quantity
executedPricestringWeighted average executed price
executedQuantitystringTotal executed quantity
executedCoststringTotal executed cost
feesarrayAggregated fees
createdAtintegerCreation timestamp (ms)
updatedAtintegerLast update timestamp (ms)

Order Status Values

StatusDescription
PENDINGOrder submitted, awaiting exchange
OPENOrder accepted, working
PARTIALLY_FILLEDOrder partially executed
FILLEDOrder fully executed
CANCELLEDOrder cancelled
REJECTEDOrder rejected
EXPIREDOrder expired

Usage

# List all orders
result = await client.rpc("query.trade_order.list", {})

# List orders by account and status
result = await client.rpc("query.trade_order.list", {
"tradingAccountId": "550e8400-e29b-41d4-a716-446655440000",
"status": "OPEN",
"limit": 50
})

Example Response

{
"data": [
{
"tradeOrderId": "770e8400-e29b-41d4-a716-446655440002",
"tradingAccountId": "550e8400-e29b-41d4-a716-446655440000",
"venue": "BINANCE",
"instrumentId": "BINANCE:BTC/USDT",
"baseAsset": "BTC",
"quoteAsset": "USDT",
"orderSide": "BUY",
"orderType": "LIMIT",
"timeInForce": "GTC",
"status": "FILLED",
"limitPrice": "50000.00",
"quantity": "0.1",
"executedPrice": "49998.50",
"executedQuantity": "0.1",
"executedCost": "4999.85",
"fees": [
{"symbol": "USDT", "quantity": "4.99985"}
],
"createdAt": 1703052635110,
"updatedAt": 1703052640110
}
],
"pagination": {
"offset": 0,
"limit": 100,
"total": 250
}
}