Skip to main content
PolyNode has official SDKs for TypeScript, Python, and Rust. Each SDK covers the same core product surfaces:
  • the complete V3 API, including combos and perps data
  • the real-time settlement stream
  • the managed orderbook stream, including optional PN1 integrity checks
  • the V3 perps WebSocket
  • short-form crypto markets with the correct Chainlink price window
The examples in this section are tested against these published versions:
Use these versions or newer. Older releases do not contain the complete V3 registry, the managed perps stream, reconnect-aware settlement delivery, and PN1 orderbook integrity described here.

Install

Both ESM import and CommonJS require are supported.
Create an API key at polynode.dev, then keep it in a server-side environment variable:
Do not embed a PolyNode API key or wallet private key in browser code, mobile bundles, source control, screenshots, or logs.

First request

This reads V3 platform statistics and does not change any data.

Choose a surface

V3 API

Query wallets, trades, positions, combos, fees, builders, webhooks, and perps through the complete 120-operation registry.

Settlement stream

Receive pending settlements and confirmation updates with typed events, filters, reconnect replay, and observable overflow.

Short-form and TWAP

Follow 5-minute, 15-minute, 1-hour, and 4-hour crypto markets as their slugs and Chainlink windows rotate.

Orderbook stream

Consume raw books or maintain verified local state with PN1 sequence and checksum validation.

Perps stream

Stream tickers, best bid/offer, complete books, trades, statistics, and 1-minute or 1-hour candles.

Trading and fees

Place current V2 orders, configure builder attribution, and understand which fee fields belong on the wire.

Core parity

Some optional helpers are intentionally language-specific. The SQLite local cache is currently available in TypeScript and Rust; trading dependencies are optional in Python and Rust. Those differences do not affect the core surfaces above.

Three different WebSockets

The SDKs expose separate clients because the streams have different protocols and state: Do not send an event-stream subscription to the orderbook or perps socket. Each guide starts from the correct client and includes shutdown code.

Next steps

TypeScript

Node.js setup and complete examples.

Python

Synchronous REST and asynchronous streams.

Rust

Tokio clients, typed events, and feature flags.
If you prefer HTTP or raw WebSockets, use the API overview, event WebSocket guide, orderbook protocol, and perps API.