1. Generate an API key
curl -s -X POST https://api.polynode.dev/v1/keys \
-H "Content-Type: application/json" \
-d '{"name": "my-bot"}'
{
"api_key": "pn_live_a1b2c3d4e5f6...",
"name": "my-bot",
"rate_limit_per_minute": 120,
"message": "Store this key securely — it cannot be retrieved again."
}
Save the api_key immediately. It cannot be retrieved after creation.
2. Make your first request
Fetch the top 5 markets by 24h volume:
curl -s "https://api.polynode.dev/v1/markets?count=5" \
-H "x-api-key: pn_live_YOUR_KEY" | jq
{
"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:
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
Authentication
API key management and auth methods
WebSocket
Real-time streaming with filtered subscriptions
API Reference
Full endpoint reference with playground
Rate Limits
Usage limits and best practices