Quickstart
Quickstart
Section titled “Quickstart”Get up and running with the PolyNode API in three steps.
1. Generate an API Key
Section titled “1. Generate an API Key”curl -s -X POST https://polynode.dev/v1/keys \ -H "Content-Type: application/json" \ -d '{"name": "my-bot"}'Response:
{ "api_key": "pn_live_a1b2c3d4e5f6...", "name": "my-bot", "rate_limit_per_minute": 120, "message": "Store this key securely — it cannot be retrieved again."}2. Make Your First Request
Section titled “2. Make Your First Request”Fetch the top 5 markets by 24h volume:
curl -s https://polynode.dev/v1/markets?count=5 \ -H "x-api-key: pn_live_YOUR_KEY" | jqResponse:
{ "count": 5, "total": 69482, "markets": [ { "token_id": "21742633...", "question": "Will Bitcoin hit $100K in 2026?", "last_price": 0.72, "volume_24h": 48293.50, "slug": "bitcoin-100k-2026", "outcomes": ["Yes", "No"], "category": "Crypto" } ]}3. Stream Live Settlements
Section titled “3. Stream Live Settlements”Connect via WebSocket to receive real-time decoded settlements:
wscat -c "wss://polynode.dev/ws?key=pn_live_YOUR_KEY"Send a subscribe message:
{"action": "subscribe", "type": "settlements"}You’ll receive a snapshot of recent events, then live updates as settlements are detected in the mempool.
Using the API Key
Section titled “Using the API Key”Pass your key via header (recommended) or query parameter:
# Header (recommended)curl -H "x-api-key: pn_live_YOUR_KEY" https://polynode.dev/v1/markets
# Query parametercurl https://polynode.dev/v1/markets?key=pn_live_YOUR_KEYNext Steps
Section titled “Next Steps”- Authentication — Rate limits and key management
- Markets endpoint — Full parameter reference
- WebSocket — Subscription types and filters