The API for Polymarket

Real-time data for every event, market, position, trader, and more on Polymarket. Built for agents, traders, and developers.

Abstract background representing real-time data streams

Powerful Tools, Easy to Use

Integrate our API or chat with AI — get started in minutes.

events.ts
import { StructClient } from "@structbuild/sdk";

const client = new StructClient({ apiKey: process.env.STRUCT_API_KEY });

const events = await client.events.list({
  status: "active",
  sort_by: "volume",
  timeframe: "1h",
  limit: 25,
});

for (const event of events.data) {
  console.log(event.title, event.volume, event.markets.length);
}
Developer Platform

Everything you need in one place

Drag or use arrows

Strike Data

Real-time price streams on all up/down markets with strike prices and target thresholds.

REST API

Access every event, market, position, trader, oracle event, series, tags, candlesticks, and more.

Webhooks

Trigger on market creations, resolutions, price updates, thresholds, and many more custom events.

Websockets

Stream trades, oracle events, price updates, and market changes in real time.

TypeScript SDK

Full type safety, autocompletion, and seamless integration into your codebase.

Indexing & Backfilling

Load complete history and stream new data into your own database.

Use cases

Ship with confidence at lightning speed

Focus on building your product and idea, not the infrastructure. Struct handles the rest.

Real-time market intelligence, automated alerts, and AI-powered analysis — or build your own trading platform with our API.

Power autonomous agents that research, monitor, and trade on prediction markets.

Run quantitative research, detect insider activity, and analyze prediction market data at any scale — with AI agents or the raw API.

Traders & Platforms — Real-time market intelligence, automated alerts, and AI-powered analysis — or build your own trading platform with our API.
Traders & Platforms — Real-time market intelligence, automated alerts, and AI-powered analysis — or build your own trading platform with our API.
MCP Server — Connect AI assistants like Claude, Cursor, and Codex directly to live prediction market data through the Model Context Protocol.
MCP Server — Connect AI assistants like Claude, Cursor, and Codex directly to live prediction market data through the Model Context Protocol.
AI-First

Build faster with the help of AI

We made it easy to integrate our APIs, Webhooks, SDKs, and more using your existing AI tools.

Connect AI assistants like Claude, Cursor, and Codex directly to live prediction market data through the Model Context Protocol.

Install the Struct skill in Claude Code to scaffold integrations, generate API calls, and work with our SDK using natural language.

If opted in, AI Optimized Responses automatically truncate unnecessary fields, reducing token usage and keeping AI context windows clean.

Talk to AI agents or set up workflows

Ask questions in chat, or set up automations that monitor markets around the clock and ping you on Discord, Telegram, or webhooks when something happens.

Chat with AI agents that have live access to Polymarket data. Ask about trends, look up traders, or dig into suspicious activity. Just type what you want to know.

Available Agents

Struct BotAsk anything about Polymarket
Find InsidersSpot suspicious trading patterns
News AnalysisTrack news and sentiment shifts
Many more

Set up workflows that trigger when something happens on-chain. A new market goes live, a whale makes a move, prices spike. AI processes the event and sends you a breakdown.

Predefined templates, or create your own

New Market AnalyzerWhale Trade AlertPrice Spike DetectiveVolume ReporterInsider ScannerMany more

Skip the AI layer entirely. Pipe raw events, price alerts, and trade notifications straight to your channels the moment they happen.

Send alerts to any channel

Rich embeds
Custom fields
Markdown

How Struct stacks up against the competition

Compare real performance metrics and data coverage across Polymarket data providers.

FeaturesPolymarketCompetitor 1Competitor 2
Resolution Latency: Time between market resolution on-chain and data availability in APIs.
Instant
~2min
~2min
~2min
PnL Latency: Time between order placement and profit/loss calculation.
Instant
~10s cache
N/A
60m refresh
Positions Latency: Time between position creation/updates and data availability in APIs.
Instant
~10s cache
~10s
~1s
PnL Richness: Amount of PnL data available for each account.
Full
Limited
N/A
Full
PnL History: Live position and PnL data for all token holders.
All-time
All-time
N/A
<30d
Price Metrics: Amount of price metric timeframes and types available. E.g. 1m, 24h, 7d for markets, events, positions.
27
10
4
4
Websockets: Ability to stream data in real-time using WebSockets.
Webhooks: Ability to receive data updates via webhooks.
Managed Backfill: Ability to backfill historical & realtime data into your own database.
Rate Limits: Maximum number of API requests allowed per second.
No limit
20–400/sec1
No limit
No limit
AI Chat Agents: Built-in AI chat agents for market research, analysis, and insider detection.
Automations: Event-triggered workflows with AI processing, delivered to Discord, Telegram, or webhooks.
Multiple Venues: Ability to access data from multiple prediction markets.
Roadmap
1 References Polymarket's official Gamma API rate limits. Last updated: 2026-02-24

Indexed from the start

Struct indexed the entire history of Polymarket — every market, event, trade, and trader available through a single API.

600K+
Markets
250K+
Events
750M+
Trades
80M+
Positions

From the blog

Guides, product updates, and deep dives into Polymarket data.

Building a Polymarket Scanner Bot with the Struct SDK

Building a Polymarket Scanner Bot with the Struct SDK

How we built an open-source Telegram bot that lets you look up live Polymarket odds, trader stats, and top holders by pasting a URL or wallet address: architecture, implementation, and key decisions.

Struct Team
Struct Team
Read
Building a Polymarket Trader Explorer with the Struct SDK

Building a Polymarket Trader Explorer with the Struct SDK

How we built a Polymarket trader explorer - a real-time analytics dashboard with PnL charts, heatmap calendars, shareable image cards, and streaming SSR. Architecture, key decisions, and implementation details.

Struct Team
Struct Team
Read
View all posts

Start exploring with Struct

Get started for free — chat with AI agents or integrate our API in minutes. No credit card required.

Get Started