Orders
Get User Orders
List a wallet’s orders across the commodity books you can reach
GET
/
orderbooks
/
commodities
/
api
/
users
/
{userAddress}
/
orders
curl "https://api.trusset.org/orderbooks/commodities/api/users/0xabc7f1093d5e26b804a1c3f78de025916b47c0d3/orders?status=OPEN" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/users/${address}/orders?status=OPEN`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"orders": [
{
"orderId": "f2a9c7d1-40e6-4b83-95c0-7d18a3e6b204",
"orderBookId": "clx_ob_comm_001",
"userAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"side": "BUY",
"orderType": "LIMIT",
"price": "2412550000",
"quantity": "1000000",
"filledQuantity": "0",
"remainingQuantity": "1000000",
"status": "OPEN",
"timeInForce": "GTC",
"createdAt": "2025-06-15T12:00:00.000Z",
"orderBook": { "id": "clx_ob_comm_001", "symbol": "XAUA" }
}
],
"total": 1,
"limit": 50,
"offset": 0
}
}
Returns orders placed by one wallet, newest first. Without
orderBookId the search covers every commodity book your instance owns or has imported. With it, the search is confined to that book, which must resolve for your instance.
Path Parameters
string
required
Wallet address. Matched case-insensitively.
Query Parameters
string
Restrict to one book. Ignored if longer than 100 characters.
string
Restrict to one status:
OPEN, PARTIALLY_FILLED, FILLED, CANCELLED, EXPIRED or REJECTED.integer
default:"50"
Page size, capped at 100.
integer
default:"0"
Rows to skip.
Response Fields
object
curl "https://api.trusset.org/orderbooks/commodities/api/users/0xabc7f1093d5e26b804a1c3f78de025916b47c0d3/orders?status=OPEN" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/users/${address}/orders?status=OPEN`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"orders": [
{
"orderId": "f2a9c7d1-40e6-4b83-95c0-7d18a3e6b204",
"orderBookId": "clx_ob_comm_001",
"userAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"side": "BUY",
"orderType": "LIMIT",
"price": "2412550000",
"quantity": "1000000",
"filledQuantity": "0",
"remainingQuantity": "1000000",
"status": "OPEN",
"timeInForce": "GTC",
"createdAt": "2025-06-15T12:00:00.000Z",
"orderBook": { "id": "clx_ob_comm_001", "symbol": "XAUA" }
}
],
"total": 1,
"limit": 50,
"offset": 0
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
VALIDATION_ERROR | 400 | userAddress is not a valid address |
ORDER_BOOK_NOT_FOUND | 404 | The orderBookId filter names a book your instance cannot reach |
SERVICE_NOT_ENABLED | 403 | The Trading service is not enabled on this instance |
⌘I
curl "https://api.trusset.org/orderbooks/commodities/api/users/0xabc7f1093d5e26b804a1c3f78de025916b47c0d3/orders?status=OPEN" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/users/${address}/orders?status=OPEN`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"orders": [
{
"orderId": "f2a9c7d1-40e6-4b83-95c0-7d18a3e6b204",
"orderBookId": "clx_ob_comm_001",
"userAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"side": "BUY",
"orderType": "LIMIT",
"price": "2412550000",
"quantity": "1000000",
"filledQuantity": "0",
"remainingQuantity": "1000000",
"status": "OPEN",
"timeInForce": "GTC",
"createdAt": "2025-06-15T12:00:00.000Z",
"orderBook": { "id": "clx_ob_comm_001", "symbol": "XAUA" }
}
],
"total": 1,
"limit": 50,
"offset": 0
}
}
