> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polaris.supply/llms.txt
> Use this file to discover all available pages before exploring further.

# L2 Orderbook Updates

> Query stateless L2 source snapshots and sparse updates.

Read source order-book observations in global collector-time order. Every row has 25 fixed price and size slots per side. `source_event_is_snapshot` identifies a complete source snapshot; false identifies a sparse absolute-level update. Do not treat each update as a complete book.

## Request

```bash theme={null}
curl "https://api.polaris.supply/l2-updates?source=hyperliquid&market=BTC&limit=2"
```

### Query parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `source` | `string` | No | Optional exact source identifier |
| `market` | `string` | No | Optional exact normalized routing market across sources |
| `instrument` | `string` | No | Exact venue-native instrument |
| `start` | `integer` | No | Inclusive collector time in Unix milliseconds. With no end, queries through now. Anonymous requests must start within the rolling last hour; older history requires a Polaris API key. |
| `end` | `integer` | No | Inclusive collector time in Unix milliseconds. With no start, queries the preceding hour, clamped to the public cutoff for anonymous requests. Older history requires a Polaris API key. |
| `limit` | `integer` | No | Page size from 1 to 1000; defaults to 200 |
| `cursor` | `string` | No | Opaque keyset cursor bound to this complete query; anonymous continuation skips rows that have aged beyond the last hour |

## Access and behavior

With no bounds, the API queries the latest hour anonymously. Explicit bounds inside the rolling last hour are also public; older history requires a Polaris API key. `start` and `end` are inclusive collector timestamps in Unix milliseconds. With only `start`, the query runs through now; with only `end`, it covers the preceding hour, clamped to the anonymous cutoff. Anonymous reads are capped at 1 GiB per request and two concurrent queries per API replica. Rows that age out of the public hour are skipped during anonymous pagination.

## Response

| Field | Type | Required | Description |
| - | - | - | - |
| `items` | `OrderbookL2EventItem[]` | Yes | — |
| `has_more` | `boolean` | Yes | — |
| `next_cursor` | `string / null` | Yes | — |

### `items[]` fields

| Field | Type | Required | Description |
| - | - | - | - |
| `event_id` | `string` | Yes | — |
| `source` | `string` | Yes | — |
| `market` | `string` | Yes | — |
| `instrument` | `string / null` | Yes | — |
| `collector_timestamp` | `integer` | Yes | — |
| `exchange_timestamp` | `integer / null` | Yes | — |
| `source_capture_id` | `string` | Yes | — |
| `schema_version` | `integer` | Yes | — |
| `source_event_is_snapshot` | `boolean` | Yes | — |
| `bid_px_00`–`bid_px_24`, `bid_sz_00`–`bid_sz_24`, `ask_px_00`–`ask_px_24`, `ask_sz_00`–`ask_sz_24` | `number / null` | Yes | Fixed top-25 price and size slots for each side. |

For a sorted full book after every L2 event, use [L2 Orderbooks](/endpoints/l2-orderbooks). SDK event envelopes and builder behavior are documented in [L2 snapshots and updates](/schemas/l2-snapshots).

## Pagination

Pass `next_cursor` as `cursor` with the same filters. Stop when `has_more` is false, or when `next_cursor` is null for endpoints without `has_more`. A cursor is opaque; do not edit or reuse it with different filters.

## Errors

The OpenAPI contract lists `400`, `401`, `422`, `429`, `503`. Error responses use `error.code`, `error.message`, and `error.resolution`. Narrow an expensive query after `422`. Follow `Retry-After` after `429`.

For the machine-readable contract, see the [OpenAPI document](https://api.polaris.supply/openapi.json).
