Skip to main content

query.trade_order.get

Get a specific trade order.

Method

query.trade_order.get

Description

Returns detailed information about a specific trade order, including execution history.

Parameters

FieldTypeRequiredDescription
tradeOrderIdstringYesTrade order ID

Result

Returns a trade order object with full execution details.

Trade Order Object

FieldTypeDescription
tradeOrderIdstringUnique order identifier (UUID)
tradingAccountIdstringTrading account ID
venuestringExchange venue
instrumentIdstringInstrument identifier
baseAssetstringBase asset
quoteAssetstringQuote asset
orderSidestringOrder side (BUY, SELL)
orderTypestringOrder type
timeInForcestringTime in force
statusstringOrder status
limitPricestringLimit price
stopPricestringStop price
quantitystringRequested quantity
executedPricestringWeighted average executed price
executedQuantitystringTotal executed quantity
executedCoststringTotal executed cost
feesarrayAggregated fees
executionsarrayDetailed execution breakdown
rejectReasonstringRejection reason (if rejected)
cancelReasonstringCancellation reason (if cancelled)
createdAtintegerCreation timestamp (ms)
updatedAtintegerLast update timestamp (ms)
canceledAtintegerCancellation timestamp (ms)

Execution Object

FieldTypeDescription
executionIdstringExecution identifier
pricestringExecution price
quantitystringExecution quantity
feeobjectExecution fee
timestampintegerExecution timestamp (ms)

Usage

result = await client.rpc("query.trade_order.get", {
"tradeOrderId": "770e8400-e29b-41d4-a716-446655440002"
})

Example Response

{
"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"}
],
"executions": [
{
"executionId": "exec-001",
"price": "49997.00",
"quantity": "0.05",
"fee": {"symbol": "USDT", "quantity": "2.49985"},
"timestamp": 1703052638110
},
{
"executionId": "exec-002",
"price": "50000.00",
"quantity": "0.05",
"fee": {"symbol": "USDT", "quantity": "2.50000"},
"timestamp": 1703052640110
}
],
"createdAt": 1703052635110,
"updatedAt": 1703052640110
}