Skip to content

Quickstart

Get up and running with the PolyNode API in three steps.

Terminal window
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."
}

Fetch the top 5 markets by 24h volume:

Terminal window
curl -s https://polynode.dev/v1/markets?count=5 \
-H "x-api-key: pn_live_YOUR_KEY" | jq

Response:

{
"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"
}
]
}

Connect via WebSocket to receive real-time decoded settlements:

Terminal window
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.

Pass your key via header (recommended) or query parameter:

Terminal window
# Header (recommended)
curl -H "x-api-key: pn_live_YOUR_KEY" https://polynode.dev/v1/markets
# Query parameter
curl https://polynode.dev/v1/markets?key=pn_live_YOUR_KEY