> ## 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 Orderbook Summary

> Retrieve a bucketed best bid/best ask time series for a Kalshi market ticker on a UTC date or custom timestamp window.

## 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="date" type="string">
  The UTC date to summarize, formatted as `YYYY-MM-DD`. Required unless `start_timestamp` and `end_timestamp` are provided.
</ParamField>

<ParamField query="start_timestamp" type="integer">
  Inclusive lower timestamp bound in Unix seconds or milliseconds. Must be provided with `end_timestamp`.
</ParamField>

<ParamField query="end_timestamp" type="integer">
  Inclusive upper timestamp bound in Unix seconds or milliseconds. Must be provided with `start_timestamp`.
</ParamField>

<ParamField query="resolution" type="integer">
  Time bucket resolution in seconds. Default: `60`. Valid range: `1` to `3600`.
</ParamField>

<Note>
  Use `date` for a full UTC day, or use `start_timestamp` and `end_timestamp` for a custom UTC window. Custom windows hydrate book state from earlier records in the loaded UTC date partitions and emit buckets inside the requested range.
</Note>

## Response

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

<ResponseField name="date" type="string">
  The requested date.
</ResponseField>

<ResponseField name="resolution_seconds" type="integer">
  The bucket size used to build the summary.
</ResponseField>

<ResponseField name="data_points" type="integer">
  Number of summary points returned.
</ResponseField>

<ResponseField name="data" type="array">
  Array of time buckets. Each bucket includes close values and OHLC candles:

  <Expandable title="Bucket fields">
    <ResponseField name="timestamp" type="integer">
      Bucket start timestamp in Unix milliseconds.
    </ResponseField>

    <ResponseField name="quote_count" type="integer">
      Number of reconstructed top-of-book observations in this bucket. Forward-filled buckets use `0`.
    </ResponseField>

    <ResponseField name="is_forward_filled" type="boolean">
      `true` when no quote was observed in this bucket and values were carried forward from the previous bucket.
    </ResponseField>

    <ResponseField name="best_bid" type="number">
      Close value for the YES-side best bid in dollars.
    </ResponseField>

    <ResponseField name="best_bid_size" type="number">
      Close size for the best bid.
    </ResponseField>

    <ResponseField name="best_ask" type="number">
      Close value for the implied YES best ask derived from the NO book.
    </ResponseField>

    <ResponseField name="best_ask_size" type="number">
      Close size for the best ask.
    </ResponseField>

    <ResponseField name="mid_price" type="number">
      Close midpoint, computed as `(best_bid + best_ask) / 2` when both sides are present.
    </ResponseField>

    <ResponseField name="spread" type="number">
      Close spread, computed as `best_ask - best_bid` when both sides are present.
    </ResponseField>

    <ResponseField name="best_bid_ohlc" type="object">
      OHLC values for every best-bid quote observed inside the bucket.
    </ResponseField>

    <ResponseField name="best_ask_ohlc" type="object">
      OHLC values for every best-ask quote observed inside the bucket.
    </ResponseField>

    <ResponseField name="mid_price_ohlc" type="object">
      OHLC values for every midpoint observed inside the bucket.
    </ResponseField>

    <ResponseField name="spread_ohlc" type="object">
      OHLC values for every spread observed inside the bucket.
    </ResponseField>
  </Expandable>
</ResponseField>

<Warning>
  Kalshi records from `2026-03-31` through `2026-04-24` can have null price payloads for affected tickers. In that window, summaries can show `quote_count` without populated bid, ask, midpoint, or spread values. See [Data Quality](/data-quality).
</Warning>

## Example

<CodeGroup>
  ```python Python SDK theme={null}
  from entityml import EntityMLClient

  client = EntityMLClient(api_key="YOUR_API_KEY")

  summary = client.kalshi.get_orderbook_summary(
      ticker="KXBTC-26FEB2606-B60125",
      start_timestamp=1772103600000,
      end_timestamp=1772107199999,
      resolution=60,
  )

  print(summary["data_points"])
  ```

  ```bash CLI theme={null}
  export ENTITY_API_KEY="YOUR_API_KEY"

  entityml kalshi orderbook-summary \
    --ticker KXBTC-26FEB2606-B60125 \
    --start-timestamp 1772103600000 \
    --end-timestamp 1772107199999 \
    --resolution 60
  ```

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

### Example response

```json theme={null}
{
  "market_ticker": "KXBTC-26FEB2606-B60125",
  "date": null,
  "start_timestamp": 1772103600000,
  "end_timestamp": 1772107199999,
  "resolution_seconds": 60,
  "data_points": 1,
  "data": [
    {
      "timestamp": 1772103660000,
      "quote_count": 3,
      "is_forward_filled": false,
      "best_bid": 0.58,
      "best_bid_size": 12,
      "best_ask": 0.6,
      "best_ask_size": 14,
      "mid_price": 0.59,
      "spread": 0.02,
      "best_bid_ohlc": { "open": 0.57, "high": 0.58, "low": 0.57, "close": 0.58 },
      "best_ask_ohlc": { "open": 0.61, "high": 0.61, "low": 0.6, "close": 0.6 },
      "mid_price_ohlc": { "open": 0.59, "high": 0.595, "low": 0.585, "close": 0.59 },
      "spread_ohlc": { "open": 0.04, "high": 0.04, "low": 0.02, "close": 0.02 }
    }
  ]
}
```
