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

# Orderbook History

> Fetch historical orderbook snapshots for a Kalshi market

Fetch historical orderbook snapshots for a Kalshi market. Data starts from **January 7th, 2026**.

<Tip>**Free & Unlimited.** This endpoint does not count toward your monthly usage limits on any plan.</Tip>

| Constraint | Value               |
| ---------- | ------------------- |
| `limit`    | 1–200 (default 100) |

<Warning>Timestamps are in **milliseconds**. Prices are in **cents** (1–99).</Warning>


## OpenAPI

````yaml GET /v2/kalshi/orderbooks
openapi: 3.1.0
info:
  title: Predexon API
  description: Prediction market data aggregation and matching API
  version: 2.0.0
servers:
  - url: https://api.predexon.com
security:
  - apiKey: []
paths:
  /v2/kalshi/orderbooks:
    get:
      tags:
        - kalshi
      summary: Get Kalshi Orderbooks
      description: >-
        Fetch historical orderbook snapshots for a Kalshi market over a
        specified time range.


        Returns snapshots of the order book including yes bids, yes asks, and
        market metadata.

        All timestamps are in milliseconds. Prices are in cents (1-99
        representing $0.01 to $0.99).
      operationId: get_kalshi_orderbooks_v2_kalshi_orderbooks_get
      parameters:
        - name: ticker
          in: query
          required: true
          schema:
            type: string
            description: The Kalshi market ticker
            title: Ticker
          description: The Kalshi market ticker
        - name: start_time
          in: query
          required: true
          schema:
            type: integer
            description: Start time in Unix timestamp (milliseconds)
            title: Start Time
          description: Start time in Unix timestamp (milliseconds)
        - name: end_time
          in: query
          required: true
          schema:
            type: integer
            description: End time in Unix timestamp (milliseconds)
            title: End Time
          description: End time in Unix timestamp (milliseconds)
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            description: Maximum number of snapshots to return
            default: 100
            title: Limit
          description: Maximum number of snapshots to return
        - name: pagination_key
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Pagination key to get the next chunk of data
            title: Pagination Key
          description: Pagination key to get the next chunk of data
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KalshiOrderbooksResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    KalshiOrderbooksResponse:
      properties:
        snapshots:
          items:
            $ref: '#/components/schemas/KalshiOrderbookSnapshot'
          type: array
          title: Snapshots
        pagination:
          $ref: '#/components/schemas/CursorPagination'
      type: object
      required:
        - snapshots
        - pagination
      title: KalshiOrderbooksResponse
      description: Kalshi orderbooks endpoint response.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KalshiOrderbookSnapshot:
      properties:
        ticker:
          type: string
          title: Ticker
          description: Market ticker
        timestamp:
          type: integer
          title: Timestamp
          description: Snapshot timestamp in milliseconds
        yes_bids:
          items:
            $ref: '#/components/schemas/KalshiOrderbookLevel'
          type: array
          title: Yes Bids
          description: Yes bid levels, ordered by price descending
        yes_asks:
          items:
            $ref: '#/components/schemas/KalshiOrderbookLevel'
          type: array
          title: Yes Asks
          description: Yes ask levels, ordered by price ascending
        best_bid:
          type: integer
          title: Best Bid
          description: Best bid price in cents
        best_ask:
          type: integer
          title: Best Ask
          description: Best ask price in cents
        bid_depth:
          type: integer
          title: Bid Depth
          description: Total bid depth (number of contracts)
        ask_depth:
          type: integer
          title: Ask Depth
          description: Total ask depth (number of contracts)
        sequence:
          type: integer
          title: Sequence
          description: Sequence number for ordering within same timestamp
      type: object
      required:
        - ticker
        - timestamp
        - yes_bids
        - yes_asks
        - best_bid
        - best_ask
        - bid_depth
        - ask_depth
        - sequence
      title: KalshiOrderbookSnapshot
      description: Single Kalshi orderbook snapshot.
    CursorPagination:
      properties:
        limit:
          type: integer
          title: Limit
          description: Requested limit
        count:
          type: integer
          title: Count
          description: Number of items in current response
        pagination_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Pagination Key
          description: Base64-encoded cursor for next page
        has_more:
          type: boolean
          title: Has More
          description: Whether there are more items available
      type: object
      required:
        - limit
        - count
        - has_more
      title: CursorPagination
      description: Cursor-based pagination for endpoints that don't support offset.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    KalshiOrderbookLevel:
      properties:
        price:
          type: integer
          title: Price
          description: Price in cents (1-99)
        size:
          type: integer
          title: Size
          description: Number of contracts at this price level
      type: object
      required:
        - price
        - size
      title: KalshiOrderbookLevel
      description: Single price level in Kalshi orderbook.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````