Orders
Get Order
Retrieve one order with its book and its fills
GET
/
orderbooks
/
commodities
/
api
/
orders
/
{orderId}
curl "https://api.trusset.org/orderbooks/commodities/api/orders/f2a9c7d1-40e6-4b83-95c0-7d18a3e6b204" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/orders/${orderId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"id": "clx_order_640",
"orderId": "f2a9c7d1-40e6-4b83-95c0-7d18a3e6b204",
"orderBookId": "clx_ob_comm_001",
"instanceId": "inst_abc123",
"userAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"accountId": null,
"side": "BUY",
"orderType": "LIMIT",
"price": "2412550000",
"quantity": "1000000",
"filledQuantity": "0",
"remainingQuantity": "1000000",
"status": "OPEN",
"timeInForce": "GTC",
"postOnly": false,
"selfTradePreventionMode": "NONE",
"lockId": "clx_lock_311",
"cancelReason": null,
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:00:00.000Z",
"orderBook": { "id": "clx_ob_comm_001", "symbol": "XAUA", "status": "ACTIVE" },
"makerTrades": [],
"takerTrades": []
}
}
Returns a single order, the book it sits on, and every trade it took part in on either side. Resolves only if the order’s book is a commodity book your instance owns or has imported.
Path Parameters
string
required
The order’s
orderId.Response Fields
object
Show child attributes
Show child attributes
string
Internal row ID.
string
Public order ID.
string
Book the order sits on.
string
Instance that submitted the order.
string
Owning wallet, lower-cased.
string
Trading account, or
null.string
BUY or SELL.string
LIMIT or MARKET.string
Limit price in order book units, or
null for a market order.string
Original quantity.
string
Quantity filled so far.
string
Quantity still working.
string
OPEN, PARTIALLY_FILLED, FILLED, CANCELLED, EXPIRED or REJECTED.string
GTC, IOC or FOK.boolean
Whether the order refused to take.
string
Self-trade policy in force.
string
Balance lock backing the order, or
null.string
Why the order closed, or
null. Values include USER_CANCELLED and PRICE_BAND_VIOLATION.string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
object
The full order book record. See Get Order Book.
array
Trades where this order was the resting side.
array
Trades where this order was the aggressing side.
curl "https://api.trusset.org/orderbooks/commodities/api/orders/f2a9c7d1-40e6-4b83-95c0-7d18a3e6b204" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/orders/${orderId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"id": "clx_order_640",
"orderId": "f2a9c7d1-40e6-4b83-95c0-7d18a3e6b204",
"orderBookId": "clx_ob_comm_001",
"instanceId": "inst_abc123",
"userAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"accountId": null,
"side": "BUY",
"orderType": "LIMIT",
"price": "2412550000",
"quantity": "1000000",
"filledQuantity": "0",
"remainingQuantity": "1000000",
"status": "OPEN",
"timeInForce": "GTC",
"postOnly": false,
"selfTradePreventionMode": "NONE",
"lockId": "clx_lock_311",
"cancelReason": null,
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:00:00.000Z",
"orderBook": { "id": "clx_ob_comm_001", "symbol": "XAUA", "status": "ACTIVE" },
"makerTrades": [],
"takerTrades": []
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
ORDER_NOT_FOUND | 404 | No order with that ID, or its book is not reachable from your instance |
SERVICE_NOT_ENABLED | 403 | The Trading service is not enabled on this instance |
⌘I
curl "https://api.trusset.org/orderbooks/commodities/api/orders/f2a9c7d1-40e6-4b83-95c0-7d18a3e6b204" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/orders/${orderId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"id": "clx_order_640",
"orderId": "f2a9c7d1-40e6-4b83-95c0-7d18a3e6b204",
"orderBookId": "clx_ob_comm_001",
"instanceId": "inst_abc123",
"userAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"accountId": null,
"side": "BUY",
"orderType": "LIMIT",
"price": "2412550000",
"quantity": "1000000",
"filledQuantity": "0",
"remainingQuantity": "1000000",
"status": "OPEN",
"timeInForce": "GTC",
"postOnly": false,
"selfTradePreventionMode": "NONE",
"lockId": "clx_lock_311",
"cancelReason": null,
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:00:00.000Z",
"orderBook": { "id": "clx_ob_comm_001", "symbol": "XAUA", "status": "ACTIVE" },
"makerTrades": [],
"takerTrades": []
}
}
