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

# Get Snapshots

> Get time-series snapshots for a market

# Get Snapshots

Returns the market details along with its time-series snapshots, including price data and optional order book depth.

## Request

```
https://api.polyhistorical.com/v1/markets/{slug}/snapshots
```

### Headers

<ParamField header="X-API-Key" type="string" required>
  Your API key. See [Authentication](/api-reference/overview#authentication).
</ParamField>

### Path parameters

<ParamField path="slug" type="string" required>
  The market slug, e.g. `btc-updown-5m-1774975800`
</ParamField>

### Query parameters

<ParamField query="limit" type="integer" default="1000">
  Number of snapshots to return (1-1000)
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Pagination offset
</ParamField>

<ParamField query="include_orderbook" type="boolean" default="false">
  Include full order book data (bids and asks) in each snapshot. Set to `false` for lower latency.
</ParamField>

## Response

<ResponseField name="market" type="object">
  The market object (same as [Get Market](/api-reference/get-market))
</ResponseField>

<ResponseField name="snapshots" type="array">
  Array of snapshot objects, each containing:

  * `time` (string) -- Snapshot timestamp (ISO 8601)
  * `coin_price` (number) -- Coin price at snapshot time
  * `price_up` (number) -- Price of the "Up" outcome (0-1)
  * `price_down` (number) -- Price of the "Down" outcome (0-1)
  * `orderbook_up` (object, optional) -- Order book for "Up" outcome
  * `orderbook_down` (object, optional) -- Order book for "Down" outcome
</ResponseField>

<ResponseField name="total" type="integer">
  Total number of snapshots available
</ResponseField>

## Examples

### Get snapshots without order book (faster)

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "X-API-Key: YOUR_API_KEY" \
    "https://api.polyhistorical.com/v1/markets/btc-updown-5m-1774975800/snapshots?limit=10"
  ```

  ```python Python theme={null}
  response = requests.get(
      f"https://api.polyhistorical.com/v1/markets/{slug}/snapshots",
      params={"limit": 10},
      headers={"X-API-Key": API_KEY}
  )
  ```
</CodeGroup>

### Get snapshots with full order book

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "X-API-Key: YOUR_API_KEY" \
    "https://api.polyhistorical.com/v1/markets/btc-updown-5m-1774975800/snapshots?limit=10&include_orderbook=true"
  ```

  ```python Python theme={null}
  response = requests.get(
      f"https://api.polyhistorical.com/v1/markets/{slug}/snapshots",
      params={"limit": 10, "include_orderbook": True},
      headers={"X-API-Key": API_KEY}
  )
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "market": {
    "slug": "btc-updown-5m-1774975800",
    "winner": "Down",
    "market_id": "1793728",
    "event_id": "325933",
    "market_type": "5m",
    "start_time": "2026-03-31T16:50:00Z",
    "end_time": "2026-03-31T16:55:00Z",
    "coin_price_start": 67701.82777476,
    "condition_id": "0x740cfdbafa8d1b1d51729da79b05e641158d3a7c889175dab1eab20a2c92b5cc",
    "clob_token_up": "83511279567738325562016865404511480598726292757090195771777541218161914729159",
    "clob_token_down": "66091509674921971407227514952521456996907573303653223323107401767726760115252",
    "final_volume": 202849.44,
    "final_liquidity": 12435.04,
    "coin_price_end": 67611.61304387,
    "resolved_at": "2026-03-31T16:55:25Z",
    "created_at": "2026-03-31T16:50:00.943587Z",
    "updated_at": "2026-03-31T17:21:20.768590Z"
  },
  "snapshots": [
    {
      "time": "2026-03-31T16:54:59.956459Z",
      "coin_price": 67673.18,
      "price_up": 0.455,
      "price_down": 0.545,
      "orderbook_up": {
        "asks": [
          { "size": 3999.68, "price": 0.99 },
          { "size": 2081.11, "price": 0.98 },
          { "size": 798.23, "price": 0.97 },
          { "size": 2604.0, "price": 0.96 },
          { "size": 335.0, "price": 0.95 },
          { "size": 470.0, "price": 0.94 },
          { "size": 2725.25, "price": 0.93 },
          { "size": 55.0, "price": 0.92 },
          { "size": 81.5, "price": 0.91 },
          { "size": 130.04, "price": 0.9 }
        ],
        "bids": []
      },
      "orderbook_down": {
        "asks": [],
        "bids": [
          { "size": 3999.68, "price": 0.01 },
          { "size": 2081.11, "price": 0.02 },
          { "size": 798.23, "price": 0.03 },
          { "size": 2604.0, "price": 0.04 },
          { "size": 335.0, "price": 0.05 },
          { "size": 470.0, "price": 0.06 },
          { "size": 2725.25, "price": 0.07 },
          { "size": 55.0, "price": 0.08 },
          { "size": 81.5, "price": 0.09 },
          { "size": 130.04, "price": 0.1 }
        ]
      }
    },
    {
      "time": "2026-03-31T16:54:59.464320Z",
      "coin_price": 67673.18,
      "price_up": 0.455,
      "price_down": 0.545,
      "orderbook_up": {
        "asks": [
          { "size": 3488.68, "price": 0.99 },
          { "size": 2081.11, "price": 0.98 },
          { "size": 798.23, "price": 0.97 },
          { "size": 104.0, "price": 0.96 },
          { "size": 335.0, "price": 0.95 },
          { "size": 470.0, "price": 0.94 },
          { "size": 475.25, "price": 0.93 },
          { "size": 55.0, "price": 0.92 },
          { "size": 81.5, "price": 0.91 },
          { "size": 90.04, "price": 0.9 }
        ],
        "bids": []
      },
      "orderbook_down": {
        "asks": [],
        "bids": [
          { "size": 3488.68, "price": 0.01 },
          { "size": 2081.11, "price": 0.02 },
          { "size": 798.23, "price": 0.03 },
          { "size": 104.0, "price": 0.04 },
          { "size": 335.0, "price": 0.05 },
          { "size": 470.0, "price": 0.06 },
          { "size": 475.25, "price": 0.07 },
          { "size": 55.0, "price": 0.08 },
          { "size": 81.5, "price": 0.09 },
          { "size": 90.04, "price": 0.1 }
        ]
      }
    }
  ],
  "total": 878,
  "limit": 10,
  "offset": 0
}
```

<Note>
  Response truncated — 10 snapshots are returned with `limit=10`. Each snapshot includes full order book data when `include_orderbook=true`.
</Note>

<Tip>
  Set `include_orderbook=false` (default) for significantly lower latency and smaller response sizes when you only need price data.
</Tip>
