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

# Get Market Timeseries

> Paginated mid-price time series. Matches PolyBackTest's timeseries
schema: each point has id, time, {ticker}_price, price_up, price_down.



## OpenAPI

````yaml get /v1/markets/{market_id}/timeseries
openapi: 3.1.0
info:
  title: PolyQuantLab API
  version: 0.1.0
  description: >-
    Sub-second Polymarket orderbook data, walk-the-book backtests, paper
    trading, and the live arb audit. Same endpoints the PolyQuantLab dashboard
    uses internally — Bearer-token auth, JSON-over-HTTPS, predictable
    pagination.
  contact:
    email: contact@polyquantlab.com
    url: https://polyquantlab.com/contact
  license:
    name: Proprietary
servers:
  - url: https://api.polyquantlab.com
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /v1/markets/{market_id}/timeseries:
    get:
      summary: Get Market Timeseries
      description: |-
        Paginated mid-price time series. Matches PolyBackTest's timeseries
        schema: each point has id, time, {ticker}_price, price_up, price_down.
      operationId: get_market_timeseries_v1_markets__market_id__timeseries_get
      parameters:
        - name: market_id
          in: path
          required: true
          schema:
            type: string
            title: Market Id
        - name: start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Start
        - name: end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: End
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 10000
            default: 100
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetMarketTimeseriesVMarketsMarketIdTimeseriesGetResponse
              example:
                market:
                  market_id: 0x4a8f31...c2
                  market_type: 5m
                snapshots:
                  - ts: '2026-06-06T03:55:30+00:00'
                    mid_yes: 0.512
                    spread_yes: 0.02
                    underlying_price: 109520.5
                  - ts: '2026-06-06T03:56:00+00:00'
                    mid_yes: 0.604
                    spread_yes: 0.018
                    underlying_price: 109612
                total: 287
                limit: 100
                offset: 0
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GetMarketTimeseriesVMarketsMarketIdTimeseriesGetResponse:
      type: object
      properties:
        market:
          type: object
          properties:
            market_id:
              type: string
              description: Polymarket market identifier (hex 0x…).
            market_type:
              type: string
              enum:
                - 5m
                - 15m
                - 1h
                - 4h
                - 24h
          required:
            - market_id
            - market_type
        snapshots:
          type: array
          items:
            type: object
            properties:
              ts:
                type: string
                format: date-time
              mid_yes:
                type: number
                format: double
              spread_yes:
                type: number
                format: double
              underlying_price:
                type: number
                format: double
                description: Current spot price of the underlying coin at this snapshot.
            required:
              - ts
              - mid_yes
              - spread_yes
              - underlying_price
        total:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
      required:
        - market
        - snapshots
        - total
        - limit
        - offset
    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
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````