> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trusset.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Get User Orders

> List a wallet's orders across the commodity books you can reach

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

<ParamField path="userAddress" type="string" required>Wallet address. Matched case-insensitively.</ParamField>

## Query Parameters

<ParamField query="orderBookId" type="string">Restrict to one book. Ignored if longer than 100 characters.</ParamField>

<ParamField query="status" type="string">
  Restrict to one status: `OPEN`, `PARTIALLY_FILLED`, `FILLED`, `CANCELLED`, `EXPIRED` or `REJECTED`.
</ParamField>

<ParamField query="limit" type="integer" default="50">Page size, capped at 100.</ParamField>

<ParamField query="offset" type="integer" default="0">Rows to skip.</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="orders" type="array">
      Order records, each carrying its `orderBook`. Same shape as [Get Order](/endpoints/commodity-trading/get-order), without the trade arrays.
    </ResponseField>

    <ResponseField name="total" type="integer">Total matching orders, ignoring pagination.</ResponseField>
    <ResponseField name="limit" type="integer">Page size applied.</ResponseField>
    <ResponseField name="offset" type="integer">Offset applied.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/orderbooks/commodities/api/users/0xabc7f1093d5e26b804a1c3f78de025916b47c0d3/orders?status=OPEN" \
    -H "X-API-Key: trusset_your_key_here"
  ```

  ```typescript TypeScript theme={null}
  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();
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "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
    }
  }
  ```
</ResponseExample>

## 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              |
