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

# Events

> Query seven persisted event types in global collector-time order.

Query trades, L2 source updates, funding observations, intents, quotes, option tickers, and venue-published candles together. Every item has a `type` and its original typed row in `data`. Reconstructed L2 books and the `/perpetual-ticker` alias are excluded.

## Request

```bash theme={null}
curl -H "Authorization: Bearer $POLARIS_API_KEY" "https://api.polaris.supply/events?start=1727200000000&end=1727200060000&types=trade,l2_update&limit=2"
```

### Query parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `start` | `integer` | Yes | Required inclusive collector time in Unix milliseconds |
| `end` | `integer` | Yes | Required inclusive collector time in Unix milliseconds, at or after start |
| `types` | `string` | No | Optional comma-separated subset: trade,l2\_update,funding\_rate,intent,quote,option\_ticker,ohlcv; defaults to all seven |
| `source` | `string` | No | Optional exact source identifier |
| `market` | `string` | No | Optional exact normalized routing market across sources |
| `instrument` | `string` | No | Optional exact venue-native instrument |
| `limit` | `integer` | No | Page size; defaults to 200 and values above 1000 are capped |
| `cursor` | `string` | No | Opaque keyset cursor bound to the complete query; repeat start, end, types, source, market, and instrument on continuation |

## Access and behavior

A Polaris API key is required for every request. Both `start` and `end` are required inclusive collector timestamps in Unix milliseconds, including when the selected type is `ohlcv`. `types` is a comma-separated subset of `trade,l2_update,funding_rate,intent,quote,option_ticker,ohlcv`; omitting it selects all seven. The cursor is bound to the complete query, so repeat every filter on continuation.

## Response

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

### `items[]` fields

| Field | Type | Required | Description |
| - | - | - | - |
| `data` | `TradeEventItem / OrderbookL2EventItem / FundingRateEventItem / IntentObservationItem / QuoteObservationItem / OptionTickerEventItem / OhlcvEventItem` | Yes | — |
| `type` | `string` | Yes | — |

The `data` value is the flat row from the corresponding typed endpoint. Use the type-specific reference page for that row's fields. Query work is bounded and may return `422` for an overly expensive range.

## SDK mixed events

Python `client.events(...)`, TypeScript `client.events(...)`, and Rust `client.events(HistoricalQuery)` return standardized event envelopes from historical data. Their event set is broader than this REST route: it can include perpetual ticker and datapoint events, and it can reconstruct order books by default. SDK `to` bounds are exclusive; this REST route's `end` is inclusive. See the [SDK event details](/schemas/events) and [event envelope](/concepts/event-envelope) for payload and replay behavior.

## 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`, `503`, `429`. 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).
