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

# Quickstart

> Sign up, create a key, fetch your first market — in under a minute.

Everything here works against the public API. If you prefer to paste into a terminal as you read, have `$DP_API_KEY` in your shell before you start.

<Steps>
  <Step title="Register">
    ```bash theme={null}
    curl -X POST https://api.dotprediction.io/v1/api/auth/register \
      -H "Content-Type: application/json" \
      -d '{"name": "Your Name", "email": "you@example.com", "password": "correct-horse-battery-staple"}'
    ```

    The response sets a JWT cookie so the next call is already authenticated. Prefer the dashboard? Sign up at [dotprediction.com](https://dotprediction.com) instead.
  </Step>

  <Step title="Create a key">
    ```bash theme={null}
    curl -X POST https://api.dotprediction.io/v1/api/auth/api-keys \
      -H "Content-Type: application/json" \
      -b "jwt=YOUR_SESSION_COOKIE" \
      -d '{"name": "my-first-key"}'
    ```

    The `key` in the response is shown **once** — save it. Every request below sends it as `X-API-Key`.
  </Step>

  <Step title="Fetch markets">
    <CodeGroup>
      ```bash curl theme={null}
      curl https://api.dotprediction.io/v1/api/markets?provider=polymarket&limit=5 \
        -H "X-API-Key: $DP_API_KEY"
      ```

      ```python Python theme={null}
      import os, requests

      r = requests.get(
          "https://api.dotprediction.io/v1/api/markets",
          params={"provider": "polymarket", "limit": 5},
          headers={"X-API-Key": os.environ["DP_API_KEY"]},
      )
      r.raise_for_status()
      for m in r.json()["data"]:
          print(m["title"], "→", m["yes_price"])
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch(
        "https://api.dotprediction.io/v1/api/markets?provider=polymarket&limit=5",
        { headers: { "X-API-Key": process.env.DP_API_KEY } },
      );
      const { data } = await res.json();
      console.table(data.map(m => ({ title: m.title, yes: m.yes_price })));
      ```
    </CodeGroup>
  </Step>

  <Step title="Watch an orderbook">
    ```bash theme={null}
    curl "https://api.dotprediction.io/v1/api/markets/KXCLIMATE-26/orderbook?provider=kalshi" \
      -H "X-API-Key: $DP_API_KEY"
    ```

    Normalized bid/ask depth with canonical float prices — same shape on every venue.
  </Step>
</Steps>

## What's next

* [Authentication](/guides/authentication) — JWT vs API keys, and when to use each.
* [Platforms](/guides/platforms) — how Kalshi and Polymarket map onto our unified schema.
* [Pagination](/guides/pagination) — cursor-based, bypassing the cache when you want fresh data.

Questions or something missing? Email [support@dotprediction.com](mailto:support@dotprediction.com) or open an issue on [GitHub](https://github.com/dotlabsco/dot-prediction-api).
