Historical Data API

SmaugLabs

Historical Polymarket Data for Algorithmic Trading

Self-sovereign orderbook recordings, crypto reference prices, event correlation, and trader activity data. Built for quants who backtest.

01

Historical Orderbook

Query any Polymarket orderbook from time A to B. Granularity from 50ms to daily. OHLCV candles, depth analysis, spread history.

02

Event Correlation

Match market movements with real-world events. News enrichment, price timelines, market metadata for sentiment analysis.

03

Trader Activity

Track top traders' positions, PnL per market, trade history. Leaderboard rankings and copy trading signals.

4.5+ GB
Orderbook Data
3.7M+
Crypto Candles
96
Active Tokens
117
Tracked Traders
Drop-in data for your backtest
python
curl
from smauglabs import SmaugLabs client = SmaugLabs(api_key="sl_live_...") # Get 1-hour OHLCV candles for a token candles = client.sovereign_chart("TOKEN_ID", granularity="1h") # Replay historical orderbook for backtesting replay = client.orderbook_replay( token_id="TOKEN_ID", start_time="2026-03-01T00:00:00Z", granularity="1s" ) # Screen markets by volume and category markets = client.market_screener( min_volume=100000, category="crypto" )
# Get OHLCV candles curl -H "X-API-Key: sl_live_..." \ "https://api.smauglabs.com/v1/orderbook/sovereign/chart/TOKEN?granularity=1h" # Replay orderbook for backtesting curl -H "X-API-Key: sl_live_..." \ "https://api.smauglabs.com/v1/orderbook/replay?token_id=TOKEN&start_time=2026-03-01T00:00:00Z&granularity=1s" # Search markets curl "https://api.smauglabs.com/v1/events/markets/search?q=bitcoin&limit=5" # Custom SQL query curl -X POST -H "X-API-Key: sl_live_..." \ -d '{"sql":"SELECT * FROM orderbook_raw LIMIT 10"}' \ "https://api.smauglabs.com/v1/orderbook/query"

Install: pip install smauglabs or npm install smauglabs

Query

Raw SQL Queries

Run custom DuckDB queries against the full dataset. Columnar parquet backend, sub-2ms analytical performance.

Export

Parquet Downloads

Download raw .parquet files for offline analysis. Bring your own tooling: pandas, Polars, DuckDB, Spark.

Discovery

Market Screener

Filter by volume, liquidity, category, data coverage. Find markets worth backtesting before you commit compute.

Analysis

Cross-Market Correlation

Find correlated market movements across tokens. Window-based correlation analysis with configurable parameters.

Automation

Webhook Notifications

Get notified when new data arrives or conditions trigger. Integrate into your pipeline with standard HTTP callbacks.

SDKs

Python & TypeScript

Type-safe clients for both ecosystems. pip install smauglabs or npm install smauglabs. Sync and async support.

44 endpoints across 6 domains
Market Discovery Events, search, trending, categories 5 endpoints
Historical Orderbook Snapshots, history, depth, spread, OHLCV, replay, correlations, custom SQL 12 endpoints
Crypto Reference Price history, klines, trade ticks, depth, multi-source charts 11 endpoints
Event Correlation Timelines, news enrichment, metadata, BTC reference 3 endpoints
Trader Activity Leaderboard, signals, profiles, trade history, PnL 8 endpoints
Data Export File listing, raw parquet downloads, schema introspection 5 endpoints

Full endpoint reference with examples →