# The data layer for prediction markets

Every Polymarket market, event, trade, and trader. Fully indexed, fully backfilled. One integration.

Build prediction market frontends, aggregators, and odds dashboards on Polymarket. Every market, event, trade, and trader, indexed with full history, live prices, and lifecycle webhooks from creation through resolution.

- **10ms latency** from onchain event to your app.
- **20+ event types** pushed over webhooks, creation through resolution.

## Everything a prediction market product needs

Markets, probabilities, lifecycle events, and trader flow, all from one API.

- **Every market and event**: Filter markets and events by tag, activity, or volume, with live probabilities attached.
- **Lifecycle events, pushed to you**: Webhooks fire from market creation through resolution, so nothing slips past your app.
- **Every trade, every trader**: Live fills with the wallet behind each one, plus positions and PnL per trader.
- **Strike and outcome data**: Live underlying prices next to every strike, so your odds stay in sync with the market.

## Polymarket, fully indexed

Our flagship coverage. Every market, trade, and trader, with complete history behind it.

- **10ms, every time**: Probability moves reach your app in as little as 10ms. Fast enough to be the alert, not the recap.
- **Backfilled history**: Every market's full trade and price history, ready for charts and analytics from day one.
- **Resolution alerts, built in**: 20+ webhook event types cover the whole lifecycle, from creation to final outcome.
- **Order books over websockets**: Live books, prices, and fills streamed to your app. No polling loops.
- **Per-trader positions and PnL**: Follow any wallet's positions, entries, and realized PnL across every market.
- **One schema beyond Polymarket**: Build against one shape and new prediction market venues fit without rework.

## What it takes to go from API to product

Typed tooling, signed delivery, end-user auth, and a team that shows up while you build.

- **TypeScript SDK**: Typed endpoints for markets, trades, and positions. Autocomplete instead of docs tabs.
- **MCP server**: Give your agents live prediction market context with tools they can call directly.
- **Webhooks you can trust**: HMAC-signed payloads with at-least-once delivery, so resolution alerts never go missing.
- **Drop-in JWT auth**: Authenticate end users straight from your frontend with Clerk, Auth0, and more.
- **Managed Backfill**: Load complete Polymarket history into your own warehouse without running an indexer.
- **Your second backend team**: 24/7 support on calls, Telegram, and Slack while you build and after you ship.

## Frequently asked questions

### What can I build with Struct?

Prediction market frontends, aggregators, odds dashboards, resolution alerting, and trader analytics. We're the data backend, you own the product.

### How much of Polymarket does Struct cover?

All of it. Every market, event, trade, and trader, indexed with full history. Polymarket is our flagship coverage.

### How do I get started?

Create a free account, generate an API key, hit the REST API or connect a websocket. Nothing to run or index on your side. Other venues and chains are an engagement: https://www.struct.to/apps

### How do I follow a market from creation to resolution?

Webhooks fire on lifecycle events: creation, price moves, and resolution. Your backend gets pushed the moment a market changes state, no polling loops.

### Can I stream live order books and prices?

Yes. Websockets stream order books, prices, and fills as they happen. Use REST for snapshots, history, and candlesticks.

### Do you provide historical probabilities and trades?

Every market ships fully backfilled, with OHLCV candles from 1 second to 1 day and cursor pagination over millions of records.

## Learn more

- [Polymarket docs](https://docs.struct.to)
- [REST API](https://www.struct.to/rest-api)
- [WebSockets](https://www.struct.to/websockets)
- [Webhooks](https://www.struct.to/webhooks)
- [Pricing](https://www.struct.to/pricing)
- [Documentation](https://docs.struct.to)
