> ## 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 Off-Chain Price Reference

> Read the reference price and band for an off-chain book

Returns the reference configuration, the live price and the band it implies, in the same shape as [Get Price Reference](/endpoints/stock-trading/get-price-reference).

Unlike the equivalent on the main surface, this route asserts the settlement mode: an on-chain book is refused with `WRONG_SETTLEMENT_MODE`.

A source that could not be reached reports `currentPrice: null` rather than failing, so a monitoring poll never errors on a blinking feed.

## Path Parameters

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

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="enabled" type="boolean">Whether the band is enforced.</ResponseField>
    <ResponseField name="mode" type="string">`MANUAL`, `STOCK_FEED` or `EXTERNAL_FEED`.</ResponseField>
    <ResponseField name="enforcement" type="string">Refresh interval.</ResponseField>
    <ResponseField name="spreadBps" type="integer">Band half-width in basis points, or `null`.</ResponseField>
    <ResponseField name="haltOnStale" type="boolean">Whether a stale reference stops trading.</ResponseField>
    <ResponseField name="staleTolerance" type="integer">Staleness window in seconds, or `null`.</ResponseField>
    <ResponseField name="currentPrice" type="string">Live reference price as a plain decimal, or `null`.</ResponseField>
    <ResponseField name="lowerBound" type="string">Lowest accepted price, or `null`.</ResponseField>
    <ResponseField name="upperBound" type="string">Highest accepted price, or `null`.</ResponseField>
    <ResponseField name="lastUpdated" type="string">ISO 8601 timestamp, or `null`.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/clx_ob_stock_001/price-reference" \
    -H "X-API-Key: trusset_your_key_here"
  ```

  ```typescript TypeScript theme={null}
  const res = await fetch(
    `https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/${orderBookId}/price-reference`,
    { headers: { 'X-API-Key': 'trusset_your_key_here' } }
  );
  const { data } = await res.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "enabled": true,
      "mode": "MANUAL",
      "enforcement": "EVERY_TRADE",
      "spreadBps": 200,
      "haltOnStale": false,
      "staleTolerance": null,
      "currentPrice": "182.35",
      "lowerBound": "178.703",
      "upperBound": "185.997",
      "lastUpdated": "2025-06-15T11:58:00.000Z"
    }
  }
  ```

  ```json Error - On-Chain Book theme={null}
  {
    "success": false,
    "data": null,
    "error": {
      "code": "WRONG_SETTLEMENT_MODE",
      "message": "Use on-chain API for this order book"
    }
  }
  ```
</ResponseExample>

## Error Codes

| Code                    | HTTP  | Cause                                                  |
| ----------------------- | ----- | ------------------------------------------------------ |
| `INVALID_PARAM`         | `400` | `orderBookId` is missing or longer than 100 characters |
| `WRONG_SETTLEMENT_MODE` | `400` | The book settles on chain                              |
| `ORDER_BOOK_NOT_FOUND`  | `404` | No such book on this instance, and not imported        |
