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

# Trades

> Query normalized trade rows in global collector-time order.

Read source-independent executions as flat rows. Filter by exact source, normalized routing market, or venue-native instrument when needed.

## Request

```bash theme={null}
curl "https://api.polaris.supply/trades?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; defaults to 200 and values above 1000 are capped |
| `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 |
| - | - | - | - |
| `has_more` | `boolean` | Yes | — |
| `items` | `TradeEventItem[]` | Yes | — |
| `next_cursor` | `string / null` | No | — |

### `items[]` fields

| Field | Type | Required | Description |
| - | - | - | - |
| `collector_timestamp` | `integer` | Yes | — |
| `event_id` | `string` | Yes | — |
| `exchange_timestamp` | `integer / null` | No | — |
| `instrument` | `string / null` | No | — |
| `liquidation` | `boolean / null` | No | — |
| `maker` | `string / null` | No | — |
| `market` | `string` | Yes | — |
| `order_id` | `string / null` | No | — |
| `price` | `number` | Yes | — |
| `quantity` | `number` | Yes | — |
| `schema_version` | `integer` | Yes | — |
| `side` | `string / null` | No | — |
| `source` | `string` | Yes | — |
| `source_capture_id` | `string` | Yes | — |
| `taker` | `string / null` | No | — |

`price` and `quantity` are numbers. SDK trade methods may return standardized event envelopes instead of these flat REST rows; see [trade event fields](/schemas/trades).

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