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

# Quick start

> Make your first PolyEdge API call in under 5 minutes.

<Steps>
  <Step title="Get an API key">
    Visit [polyedge.dev](https://polyedge.dev) to create an account and generate your API key.

    You'll use this key in the `X-PolyEdge-Key` header on every request.
  </Step>

  <Step title="Fetch the leaderboard">
    Call the leaderboard endpoint to retrieve the top Polymarket traders ranked by PNL over the last 30 days.

    ```bash theme={null}
    curl https://api.polyedge.dev/v1/analytics/leaderboard \
      -H "X-PolyEdge-Key: YOUR_API_KEY"
    ```

    A successful response looks like this:

    ```json theme={null}
    {
      "traders": [
        {
          "profile": {
            "address": "0x96cfcb0c30942cfcd1cdf76c7d408794d66b1acb",
            "name": "mintblade",
            "profile_image": "",
            "x_username": "",
            "profile_created_at": "2026-06-02T14:47:45.193735Z",
            "last_trade_at": "2026-06-16T01:04:03Z"
          },
          "total_pnl": "9109604596452",
          "total_volume": "8522915083091",
          "roi": 106.88,
          "win_rate": 100,
          "rank": 1,
          "markets_count": 4,
          "wins_count": 4
        }
      ],
      "total_count": 229094
    }
    ```

    <Note>
      Demo keys return a maximum of 20 results and do not support pagination (`offset` must be `0`). See [Authentication](/authentication) for tier details.
    </Note>
  </Step>

  <Step title="Use the SDK">
    Install the SDK for your language and make the same call with a few lines of code.

    <CodeGroup>
      ```bash Node.js install theme={null}
      npm install eventsource-client
      ```

      ```bash Python install theme={null}
      pip install requests urllib3
      ```
    </CodeGroup>

    Copy `polyedge.js` and `parser_compact_tx.js` (Node.js) or `polyedge.py`, `parser_compact_tx.py`, and `sseclient.py` (Python) from the [SDK examples](https://github.com/polyedge-dev/polyedge-api/tree/main/examples) into your project, then call the leaderboard:

    <CodeGroup>
      ```javascript Node.js theme={null}
      import PolyEdgeClient from './polyedge.js';

      const client = new PolyEdgeClient('YOUR_API_KEY');

      const leaderboard = await client.getLeaderboard({ limit: 10, time_frame: '7D' });
      console.log(leaderboard.traders);
      ```

      ```python Python theme={null}
      from polyedge import PolyEdgeClient

      client = PolyEdgeClient('YOUR_API_KEY')

      leaderboard = client.get_leaderboard({'limit': 10, 'time_frame': '7D'})
      print(leaderboard['traders'])
      ```
    </CodeGroup>
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Understand access tiers and how to handle auth errors.
  </Card>

  <Card title="Leaderboard guide" icon="chart-line" href="/guides/leaderboard">
    Filter and sort the leaderboard to find the traders you care about.
  </Card>

  <Card title="Real-time stream" icon="bolt" href="/guides/real-time-stream">
    Subscribe to live Polymarket order flow via SSE.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/leaderboard">
    Full parameter and response field documentation for every endpoint.
  </Card>
</CardGroup>
