Skip to main content
Struct is the fastest API for Polymarket. Queries are instant, no matter how active the trader or market. Every derived value (PnL, leaderboards, positions, market and event metrics) is pre-computed and stored as a single materialised row, updated as on-chain events arrive, so what would otherwise be a scan over hundreds of thousands of trades is a single-row lookup.

Quickstart

Get your API key and make your first request in minutes.

Authentication

Secret keys, JWT public keys, and how to call the API from a browser.

API Reference

Browse every endpoint, parameter, and response shape.

Dashboard

Manage your organisation, keys, webhooks, and billing.

Why Struct?

Materialised on write

PnL, leaderboards, positions, and metrics are pre-computed as a single row. Every query is a one-row read, not a scan over months of trades.

One unified API

REST, websockets, and webhooks for every Polymarket entity in one place. No more stitching together gamma, CLOB, the subgraph, and on-chain reads.

Real-time streams

Push delivery for trades, prices, PnL, positions, and order books over websockets, plus 25+ in-app alert types and 15+ webhook event types.

Struct vs. Polymarket’s direct APIs

Polymarket (Gamma + Data + CLOB)Struct
SurfaceThree separate APIs plus the subgraph and on-chain readsOne unified REST, websocket, and webhook API
Trader PnLAvailable; does not include fees, win rate, open positions, etcFee-accurate, with win rate, hold time, best/worst trade, splits, merges, and more
LeaderboardsMaterialised, refreshed on a periodic cycleMaterialised and updated in real time as trades settle
Trades streamAvailable; thin payload (raw on-chain fields)Enriched payload with slug, event, image, builder code, fee breakdown, trader pseudonym, neg-risk context
Pending tradesWait for chain confirmationStreamed from the mempool before they settle
Per-wallet position streamUser channel, requires that wallet’s authAny wallet, no per-wallet auth, server-side filtered
WebhooksNot available15+ event types with HMAC signing, retries, rotation, delivered instantly - no polling
In-app alertsNot availableWhale trades, PnL crossings, probability/price spikes, volume milestones over WS or HTTP
JWT public-key authNot supportedFirst-class, JWKS or inline key, per-user limits

Use cases

Trading platforms

Custom trading UIs, aggregators, and copy-trading powered by real-time Polymarket data.

AI agents

Autonomous agents that research, monitor, and trade on prediction markets.

Analytics & research

Dashboards, quant research, and large-scale historical analysis.

Start building

TypeScript SDK

Typed clients for REST, rooms, alerts, and webhook management.

WebSockets

Subscribe to trades, prices, PnL, positions, order books, and metric streams.

Webhooks

HTTP event delivery for trades, milestones, spikes, PnL crossings, and market lifecycle.

Guides

Best practices, error handling, rate limits, and recipes for common integrations.
Last modified on May 27, 2026