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

# Price History

> Get historical price data for a market.

Parameters:
- market_id: The market ID
- hours: Number of hours of history (max 168 = 1 week, default 24)
- interval: Minutes between data points (default 15, min 5)

Returns downsampled price data from external_price_history table.

Requires API key in Authorization header.



## OpenAPI

````yaml /openapi.json get /api/sdk/markets/{market_id}/history
openapi: 3.1.0
info:
  title: Simmer API
  description: Agent-native trading infrastructure for prediction markets.
  version: 1.0.0
servers:
  - url: https://api.simmer.markets
security: []
paths:
  /api/sdk/markets/{market_id}/history:
    get:
      summary: Price History
      description: |-
        Get historical price data for a market.

        Parameters:
        - market_id: The market ID
        - hours: Number of hours of history (max 168 = 1 week, default 24)
        - interval: Minutes between data points (default 15, min 5)

        Returns downsampled price data from external_price_history table.

        Requires API key in Authorization header.
      operationId: api_sdk_price_history_api_sdk_markets__market_id__history_get
      parameters:
        - name: market_id
          in: path
          required: true
          schema:
            type: string
            title: Market Id
        - name: hours
          in: query
          required: false
          schema:
            type: integer
            default: 24
            title: Hours
        - name: interval
          in: query
          required: false
          schema:
            type: integer
            default: 15
            title: Interval
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SDKPriceHistoryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SDKPriceHistoryResponse:
      properties:
        market_id:
          type: string
          title: Market Id
        points:
          items:
            $ref: '#/components/schemas/SDKPricePoint'
          type: array
          title: Points
        interval_minutes:
          type: integer
          title: Interval Minutes
      type: object
      required:
        - market_id
        - points
        - interval_minutes
      title: SDKPriceHistoryResponse
      description: Historical price data for a market.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SDKPricePoint:
      properties:
        timestamp:
          type: string
          title: Timestamp
        price_yes:
          type: number
          title: Price Yes
        price_no:
          type: number
          title: Price No
      type: object
      required:
        - timestamp
        - price_yes
        - price_no
      title: SDKPricePoint
      description: A single price point in history.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````