Skip to main content
← Back to the current changelog

2026-03-31 — TypeScript SDK v0.5.6 (Cache Crash Recovery)

TypeScript SDK v0.5.6

Fixes a crash that could occur when stopping the cache mid-backfill, and adds proper crash recovery for interrupted backfills. Graceful shutdown: cache.stop() now waits for any in-flight backfill operation to complete before closing the database. Previously, stopping during an active backfill could crash with a Cannot read properties of null error on the SQLite handle. Crash recovery: on startup, any backfills that were interrupted by a previous crash or kill are automatically detected and retried. The cache logs exactly what’s happening:
Accurate logging: the startup log now only reports entities that actually need backfilling, instead of the total watchlist count.

2026-03-31 — Equity Curve Endpoint

New: Trader Equity Curve

Full equity curve for any Polymarket wallet. Returns a time-ordered series of cumulative profit and loss across every position the wallet has ever taken. Endpoint: GET /v2/trader/{wallet}/equity?period=all&normalize=1 Features:
  • Raw P&L curve with realized gains/losses and mark-to-market on open positions
  • $1-normalized curve for copy-trade analysis: each position scaled to $1 of risk, showing expected returns per dollar deployed
  • Period filtering: 7d, 30d, 90d, 1y, all
  • Accuracy within 2-3% of Polymarket’s own P&L calculations (variance from real-time price differences on open positions only)
$1 normalization answers the question: “If I copy every trade this wallet makes but only risk $1 per position, what are my returns?” Useful for evaluating trader skill independent of position sizing.
See the full documentation for methodology details and response field reference.

Fix: Market Price Fetching

Fixed an issue where current market prices were not being fetched correctly for open positions across multiple endpoints. Price accuracy is now significantly improved for any endpoint that reports unrealized P&L.

2026-03-29 — Rust SDK v0.5.6 (Order Placement Fix)

Rust SDK v0.5.6

Critical fixes for order placement. The trading module now passes full end-to-end testing: wallet onboarding, order placement, cancellation, and order history. Order signing fixes:
  • Fixed EIP-712 struct hashing (domain type filtering)
  • Fixed signature v normalization for CLOB compatibility
  • Fixed amount rounding to match tick-size-based precision rules
  • Fixed salt generation range for CLOB compatibility
Authentication fixes:
  • Fixed HMAC base64 decoding for URL-safe encoded secrets
  • Fixed wallet address checksumming (EIP-55) in all auth headers and order payloads
Privy integration fixes:
  • Fixed address formatting in Privy wallet API calls
  • Fixed signature normalization in Privy response extraction

2026-03-29 — Python SDK v0.6.0

Python SDK v0.6.0

Trading module fixes and Privy server-side wallet support. Trading fixes:
  • Fixed CLOB credential creation (endpoint, auth headers, EIP-712 message structure)
  • Fixed order signing (domain name, signature format, payload serialization)
  • Fixed HMAC authentication for URL-safe base64 secrets
  • Fixed fetch_tick_size and fetch_neg_risk response parsing
  • Full end-to-end verified: wallet generation, onboarding, order placement, cancellation, gasless flow
New: Privy signer
  • PrivySigner for server-side trading with Privy-managed wallets
  • No private key needed, signing via Privy’s wallet API
  • Works with all trading methods (ensure_ready, order, cancel_all, etc.)
Other fixes:
  • markets_by_category() now correctly filters via query parameter
  • Fixed subscription filters code example in docs

2026-03-29 — Rust SDK v0.5.0 (Feature Parity)

Rust SDK v0.5.0

Major release bringing the Rust SDK to feature parity with the TypeScript SDK. New REST endpoints (12 methods):
  • Orderbook REST: orderbook_rest(), midpoint(), spread()
  • Enriched data: leaderboard(), trending(), activity(), movers()
  • Trader analytics: trader_profile(), trader_pnl()
  • Events: event(), search_events(), markets_by_category()
Trading module (--features trading):
  • PolyNodeTrader for full order lifecycle on Polymarket
  • Wallet generation, onboarding (auto-detect Safe/Proxy), order placement, cancellation
  • Native EIP-712 signing via TradingSigner trait + PrivateKeySigner
  • CREATE2 address derivation for Safe and Proxy wallets
  • CLOB authentication with L2 HMAC headers
  • Builder attribution via co-signer proxy
  • Local SQLite storage for credentials and order history
  • On-chain approval and balance checks
Privy integration (--features privy):
  • PrivySigner for server-side trading with Privy-managed wallets
  • Pure HTTP-based, no native SDK dependency
Redemption watcher:
  • Monitor wallets for redeemable positions after oracle resolution
  • Fires alerts with winner detection and payout estimation
Full documentation: Rust SDK

2026-03-29 — Trading Module v0.5.5 (TypeScript SDK)

TypeScript SDK v0.5.5

  • EOA auto-approvals: ensureReady() now automatically sends approval transactions for EOA wallets with proper nonce management. Requires 0.05 MATIC in the wallet ($0.01).
  • Fix: createPrivySigner, createPrivyClient, and other Privy helpers are now correctly exported from the package root. In v0.5.2 these were only reachable through non-public module paths.
  • Privy server-auth integration: createPrivySigner() and createPrivyClient() for server-side trading with Privy-managed wallets.
  • Unlimited gasless operations: Paid tiers get unlimited gasless on-chain operations. Free tier gets basic gasless onboarding.
  • ethers v5/v6 compatibility: Safe transaction signing works with both ethers v5 and v6.
Full documentation: Trading

2026-03-29 — Trading Module (TypeScript SDK v0.5.0)

TypeScript SDK — Order Placement on Polymarket

Place and manage orders on Polymarket through the polynode SDK. One function call handles wallet setup, credential creation, approvals, and order placement.
One-call onboarding:
Key features:
  • Auto-detection: Pass your private key. The SDK checks if you have a Safe, Proxy, or EOA on-chain and uses the right one. No wallet type guessing.
  • Wallet generation: PolyNodeTrader.generateWallet() for users starting from scratch.
  • Gasless onboarding: Safe deployment + 6 token approvals in one call, ~10 seconds, zero gas.
  • Local credential custody: CLOB credentials stored in local SQLite. Export, import, and back up freely.
  • Builder attribution: Orders route through polynode’s relay for affiliate tracking. If the relay is down, orders fall back to direct CLOB submission.
  • All three wallet types: EOA (type 0), Proxy (type 1, legacy Magic Link), Safe (type 2, browser wallets).
  • Dome drop-in: Same @polymarket/clob-client signing under the hood. Import existing Dome credentials with linkCredentials().
Full documentation: Trading | Dome Migration

2026-03-28 — Onchain Data Endpoints + Market Metadata Enrichment

Enrichment: All Onchain Endpoints Now Include Market Metadata

Every onchain endpoint now returns enriched data with human-readable market context. Responses include market (question text), slug, outcome label, image, and condition_id alongside the raw onchain data. Powered by a full backfill of all 706K+ Polymarket markets into a local metadata store that refreshes every 5 minutes.

New: Onchain Data Section

Seven new endpoints for blockchain settlement data. These provide complete, accurate data that never times out or drops records. All onchain endpoints are under /v2/onchain/ and documented in the new Onchain section of the API reference.

Wallet endpoints

  • GET /v2/onchain/wallets/{addr}/trades — Complete trade fill history for any wallet. Every fill, every counterparty, every fee.
  • GET /v2/onchain/wallets/{addr}/redemptions — All redemptions with payout amounts. See who cashed out, when, and how much. Not available anywhere else.
  • GET /v2/onchain/wallets/{addr}/activity — Splits, merges, and multi-outcome conversions. Shows how wallets interact with the CTF contract beyond simple trading.

Market endpoints

  • GET /v2/onchain/markets/{tokenId}/trades — Complete trade tape for any market token.
  • GET /v2/onchain/markets/{tokenId}/volume — Lifetime volume stats: total trades, buys, sells, USDC volume with buy/sell breakdown.
  • GET /v2/onchain/markets/{conditionId}/oi — Per-market open interest in USDC.
  • GET /v2/onchain/oi — Global platform open interest (currently ~$469M).
All endpoints support limit and offset pagination where applicable. Responses are cached for 1-5 minutes depending on the endpoint.

Wallet P&L: Complete Position History + Accurate Realized P&L

What changed

The existing GET /v1/wallets/{addr}/positions endpoint only returns open positions. Once a market resolves or a position is fully sold, it disappears from the response. The existing GET /v1/wallets/{addr}/trades endpoint silently drops trades for high-volume wallets (we verified one wallet showing 403 trades through the API vs 4,405 actual onchain trades). This made it impossible to compute accurate P&L through our API. That’s fixed now. Two new v2 endpoints return complete position history with accurate P&L sourced from onchain settlement data. Per-position realized_pnl values come from the same onchain settlement data Polymarket uses and match individual position P&L to the penny. The total_realized_pnl aggregate measures total realized gains, which is different from Polymarket’s profile PnL (see docs for a full breakdown).

GET /v2/wallets/{address}/positions/onchain

One call. No pagination. All positions (open + closed). Unlike the v1 positions endpoint which requires the SDK to paginate through trades page by page, this endpoint returns the complete picture in a single request with up to 20,000 positions.
Responses are cached for 5 minutes. First request takes 200ms-3s depending on position count. Cached responses return in under 50ms.

GET /v2/wallets/{address}/closed-positions

Closed positions with full metadata (title, outcome, slug). Paginated.
Parameters: limit (max 50), offset, sortBy (REALIZEDPNL, AVGPRICE, PRICE, TITLE, TIMESTAMP), sortDirection (ASC/DESC).

SDK: Automatic onchain P&L backfill

The TypeScript (polynode-sdk@0.4.10) and Rust (polynode@0.4.3) SDKs now fetch onchain position data automatically during backfill. No code changes needed if you’re already using cache.start(). The backfill makes one additional API call per wallet (the onchain positions endpoint above) and stores the results in your local SQLite database.
Before: The SDK backfilled trades page by page (up to 6 requests per wallet) and computed P&L from incomplete trade history. Wallets with dropped trades got wrong numbers. After: One call per wallet returns all positions with precomputed P&L. The SDK stores this in SQLite and uses it as the source of truth for all P&L queries.
trades_analyzed reflects cached trades from the REST API (403 in this case). The total_realized_pnl and per-token realized_pnl values come from onchain settlement data and are accurate regardless of cached trade count. walletDashboard() now includes realized_pnl, pnl_confidence, and token_pnl fields:

Crypto Price Streaming (WebSocket)

Real-time cryptocurrency prices are now available on the same WebSocket connection you already use for settlements and oracle events. Seven feeds, each updating roughly once per second: BTC/USD, ETH/USD, SOL/USD, BNB/USD, XRP/USD, DOGE/USD, HYPE/USD Subscribe with {"action": "subscribe", "type": "chainlink"}. Optionally filter to specific feeds:
Each price update includes bid, ask, and mid price:
BTC/USD includes actual bid/ask spread. Other feeds currently report bid and ask equal to the mid price. See the full documentation for connection examples, feed details, and event format reference.

Crypto REST Endpoints

Five new REST endpoints for crypto prediction market data:
  • GET /v1/crypto/markets — All crypto prediction markets with volume, liquidity, and open interest (3 min cache)
  • GET /v1/crypto/candles?symbol=BTC — ~30 five-minute OHLC candles (30s cache)
  • GET /v1/crypto/price?symbol=BTC&window={epoch} — Open/close price for a specific market window (10s cache)
  • GET /v1/crypto/active — Currently active 5-minute up-or-down markets across all 7 coins with live odds (30s cache)
  • GET /v1/crypto/series — Recurring crypto market series across timeframes (5 min cache)
Supported symbols: BTC, ETH, SOL, BNB, XRP, DOGE, HYPE. See the REST API reference for full parameter details and response samples.