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

# Authenticated liveness check

> Lightweight liveness check for authenticated clients.

This endpoint is intentionally cheap and does not probe backend dependencies.



## OpenAPI

````yaml https://api.polymarketdata.co/openapi.json get /v1/health
openapi: 3.1.0
info:
  title: PolymarketData API
  description: >-
    Historical Polymarket market data with plan-based access controls
    (resolution, lookback window, and RPM).


    Use this API to discover markets, then query historical metrics, prices, and
    order books.


    ## Authentication


    All `/v1` endpoints require an API key.


    1. Sign in to the PolymarketData dashboard.
    [https://app.polymarketdata.co/](https://app.polymarketdata.co/dashboard)

    2. Create an API key.

    3. Send the key in the `X-API-Key` header on every request.


    Header format:


    `X-API-Key: pk_live_your_key_here`


    ## Key Concepts


    Polymarket data is organized in a hierarchy:


    - **Series**: Broad themes or recurring categories (for example, `US
    Politics` or `NBA`).

    - **Events**: Specific real-world happenings within a series (for example,
    `Presidential Debate`).

    - **Markets**: Tradable prediction questions inside an event (for example,
    `Will candidate X win?`).

    - **Tokens**: Outcome contracts within a market (for example, `Yes` and
    `No`).


    Mental model: `Series -> Events -> Markets -> Tokens`.


    ## Typical Workflow


    1. Discover objects with `GET /v1/series`, `GET /v1/events`, and `GET
    /v1/markets`.

    2. Select a market ID or slug from discovery responses.

    3. Query historical data via `/v1/markets/{id_or_slug}/metrics`, `/prices`,
    or `/books`.
  version: 0.1.1
servers:
  - url: https://api.polymarketdata.co
    description: Production
security: []
tags:
  - name: Clients & SDKs
    description: >-
      Official client libraries and SDK guidance.


      ### Python SDK


      - Package:
      [`polymarketdata-sdk`](https://pypi.org/project/polymarketdata-sdk/)

      - Install: `pip install polymarketdata-sdk`

      - Optional dataframe extras: `pip install "polymarketdata-sdk[dataframe]"`

      - API key can be passed directly or via `POLYMARKETDATA_API_KEY`


      ### SDK Surface Map


      | Namespace | What it covers | Core methods |

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

      | `client.utility` | API health and plan/rate status | `health()`,
      `usage()` |

      | `client.discovery` | entity discovery and lookup | `list_series()`,
      `list_events()`, `list_markets()`, `get_market()`, `list_tags()` |

      | `client.discovery` iterators | auto-pagination for discovery |
      `iter_series()`, `iter_events()`, `iter_markets()` |

      | `client.history` | historical market/token data |
      `get_market_metrics()`, `get_market_prices()`, `get_token_prices()`,
      `get_market_books()`, `get_token_books()` |

      | `client.history` iterators | auto-pagination for history |
      `iter_market_metrics()`, `iter_token_prices()`, `iter_token_books()` |


      ### 60-Second Quickstart


      ```python

      from polymarketdata import PolymarketDataClient


      # api_key can also be set via POLYMARKETDATA_API_KEY

      with PolymarketDataClient(api_key="YOUR_API_KEY") as client:
          health = client.utility.health()
          usage = client.utility.usage()
          print(health.status)
          print(usage.plan)
          print(usage.limits.requests_remaining)
      ```


      ### End-to-End Example (Discovery -> History)


      ```python

      from polymarketdata import PolymarketDataClient, Resolution


      with PolymarketDataClient(api_key="YOUR_API_KEY") as client:
          markets = client.discovery.list_markets(
              event_slug="us-presidential-election-2025",
              limit=5,
          )
          market_id_or_slug = markets.data[0].slug or markets.data[0].id

          metrics = client.history.get_market_metrics(
              market_id_or_slug,
              start_ts="2025-09-01T00:00:00Z",
              end_ts="2025-11-05T00:00:00Z",
              resolution=Resolution.ONE_DAY,
          )
          print(metrics.market_id, len(metrics.data))
      ```


      ### Supported Resolutions


      These match the API `resolution` enum:


      - `Resolution.ONE_MIN` (`1m`)

      - `Resolution.TEN_MIN` (`10m`)

      - `Resolution.ONE_HOUR` (`1h`)

      - `Resolution.SIX_HOUR` (`6h`)

      - `Resolution.ONE_DAY` (`1d`)


      ### DataFrame Helpers


      If installed with `polymarketdata-sdk[dataframe]`, use:

      - `to_dataframe_metrics(...)`

      - `to_dataframe_prices(...)`

      - `to_dataframe_books(...)`


      ### Errors and Retry Behavior


      All SDK exceptions inherit from `PolymarketDataError`.


      Common exception types:

      - `AuthenticationError` (401)

      - `PermissionDeniedError` (403)

      - `NotFoundError` (404)

      - `RateLimitError` (429)

      - `ServerError` (5xx)

      - `NetworkError` / `RequestTimeoutError`


      The SDK retries `429` and `5xx` responses with exponential backoff +
      jitter.

      Tune with `max_retries`, `retry_backoff_base`, `retry_backoff_max`, and
      `timeout`.


      ### Response Metadata


      Responses include:

      - `.meta` (HTTP metadata such as `status_code`, `request_id`)

      - `.raw` (unmodified response payload)
    externalDocs:
      description: Python SDK package
      url: https://pypi.org/project/polymarketdata-sdk/
  - name: Discovery
    description: >-
      Start here. Discover series, events, and markets, then use the returned
      market IDs/slugs in History endpoints.
  - name: History
    description: >-
      Retrieve historical metrics, prices, and order book snapshots for a
      specific market.
  - name: Utility
    description: Health, status, and usage endpoints.
paths:
  /v1/health:
    get:
      tags:
        - Utility
      summary: Authenticated liveness check
      description: >-
        Lightweight liveness check for authenticated clients.


        This endpoint is intentionally cheap and does not probe backend
        dependencies.
      operationId: health_check_v1_health_get
      responses:
        '200':
          description: Liveness status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LivenessResponse'
              example:
                status: healthy
                timestamp: '2025-09-15T12:00:00Z'
        '401':
          description: API key is missing, invalid, or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missing:
                  value:
                    detail: API key is required. Include 'X-API-Key' header.
                invalid:
                  value:
                    detail: Invalid or expired API key.
        '429':
          description: Rate limit exceeded for the current API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: Rate limit exceeded. Please try again later.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    LivenessResponse:
      properties:
        status:
          type: string
          title: Status
          description: Liveness status. `healthy` means the API process is responsive.
        timestamp:
          type: string
          title: Timestamp
          description: Timestamp when the liveness response was generated (ISO 8601).
      type: object
      required:
        - status
        - timestamp
      title: LivenessResponse
      description: Response body for authenticated `GET /health`.
      example:
        status: healthy
        timestamp: '2025-09-15T12:00:00.123456+00:00'
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Human-readable error description.
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Generic API error response.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: >-
        Create an API key in the PolymarketData dashboard and send it in the
        `X-API-Key` request header.


        Example: `X-API-Key: pk_live_your_key_here`
      in: header
      name: X-API-Key

````