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

# Get Kalshi Market Data Range

> Retrieve raw Kalshi market events across an inclusive timestamp range using cursor pagination.

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Example: `Bearer YOUR_API_KEY`
</ParamField>

### Query Parameters

<ParamField query="ticker" type="string" required>
  The Kalshi market ticker. Values are normalized to uppercase.
</ParamField>

<ParamField query="start_timestamp" type="integer" required>
  Inclusive lower timestamp bound. Accepts Unix seconds or milliseconds.
</ParamField>

<ParamField query="end_timestamp" type="integer" required>
  Inclusive upper timestamp bound. Accepts Unix seconds or milliseconds.
</ParamField>

<ParamField query="cursor" type="string">
  Opaque cursor returned by the previous page for the same ticker and timestamp range.
</ParamField>

<ParamField query="limit" type="integer">
  Maximum number of records to return per page. Default: `10000`. Max: `100000`.
</ParamField>

## Response

<ResponseField name="market_ticker" type="string">
  The normalized Kalshi market ticker.
</ResponseField>

<ResponseField name="start_timestamp" type="integer">
  Inclusive lower timestamp bound normalized to milliseconds.
</ResponseField>

<ResponseField name="end_timestamp" type="integer">
  Inclusive upper timestamp bound normalized to milliseconds.
</ResponseField>

<ResponseField name="data_count" type="integer">
  Number of records returned in the current page.
</ResponseField>

<ResponseField name="data" type="array">
  Array of raw Kalshi records matching the requested range. Record shapes vary by event type.
</ResponseField>

<ResponseField name="pagination" type="object">
  Cursor pagination metadata.

  <Expandable title="Pagination fields">
    <ResponseField name="limit" type="integer">
      Maximum page size requested.
    </ResponseField>

    <ResponseField name="has_more" type="boolean">
      Whether another page is available.
    </ResponseField>

    <ResponseField name="next_cursor" type="string">
      Cursor to pass back unchanged to continue the same range query, or `null` when the final page has been reached.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash Raw HTTP (cURL) theme={null}
  curl -H "Authorization: Bearer YOUR_API_KEY" \
    "https://api.entityml.com/api/v1/kalshi/market/data/range?ticker=KXBTC-26FEB2606-B60125&start_timestamp=1772103600000&end_timestamp=1772107199999&limit=500"
  ```

  ```python Python theme={null}
  import os
  import requests

  response = requests.get(
      "https://api.entityml.com/api/v1/kalshi/market/data/range",
      headers={"Authorization": f"Bearer {os.environ['ENTITY_API_KEY']}"},
      params={
          "ticker": "KXBTC-26FEB2606-B60125",
          "start_timestamp": 1772103600000,
          "end_timestamp": 1772107199999,
          "limit": 500,
      },
  )

  print(response.json())
  ```
</CodeGroup>

### Example response

```json theme={null}
{
  "market_ticker": "KXBTC-26FEB2606-B60125",
  "start_timestamp": 1772103600000,
  "end_timestamp": 1772107199999,
  "data_count": 1,
  "data": [
    {
      "type": "snapshot",
      "ticker": "KXBTC-26FEB2606-B60125",
      "timestamp": "2026-02-26T11:01:16.000623+00:00",
      "epoch_ms": 1772103676000,
      "seq": null,
      "yes": [],
      "no": [[40, 14], [39, 290.81]]
    }
  ],
  "pagination": {
    "limit": 500,
    "has_more": false,
    "next_cursor": null
  }
}
```

<Tip>
  `next_cursor` is opaque. Pass it back unchanged with the same `ticker`, `start_timestamp`, and `end_timestamp` to continue paging when `has_more` is `true`.
</Tip>
