> ## 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 Price Reference History

> Read the audit log of reference prices applied to a book

Returns every reference price recorded against a book, newest first. One entry is written each time the reference changes, whether it was pushed manually or fetched from a feed, which makes this the audit trail behind any `PRICE_OUTSIDE_BAND` refusal.

Circuit breaker events appear here too, as an entry whose `source` is `CIRCUIT_BREAKER_TRIGGERED` and whose `enforcementUsed` names the size of the move that tripped it. When a feed goes down and the last known price is served instead, the entry records the cached source, so a gap in fresh pricing is visible in the log rather than silent.

Only logs written under your own instance are visible, so an imported book returns its record but no history.

## Path Parameters

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

## Query Parameters

<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="logs" type="array">
      <Expandable>
        <ResponseField name="id" type="string">Log entry ID.</ResponseField>
        <ResponseField name="orderBookId" type="string">Book the entry belongs to.</ResponseField>
        <ResponseField name="instanceId" type="string">Instance that recorded it.</ResponseField>
        <ResponseField name="price" type="string">Reference price as a plain decimal.</ResponseField>

        <ResponseField name="source" type="string">
          `MANUAL`, `EXTERNAL_FEED`, `EXTERNAL_FEED_CACHED`, `STOCK_FEED:<symbol>`, `STOCK_FEED_CACHED`, or `CIRCUIT_BREAKER_TRIGGERED`.
        </ResponseField>

        <ResponseField name="enforcementUsed" type="string">
          The enforcement interval in force. On a circuit breaker entry this carries the move instead, as `<n>bps_move`.
        </ResponseField>

        <ResponseField name="createdAt" type="string">ISO 8601 timestamp.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="total" type="integer">Total entries for this book.</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/order-books/clx_ob_comm_001/price-reference/history?limit=20" \
    -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}/price-reference/history?limit=20`,
    { headers: { 'X-API-Key': 'trusset_your_key_here' } }
  );
  const { data } = await res.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "logs": [
        {
          "id": "clx_prlog_2210",
          "orderBookId": "clx_ob_comm_001",
          "instanceId": "inst_abc123",
          "price": "2412.55",
          "source": "EXTERNAL_FEED",
          "enforcementUsed": "1MIN",
          "createdAt": "2025-06-15T11:59:30.000Z"
        },
        {
          "id": "clx_prlog_2209",
          "orderBookId": "clx_ob_comm_001",
          "instanceId": "inst_abc123",
          "price": "2411.90",
          "source": "EXTERNAL_FEED_CACHED",
          "enforcementUsed": "1MIN",
          "createdAt": "2025-06-15T11:58:30.000Z"
        }
      ],
      "total": 2,
      "limit": 20,
      "offset": 0
    }
  }
  ```
</ResponseExample>

## Error Codes

| Code                   | HTTP  | Cause                                                     |
| ---------------------- | ----- | --------------------------------------------------------- |
| `INVALID_PARAM`        | `400` | `orderBookId` is missing or longer than 100 characters    |
| `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       |
