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

# Quickstart

> Generate an API key and make your first request in 30 seconds.

> [!NOTE]
>
> **Polymarket Protocol V2.** Polymarket is moving newly created markets to Polymarket Protocol V2 from around November 2, 2026 (tentative, per Polymarket; test markets since October 5, 2026). REST and WebSocket integrations need no changes. If you trade with our SDK, upgrade to `polynode-sdk` 0.15.0 (TypeScript), `polynode` 0.18.0 (Rust) or `polynode` 0.15.0 (Python). This is separate from Polymarket's April 2026 exchange upgrade ([V2 Migration](https://docs.polynode.dev/guides/v2-migration.md)). See [Polymarket Protocol V2 markets](https://docs.polynode.dev/guides/polymarket-protocol-v2.md).

## 1. Generate an API key

```bash cURL theme={null}
curl -s -X POST https://api.polynode.dev/v1/keys \
  -H "Content-Type: application/json" \
  -d '{"name": "my-bot"}'
```

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

resp = requests.post("https://api.polynode.dev/v1/keys", json={"name": "my-bot"})
key = resp.json()["api_key"]
print(key)  # pn_live_a1b2c3d4e5f6...
```

```typescript TypeScript theme={null}
const resp = await fetch("https://api.polynode.dev/v1/keys", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ name: "my-bot" }),
});
const { api_key } = await resp.json();
```

```json Response theme={null}
{
  "api_key": "pn_live_a1b2c3d4e5f6...",
  "name": "my-bot",
  "rate_limit_per_minute": 120,
  "message": "Store this key securely — it cannot be retrieved again."
}
```

> [!WARNING]
>
> Save the `api_key` immediately. It cannot be retrieved after creation.

## 2. Make your first request

Fetch the top 5 markets by 24h volume:

```bash cURL theme={null}
curl -s "https://api.polynode.dev/v1/markets?count=5" \
  -H "x-api-key: pn_live_YOUR_KEY" | jq
```

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

resp = requests.get(
    "https://api.polynode.dev/v1/markets",
    params={"count": 5},
    headers={"x-api-key": "pn_live_YOUR_KEY"},
)
print(resp.json())
```

```typescript TypeScript theme={null}
const resp = await fetch("https://api.polynode.dev/v1/markets?count=5", {
  headers: { "x-api-key": "pn_live_YOUR_KEY" },
});
const data = await resp.json();
```

```json Response theme={null}
{
  "count": 5,
  "total": 69482,
  "markets": [
    {
      "token_id": "247024838963513327646981976118812247380",
      "question": "Will Bitcoin reach $100k?",
      "last_price": 0.72,
      "volume_24h": 48293.50,
      "trade_count_24h": 677,
      "last_trade_at": 1772512467000,
      "slug": "bitcoin-100k",
      "outcomes": ["Yes", "No"]
    }
  ]
}
```

## 3. Stream live settlements

Connect via WebSocket to receive real-time settlements:

```javascript theme={null}
const ws = new WebSocket("wss://ws.polynode.dev/ws?key=pn_live_YOUR_KEY");

ws.onopen = () => {
  ws.send(JSON.stringify({
    action: "subscribe",
    type: "settlements",
  }));
};

ws.onmessage = (event) => {
  const msg = JSON.parse(event.data);
  if (msg.type === "settlement") {
    console.log(`${msg.data.taker_side} $${msg.data.taker_size} @ ${msg.data.taker_price}`);
  }
};
```

You'll receive a snapshot of recent events, then live updates as new settlements are detected.

## Next steps

> [card] [Authentication](https://docs.polynode.dev/authentication.md)
>
> API key management and auth methods

> [card] [WebSocket](https://docs.polynode.dev/guides/websocket)
>
> Real-time streaming with filtered subscriptions

> [card] [API Reference](https://docs.polynode.dev/api-reference)
>
> Full endpoint reference with playground

> [card] [Rate Limits](https://docs.polynode.dev/guides/rate-limits.md)
>
> Usage limits and best practices


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