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

> Read depth, last price and 24-hour statistics for an off-chain book

Returns the same snapshot as [Get Order Book Snapshot](/endpoints/stock-trading/get-order-book-snapshot), served from the off-chain surface so a customer-facing integration does not need the Trading service entitlement.

Because an off-chain book holds no balance locks, its depth is not filtered on lock state: every `OPEN` or `PARTIALLY_FILLED` order that has not expired is counted.

This route does not assert the settlement mode, so it answers for on-chain books too. It also does not filter by token type.

## Path Parameters

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

## Query Parameters

<ParamField query="levels" type="integer" default="20">Price levels per side, capped at 100.</ParamField>

## Response Fields

Same shape as [Get Order Book Snapshot](/endpoints/stock-trading/get-order-book-snapshot): `orderBook`, `depth`, `lastPrice`, `priceReference`, `stats24h` and `timestamp`.

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/clx_ob_stock_001/snapshot?levels=10" \
    -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}/snapshot?levels=10`,
    { headers: { 'X-API-Key': 'trusset_your_key_here' } }
  );
  const { data } = await res.json();
  console.log(data.depth.bids[0]?.price, data.depth.asks[0]?.price);
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "orderBook": {
        "id": "clx_ob_stock_001",
        "symbol": "NYF1",
        "status": "ACTIVE",
        "tokenType": "STOCK_TOKEN",
        "settlementMode": "OFF_CHAIN",
        "custodyContract": null,
        "makerFeeBps": 5,
        "takerFeeBps": 15,
        "minOrderSize": "1000000",
        "maxOrderSize": null,
        "tickSize": "10000"
      },
      "depth": {
        "bids": [{ "price": "182350000", "quantity": "4000000", "orderCount": 2 }],
        "asks": [{ "price": "182600000", "quantity": "2500000", "orderCount": 1 }]
      },
      "lastPrice": "182350000",
      "priceReference": null,
      "stats24h": { "volume": "31000000", "trades": 12, "high": "183100000", "low": "181200000" },
      "timestamp": "2025-06-15T12:00:00.000Z"
    }
  }
  ```
</ResponseExample>

## Error Codes

| Code                   | HTTP  | Cause                                           |
| ---------------------- | ----- | ----------------------------------------------- |
| `ORDER_BOOK_NOT_FOUND` | `404` | No such book on this instance, and not imported |
