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

> Retrieve the full configuration of one commodity order book

Returns the stored record for a single book: its pair, status, sizing rules, fees, fungibility class, and price reference configuration.

Books you own and books you have imported both resolve. A book that is neither, or whose token type is not a commodity token, returns `ORDER_BOOK_NOT_FOUND` rather than disclosing that it exists.

## Path Parameters

<ParamField path="orderBookId" type="string" required>Order book ID.</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="id" type="string">Order book ID.</ResponseField>
    <ResponseField name="instanceId" type="string">Owning instance. Differs from yours on an imported book.</ResponseField>
    <ResponseField name="tokenAddress" type="string">Commodity token.</ResponseField>
    <ResponseField name="quoteTokenAddress" type="string">Settlement token (stablecoin).</ResponseField>
    <ResponseField name="name" type="string">Display name.</ResponseField>
    <ResponseField name="symbol" type="string">Display symbol.</ResponseField>
    <ResponseField name="status" type="string">`ACTIVE`, `PAUSED` or `CLOSED`.</ResponseField>
    <ResponseField name="tokenType" type="string">`LIGHT_TOKEN`.</ResponseField>
    <ResponseField name="settlementMode" type="string">`ON_CHAIN`.</ResponseField>
    <ResponseField name="custodyContract" type="string">Custody contract the book settles through.</ResponseField>
    <ResponseField name="cfid" type="string">Fungibility class the book pools on, or `null`.</ResponseField>
    <ResponseField name="minOrderSize" type="string">Minimum quantity in order book units.</ResponseField>
    <ResponseField name="maxOrderSize" type="string">Maximum quantity, or `null`.</ResponseField>
    <ResponseField name="tickSize" type="string">Price increment in order book units.</ResponseField>
    <ResponseField name="makerFeeBps" type="integer">Maker fee in basis points.</ResponseField>
    <ResponseField name="takerFeeBps" type="integer">Taker fee in basis points.</ResponseField>
    <ResponseField name="mmMakerRebateBps" type="integer">Market maker fee override, or `null`. Not settable on this surface.</ResponseField>
    <ResponseField name="allowImport" type="boolean">Whether other instances may import the book.</ResponseField>
    <ResponseField name="allowSharedLiquidity" type="boolean">Whether the book pools depth with its class.</ResponseField>
    <ResponseField name="tradingMode" type="string">`CONTINUOUS`.</ResponseField>
    <ResponseField name="underlyingIdentifier" type="string">`null` on this venue.</ResponseField>
    <ResponseField name="baseDecimals" type="integer">`null` on this venue.</ResponseField>
    <ResponseField name="quoteDecimals" type="integer">`null` on this venue.</ResponseField>
    <ResponseField name="settlementOperator" type="string">`null` on this venue.</ResponseField>
    <ResponseField name="priceRefEnabled" type="boolean">Whether the band is enforced.</ResponseField>
    <ResponseField name="priceRefMode" type="string">`MANUAL`, `STOCK_FEED` or `EXTERNAL_FEED`.</ResponseField>
    <ResponseField name="priceRefFeedUrl" type="string">External feed endpoint, or `null`.</ResponseField>
    <ResponseField name="priceRefFeedHeaders" type="string">Feed headers as a JSON string, or `null`.</ResponseField>
    <ResponseField name="priceRefFeedPath" type="string">JSON path, or the ticker in `STOCK_FEED` mode.</ResponseField>
    <ResponseField name="priceRefEnforcement" type="string">Refresh interval.</ResponseField>
    <ResponseField name="priceRefSpreadBps" type="integer">Band half-width in basis points, or `null`.</ResponseField>
    <ResponseField name="priceRefLastPrice" type="string">Last recorded reference price, as a plain decimal.</ResponseField>
    <ResponseField name="priceRefLastUpdated" type="string">ISO 8601 timestamp, or `null`.</ResponseField>
    <ResponseField name="priceRefHaltOnStale" type="boolean">Whether a stale reference stops trading.</ResponseField>
    <ResponseField name="priceRefStaleTolerance" type="integer">Staleness window in seconds, or `null`.</ResponseField>
    <ResponseField name="priceRefCircuitBreakerBps" type="integer">Move that pauses the book, or `null`.</ResponseField>
    <ResponseField name="createdAt" type="string">ISO 8601 timestamp.</ResponseField>
    <ResponseField name="updatedAt" type="string">ISO 8601 timestamp.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/orderbooks/commodities/api/order-books/clx_ob_comm_001" \
    -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/${orderBookId}`,
    { headers: { 'X-API-Key': 'trusset_your_key_here' } }
  );
  const { data } = await res.json();
  console.log(data.symbol, data.cfid ?? 'unpooled');
  ```
</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",
      "minOrderSize": "1000000",
      "maxOrderSize": null,
      "tickSize": "10000",
      "makerFeeBps": 2,
      "takerFeeBps": 8,
      "mmMakerRebateBps": null,
      "allowImport": true,
      "allowSharedLiquidity": true,
      "tradingMode": "CONTINUOUS",
      "underlyingIdentifier": null,
      "baseDecimals": null,
      "quoteDecimals": null,
      "settlementOperator": null,
      "priceRefEnabled": true,
      "priceRefMode": "EXTERNAL_FEED",
      "priceRefFeedUrl": "https://feeds.example.com/xau",
      "priceRefFeedHeaders": null,
      "priceRefFeedPath": "data.price",
      "priceRefEnforcement": "1MIN",
      "priceRefSpreadBps": 100,
      "priceRefLastPrice": "2412.55",
      "priceRefLastUpdated": "2025-06-15T11:59:30.000Z",
      "priceRefHaltOnStale": true,
      "priceRefStaleTolerance": 300,
      "priceRefCircuitBreakerBps": 800,
      "createdAt": "2025-06-01T09:00:00.000Z",
      "updatedAt": "2025-06-15T11:59:30.000Z"
    }
  }
  ```
</ResponseExample>

## Error Codes

| Code                   | HTTP  | Cause                                                     |
| ---------------------- | ----- | --------------------------------------------------------- |
| `ORDER_BOOK_NOT_FOUND` | `404` | No such commodity book on this instance, and not imported |
| `SERVICE_NOT_ENABLED`  | `403` | The Trading service is not enabled on this instance       |
