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

# List Order Books

> List the commodity order books your instance owns or has imported

Returns every commodity order book on your instance, newest first, followed by every book you have imported from another instance.

Imported books carry two extra fields, `_imported` and `_importId`, which owned books do not have. `_importId` is what [Remove Import](/endpoints/commodity-trading/remove-import) takes.

Books sharing a `cfid` are in the same fungibility class and, where both have opted in, match against one another's depth.

## Query Parameters

<ParamField query="status" type="string">
  Restrict to one status: `ACTIVE`, `PAUSED` or `CLOSED`. Applies to owned and imported books alike.
</ParamField>

## Response Fields

`data` is an array of order book records, each with the same fields as [Get Order Book](/endpoints/commodity-trading/get-order-book), plus:

<ResponseField name="_imported" type="boolean">Present and `true` only on imported books.</ResponseField>

<ResponseField name="_importId" type="string">Present only on imported books.</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/orderbooks/commodities/api/order-books?status=ACTIVE" \
    -H "X-API-Key: trusset_your_key_here"
  ```

  ```typescript TypeScript theme={null}
  const res = await fetch(
    'https://api.trusset.org/orderbooks/commodities/api/order-books?status=ACTIVE',
    { headers: { 'X-API-Key': 'trusset_your_key_here' } }
  );
  const { data } = await res.json();

  const byClass = new Map<string, any[]>();
  for (const b of data) {
    if (!b.cfid) continue;
    byClass.set(b.cfid, [...(byClass.get(b.cfid) ?? []), b]);
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": [
      {
        "id": "clx_ob_comm_001",
        "instanceId": "inst_abc123",
        "tokenAddress": "0xd8f3ba9de5b7b83f66d1a7b1ad96c1a64b811ff9",
        "quoteTokenAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
        "name": "Allocated Gold 999.9",
        "symbol": "XAUA",
        "status": "ACTIVE",
        "tokenType": "LIGHT_TOKEN",
        "settlementMode": "ON_CHAIN",
        "custodyContract": "0xf3dac9cf19da1c95a80de890e200bc86e0c6f2da",
        "cfid": "0x6b1f0d2c8a3e57941b6d0af25c8e3714b90d6f2a41c5e807396ba2d5f10c84e7",
        "makerFeeBps": 2,
        "takerFeeBps": 8,
        "allowImport": true,
        "allowSharedLiquidity": true,
        "tradingMode": "CONTINUOUS",
        "createdAt": "2025-06-01T09:00:00.000Z"
      },
      {
        "id": "clx_ob_comm_055",
        "instanceId": "inst_partner_9",
        "name": "Zurich Vault Gold",
        "symbol": "ZVG",
        "status": "ACTIVE",
        "tokenType": "LIGHT_TOKEN",
        "cfid": "0x6b1f0d2c8a3e57941b6d0af25c8e3714b90d6f2a41c5e807396ba2d5f10c84e7",
        "_imported": true,
        "_importId": "clx_import_031"
      }
    ]
  }
  ```
</ResponseExample>

## Error Codes

| Code                  | HTTP  | Cause                                               |
| --------------------- | ----- | --------------------------------------------------- |
| `SERVICE_NOT_ENABLED` | `403` | The Trading service is not enabled on this instance |
