Skip to main content

Documentation Index

Fetch the complete documentation index at: https://polynode.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

PolyNode provides official SDKs for TypeScript, Rust, and Python. All wrap the full REST API and WebSocket streaming interface with typed responses, auto-reconnection, and zlib compression support.

TypeScript / Node.js

npm install polynode-sdkZero runtime dependencies. ESM + CJS. Node 18+.

Rust

polynode = "0.12"Async with tokio. Typed events via serde.

Python

pip install polynodeSync + async. Pydantic v2 types. Python 3.10+.

Charts (Browser)

npm install polynode-chartsZero-dependency Canvas 2D charting for prediction markets and live crypto prices. Browser only.
polynode-sdk is the data SDK (REST, WebSocket, trading, cache). It runs in Node.js.polynode-charts is the visualization SDK (candlestick charts, orderbooks, live streaming UI). It runs in the browser.Building a frontend? Install both: npm install polynode-sdk polynode-charts

Features

Local Cache

SQLite-backed local storage. Backfill wallet history in seconds, query trades and positions instantly with zero API calls.

Short-Form Markets

Auto-rotating streams for 5m, 15m, and 1h crypto prediction markets. Includes price-to-beat, odds, and liquidity.

WebSocket Streaming

Builder-pattern subscriptions with 10 presets, 11 filter dimensions, and transparent compression.

Orderbook

Real-time orderbook data with local state management, filtered views, and 108k+ markets.

REST API

Typed methods for all 25 REST endpoints. Markets, pricing, settlements, wallets, enriched data.

RPC Proxy

JSON-RPC through PolyNode’s optimized Polygon endpoint with validator-targeted TX submission.

Redemption Watcher

Push alerts when tracked wallets’ positions become redeemable. Combines REST positions with real-time oracle events.

Trading

Place orders on Polymarket with one-call gasless onboarding. Auto-detects wallet type, local credential custody, builder attribution.

What the SDKs Cover

FeatureTypeScriptRustPython
Local cache (SQLite)YesYesPlanned
REST API (25 endpoints)YesYesYes
WebSocket streamingYesYesYes (async)
Short-form markets (auto-rotation)YesYesYes
All 9 event types + price feedsTyped interfacesTyped structs + enumPydantic models
Subscription filtersBuilder patternBuilder patternBuilder pattern
Orderbook streamingYesYesYes
Local orderbook stateLocalOrderbookLocalOrderbookLocalOrderbook
OrderbookEngine (views)YesYesYes
Zlib compressionTransparentTransparentTransparent
Auto-reconnectExponential backoffExponential backoffExponential backoff
Enriched data (leaderboard, trending, profiles)YesYesYes
RPC proxyYesYesYes
Redemption watcherYesYesYes
Trading (order placement)YesYes (feature: trading)Yes

Quick Comparison

import { PolyNodeWS } from 'polynode-sdk';

const ws = new PolyNodeWS('pn_live_...', 'wss://ws.polynode.dev/ws');

// Short-form: auto-rotating 15m crypto markets
const stream = ws.shortForm('15m', { coins: ['btc', 'eth'] });
stream.on('rotation', (r) => {
  for (const m of r.markets) {
    console.log(`${m.coin}: beat $${m.priceToBeat} | ${(m.upOdds * 100).toFixed(0)}% up`);
  }
});
stream.on('settlement', (e) => console.log(e.outcome, e.taker_size));

// Manual subscription
const sub = await ws.subscribe('settlements')
  .minSize(1000)
  .send();
sub.on('settlement', (e) => console.log(e.taker_side, e.taker_size));

Don’t Need an SDK?

The PolyNode API uses standard HTTP and WebSocket protocols. You can use any HTTP client or WebSocket library directly. See the Quickstart for raw examples in cURL, Python, and JavaScript.