> ## 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.

# Quickstart

> Authenticate, find a market, and pull one week of minute prices.

This walkthrough gets you from an API key to a joined price and metrics series for one market.

## Prerequisites

* A PolymarketData API key from the [dashboard](https://app.polymarketdata.co/register)
* Python 3.10+ (for the examples below)

<Tabs>
  <Tab title="Python SDK">
    <Steps>
      <Step title="Install the SDK">
        ```bash theme={null}
        pip install polymarketdata-sdk
        ```

        Optional dataframe helpers:

        ```bash theme={null}
        pip install "polymarketdata-sdk[dataframe]"
        ```
      </Step>

      <Step title="Set your API key">
        Export the key, or pass it directly to the client.

        ```bash theme={null}
        export POLYMARKETDATA_API_KEY="pk_live_your_key_here"
        ```
      </Step>

      <Step title="Check health and plan limits">
        ```python theme={null}
        from polymarketdata import PolymarketDataClient

        with PolymarketDataClient() as client:
            health = client.utility.health()
            usage = client.utility.usage()
            print(health.status)
            print(usage.plan)
            print(usage.limits.requests_remaining)
        ```
      </Step>

      <Step title="Discover a market and pull prices">
        ```python theme={null}
        from polymarketdata import PolymarketDataClient, Resolution

        with PolymarketDataClient() as client:
            markets = client.discovery.list_markets(search="bitcoin", limit=5)
            market = markets.data[0]
            market_id = market.slug or market.id

            prices = client.history.get_market_prices(
                market_id,
                start_ts="2026-01-01T00:00:00Z",
                end_ts="2026-01-08T00:00:00Z",
                resolution=Resolution.ONE_MIN,
            )
            print(market_id, len(prices.data))
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="REST">
    <Steps>
      <Step title="Confirm the API is up">
        ```bash theme={null}
        curl "https://api.polymarketdata.co/v1/health" \
          -H "X-API-Key: pk_live_your_key_here"
        ```
      </Step>

      <Step title="Find a market">
        ```python theme={null}
        import os
        import requests

        API_KEY = os.environ["POLYMARKETDATA_API_KEY"]
        BASE = "https://api.polymarketdata.co/v1"
        headers = {"X-API-Key": API_KEY}

        markets = requests.get(
            f"{BASE}/markets",
            headers=headers,
            params={"search": "bitcoin", "limit": 5},
            timeout=30,
        )
        markets.raise_for_status()
        slug = markets.json()["data"][0]["slug"]
        print(slug)
        ```
      </Step>

      <Step title="Pull one week of minute prices">
        ```python theme={null}
        prices = requests.get(
            f"{BASE}/markets/{slug}/prices",
            headers=headers,
            params={
                "start_ts": "2026-01-01T00:00:00Z",
                "end_ts": "2026-01-08T00:00:00Z",
                "resolution": "1m",
            },
            timeout=30,
        )
        prices.raise_for_status()
        rows = prices.json()["data"]
        print(len(rows))
        ```
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Next steps

<Columns cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Header format, key storage, and 401 responses.
  </Card>

  <Card title="Data model" icon="git-branch" href="/guides/concepts">
    Series, events, markets, and tokens.
  </Card>

  <Card title="Pagination" icon="list" href="/guides/pagination">
    Cursor pages for discovery and history.
  </Card>

  <Card title="Python SDK" icon="code" href="/sdks/python">
    Namespaces, iterators, retries, and dataframes.
  </Card>
</Columns>

<Tip>
  Print row counts and the timestamp range before you model anything. A thin series usually means the market was inactive in that window — pick another market rather than debugging your join.
</Tip>
