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

# Polymarket Single Token Price History API — By Token ID

> Get the historical price series (probabilities from 0.0 to 1.0) for a **single** token, addressed by its Polymarket CLOB token id.

Use this when you already know the token id — a persisted outcome id from your own catalog, or the `Yes` / `No` token returned by `/v1/markets/{id_or_slug}`.

**When to use the market-scoped route instead:** to pull every outcome of a market without knowing any token ids, use `/v1/markets/{id_or_slug}/prices`.

**Pagination limits:**
- Default `limit`: 100 points per page
- Maximum `limit`: 200 points per page
- Use `cursor` from `metadata.next_cursor` to fetch the next page

**Aggregation:** Prices are averaged when aggregating to higher resolutions.

**Format:** JSON only. Covers Polymarket crypto and sports markets from the PolyOrderbooks historical archive.



## OpenAPI

````yaml /openapi.json get /v1/tokens/{token_id}/prices
openapi: 3.1.0
info:
  title: PolyOrderbooks API
  description: >
    # PolyOrderbooks API


    Historical Polymarket **crypto** and **sports** market data — discovery,
    prices, liquidity metrics, and L2 order books. Read paths query our
    historical data store; they never call Polymarket live.


    ## Categories


    `api.polyorderbooks.com` serves **crypto** and **sports** from one API. Pass
    `category=crypto`

    or `category=sports` to pin a request to one archive, or omit it for the
    union of both,

    ordered by `updated_at` across archives.


    ## Base URL


    `https://api.polyorderbooks.com`


    ## Authentication


    All `/v1/*` data routes require an API key.


    Send `X-API-Key: pob_…` or `Authorization: Bearer pob_…`. Dashboard JWT
    session tokens are **not** accepted on data routes.


    ## Plans (hosted)


    | Plan | Req/min | Req/day | Finest resolution | History |

    | --- | --- | --- | --- | --- |

    | Starter | 60 | 1,000 | 250ms | 3 days |

    | Pro | 300 | 50,000 | 250ms | 30 days |


    ## Workflow


    1. `GET /v1/markets` — discover

    2. `GET /v1/markets/{id_or_slug}` — detail

    3. `GET /v1/markets/{id_or_slug}/books` — history
  version: 0.1.0
servers:
  - url: https://api.polyorderbooks.com
    description: Production
security: []
tags:
  - name: Discovery
    description: >-
      Discover series, events, and markets. Use returned ids or slugs in History
      endpoints.
  - name: History
    description: Historical metrics, prices, and L2 order book snapshots.
  - name: Utility
    description: Usage and account metadata.
  - name: Backtest AI
    description: Natural-language and Strategy Builder backtesting over resolved markets.
paths:
  /v1/tokens/{token_id}/prices:
    get:
      tags:
        - History
      summary: Get price history for one token by CLOB token id
      description: >-
        Get the historical price series (probabilities from 0.0 to 1.0) for a
        **single** token, addressed by its Polymarket CLOB token id.


        Use this when you already know the token id — a persisted outcome id
        from your own catalog, or the `Yes` / `No` token returned by
        `/v1/markets/{id_or_slug}`.


        **When to use the market-scoped route instead:** to pull every outcome
        of a market without knowing any token ids, use
        `/v1/markets/{id_or_slug}/prices`.


        **Pagination limits:**

        - Default `limit`: 100 points per page

        - Maximum `limit`: 200 points per page

        - Use `cursor` from `metadata.next_cursor` to fetch the next page


        **Aggregation:** Prices are averaged when aggregating to higher
        resolutions.


        **Format:** JSON only. Covers Polymarket crypto and sports markets from
        the PolyOrderbooks historical archive.
      operationId: get_token_prices_v1_tokens__token_id__prices_get
      parameters:
        - name: token_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
            description: Token ID.
            examples:
              - '12345'
            title: Token Id
          description: Token ID.
        - name: start_ts
          in: query
          required: true
          schema:
            type: string
            description: Inclusive range start. Accepts ISO 8601 timestamp or Unix seconds.
            examples:
              - '2025-09-01T00:00:00Z'
              - '1756684800'
            title: Start Ts
          description: Inclusive range start. Accepts ISO 8601 timestamp or Unix seconds.
        - name: end_ts
          in: query
          required: true
          schema:
            type: string
            description: Exclusive range end. Accepts ISO 8601 timestamp or Unix seconds.
            examples:
              - '2025-09-05T00:00:00Z'
              - '1757030400'
            title: End Ts
          description: Exclusive range end. Accepts ISO 8601 timestamp or Unix seconds.
        - name: resolution
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Resolution'
            description: Aggregation bucket size.
          description: Aggregation bucket size.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: >-
              Maximum number of points to return in this page. Default: 100,
              max: 200.
            examples:
              - 100
            default: 100
            title: Limit
          description: >-
            Maximum number of points to return in this page. Default: 100, max:
            200.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Opaque cursor from a previous response metadata.next_cursor.
            title: Cursor
          description: Opaque cursor from a previous response metadata.next_cursor.
        - name: category
          in: query
          required: false
          schema:
            type: string
            enum:
              - crypto
              - sports
            description: >-
              Restrict results to one category. Omit to search every category
              this deployment holds.
            title: Category
          description: >-
            Restrict results to one category. Omit to search every category this
            deployment holds.
      responses:
        '200':
          description: Historical prices for a single token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricesResponseSingleToken'
        '400':
          description: Invalid timestamp format, limit, or cursor.
          content:
            application/json:
              examples:
                invalid_limit:
                  value:
                    error: bad_request
                    message: 'limit too large. Requested: 201, Maximum: 200'
                invalid_cursor:
                  value:
                    error: bad_request
                    message: Invalid pagination cursor
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: API key is missing, invalid, or expired.
          content:
            application/json:
              example:
                error: unauthorized
                message: Invalid or expired API key.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            Plan does not allow the requested data point, granularity, or date
            range.
          content:
            application/json:
              example:
                error: forbidden
                message: Your plan does not allow historical order books.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Requested resource (market or token) was not found.
          content:
            application/json:
              examples:
                market:
                  value:
                    error: not_found
                    message: 'Market not found: 618831'
                token:
                  value:
                    error: not_found
                    message: 'Token not found: 12345'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error for one or more request parameters.
          content:
            application/json:
              example:
                detail:
                  - loc:
                      - query
                      - resolution
                    msg: >-
                      Unsupported resolution '2m'. Allowed: 250ms, 1s, 60s, 1m,
                      5m, 10m, 15m, 1h, 6h, 1d
                    type: enum
        '429':
          description: Rate limit exceeded for the current API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: rate_limited
                message: Rate limit exceeded. Please try again later.
        '500':
          description: Unexpected server-side error.
          content:
            application/json:
              example:
                error: internal_error
                message: Failed to fetch data.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    Resolution:
      type: string
      enum:
        - 250ms
        - 1s
        - 1m
        - 5m
        - 10m
        - 15m
        - 1h
        - 6h
        - 1d
      title: Resolution
      description: Supported time resolutions for historical endpoints.
    PricesResponseSingleToken:
      properties:
        market_id:
          type: string
          title: Market Id
          description: Canonical market ID.
          examples:
            - '618831'
        token_id:
          type: string
          title: Token Id
          description: Requested token ID.
          examples:
            - '12345'
        token_label:
          type: string
          title: Token Label
          description: Human-readable token label.
          examples:
            - 'Yes'
        resolution:
          type: string
          title: Resolution
          description: Applied resolution.
          examples:
            - 1h
        data:
          items:
            $ref: '#/components/schemas/PriceDataPoint'
          type: array
          title: Data
          description: Chronological time series points for the selected token.
        metadata:
          $ref: '#/components/schemas/HistoryPageMetadata'
          description: Pagination metadata for this history page.
      type: object
      title: PricesResponseSingleToken
      description: Response for `GET /tokens/{token_id}/prices`.
      example:
        data:
          - p: 0.71
            t: '2025-09-05T10:00:00Z'
          - p: 0.73
            t: '2025-09-05T11:00:00Z'
        market_id: '618831'
        metadata:
          count: 2
          limit: 100
        resolution: 1h
        token_id: '12345'
        token_label: 'Yes'
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: Stable machine-readable code. Branch on this, not on `message`.
          examples:
            - bad_request
            - unauthorized
            - forbidden
            - not_found
            - rate_limited
        message:
          type: string
          title: Message
          description: Human-readable explanation, usually naming the offending value.
          examples:
            - >-
              Unsupported resolution '30s'. Allowed: 250ms, 1s, 60s, 1m, 5m,
              10m, 15m, 1h, 6h, 1d
      required:
        - error
        - message
      type: object
      title: ErrorResponse
      description: Error envelope returned for every 4xx and 5xx response.
    PriceDataPoint:
      properties:
        t:
          type: string
          format: date-time
          title: T
          description: Bucket timestamp in ISO 8601 format.
          examples:
            - '2025-09-05T12:00:00Z'
        p:
          type: number
          title: P
          description: Token price/probability between 0.0 and 1.0.
          examples:
            - 0.73
      type: object
      title: PriceDataPoint
      description: Single token price data point.
    HistoryPageMetadata:
      properties:
        count:
          type: integer
          title: Count
          description: Number of points returned in this page.
        limit:
          type: integer
          title: Limit
          description: Effective page limit used for this response.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Opaque cursor for the next page. Null when the page is complete.
      type: object
      title: HistoryPageMetadata
      description: Pagination metadata for history responses.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.