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

# Market History

> Get historical price and volume data for backtesting.



## OpenAPI

````yaml GET /v1/markets/{platform}/{market_id}/history
openapi: 3.1.0
info:
  title: Rekko AI — Prediction Market Intelligence
  description: >-
    The brain for prediction market trading. Deep AI research, Bayesian causal
    decomposition, portfolio-aware strategy signals, cross-platform arbitrage,
    and execution guidance — all in one API. Covers Kalshi, Polymarket,
    Robinhood, and Coinbase. Clean flat JSON designed for developers and
    autonomous trading agents.
  contact:
    name: Rekko AI
    url: https://rekko.ai/
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.rekko.ai
security: []
tags:
  - name: Markets
    description: Prediction market listings, history, resolution, and execution guidance
  - name: Insights
    description: AI-powered research insights with causal decomposition
  - name: Strategy
    description: >-
      Actionable trading signals with Kelly-derived position sizing and causal
      decomposition
  - name: Portfolio
    description: Portfolio-aware strategy, correlation analysis, and hedge recommendations
  - name: Arbitrage
    description: Cross-platform arbitrage detection (Kalshi vs Polymarket vs Robinhood)
  - name: Analytics
    description: Calibration metrics, sentiment, and performance tracking
  - name: Streaming
    description: Real-time SSE event stream and webhooks
  - name: Consensus
    description: Agent trade aggregation and crowd probability
paths:
  /v1/markets/{platform}/{market_id}/history:
    get:
      tags:
        - Markets
      summary: Get market price history
      description: Get historical price and volume data for backtesting.
      operationId: /v1/markets/{platform}/{market_id}/history
      parameters:
        - name: platform
          in: path
          required: true
          schema:
            type: string
            examples:
              - kalshi
            title: Platform
        - name: market_id
          in: path
          required: true
          schema:
            type: string
            examples:
              - KXAGICO-COMP-28Q1
            title: Market Id
        - name: period
          in: query
          required: false
          schema:
            type: string
            description: 'Time period: ''48h'', ''7d'', or ''30d'''
            default: 7d
            title: Period
          description: 'Time period: ''48h'', ''7d'', or ''30d'''
        - name: max_points
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 10
            description: Maximum data points to return
            default: 48
            title: Max Points
          description: Maximum data points to return
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response /V1/Markets/{Platform}/{Market Id}/History
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````