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
| Field | Type | Required | Description |
|---|---|---|---|
tradeOrderId | string | No | Filter by specific order ID |
tradingAccountId | string | No | Filter by trading account |
instrumentId | string | No | Filter by instrument |
status | string | No | Filter by order status |
startTime | integer | No | Start timestamp (ms) |
endTime | integer | No | End timestamp (ms) |
limit | integer | No | Maximum results (default: 100) |
offset | integer | No | Pagination offset |
cursor | string | No | Pagination cursor |
ascending | boolean | No | Sort order (default: false) |
Result
Returns an array of trade order objects.
Trade Order Object
| Field | Type | Description |
|---|---|---|
tradeOrderId | string | Unique order identifier (UUID) |
tradingAccountId | string | Trading account ID |
venue | string | Exchange venue |
instrumentId | string | Instrument identifier |
baseAsset | string | Base asset (e.g., "BTC") |
quoteAsset | string | Quote asset (e.g., "USDT") |
orderSide | string | Order side (BUY, SELL) |
orderType | string | Order type (MARKET, LIMIT, etc.) |
timeInForce | string | Time in force (GTC, IOC, FOK) |
status | string | Order status |
limitPrice | string | Limit price (for limit orders) |
stopPrice | string | Stop price (for stop orders) |
quantity | string | Requested quantity |
executedPrice | string | Weighted average executed price |
executedQuantity | string | Total executed quantity |
executedCost | string | Total executed cost |
fees | array | Aggregated fees |
createdAt | integer | Creation timestamp (ms) |
updatedAt | integer | Last update timestamp (ms) |
Order Status Values
| Status | Description |
|---|---|
PENDING | Order submitted, awaiting exchange |
OPEN | Order accepted, working |
PARTIALLY_FILLED | Order partially executed |
FILLED | Order fully executed |
CANCELLED | Order cancelled |
REJECTED | Order rejected |
EXPIRED | Order 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
}
}