What resolution does the order book API use?
1 second on every plan, including the free Starter tier. Paid plans also support coarser query grids from 60s to 1s. The capture cadence is uniform — you choose the grid at query time.
Does the API include resolved markets?
Yes. Resolved markets stay queryable with the winning outcome on every row. Prices and books for the full history are available after resolution — nothing is deleted.
What is in a book snapshot?
Full bid/ask ladders — every level, not just the top of book. Each row carries aligned bids, asks, spread, depth, and a timestamp. Prices and metrics come on separate endpoints with the same timestamps.
How does this differ from Polymarket's own /book endpoint?
Polymarket's CLOB /book endpoint serves the live order book at the current moment. PolyOrderbooks captures and stores the complete book state at regular intervals, so you can query the exact book that existed at any point in a market's history.
Can I get the full market lifecycle in one request?
Yes. Omit start_ts and end_ts to get the full lifecycle from market open to resolution. The response includes every 1-second snapshot, which for a 5-minute market is approximately 300 snapshots.
What is the maximum time range I can query?
The maximum range depends on your plan. Starter gives 3 days, paid plans give 30–120 days. Within that window, you can query any contiguous range. Large ranges return more data and count more against your daily limit.
What happens if I hit the rate limit?
The API returns a 429 status. Pause and retry with exponential backoff. Your daily counter resets at UTC midnight. Rate limits are per API key — creating additional Starter accounts does not bypass them.
How do rate limits compare to Polymarket's own API?
Polymarket's CLOB /prices-history allows ~1,000 requests per 10 seconds but is IP-throttled with undocumented caps. PolyOrderbooks limits are per key and documented on the pricing page — you know exactly what you get.
Can I increase my rate limit?
Upgrade your data window plan for higher base throughput (300 rpm on paid), then add the Fast (+$19/mo) or Heavy (+$39/mo) speed add-on for 1,000 or 2,500 rpm respectively. Enterprise plans have custom limits.
Do rate limits apply to the free Starter plan?
Yes. Starter gets 60 rpm and 1,000 requests per day. This is enough for exploration and small projects. If you consistently hit the limit, it's a signal to upgrade.
How many requests does a typical backtest need?
It depends on the time range and resolution. A 5-minute market at 1s resolution returns ~300 snapshots in one request. Backtesting 100 markets requires 100 requests. At 300 rpm (paid plan), this takes about 20 seconds.
Are there separate limits for different endpoints?
No. The rate limit is global across all API endpoints. Whether you're fetching markets, books, prices, or metrics, every request counts toward the same per-minute and per-day limits.
Is there a free API key?
Yes. The Starter plan is free, includes order books, prices, and metrics at 1-second resolution with 3 days of history. No credit card required to sign up.
Where do I find my API key?
After signing in, go to Dashboard and open the API keys section. Generate a key there. The key is shown once on creation — store it securely.
How is the API key authenticated?
Pass it as an X-API-Key header on requests to the PolyOrderbooks REST API. The header is per-request, not per-IP.
Can I have multiple API keys?
Yes. You can generate multiple keys from the dashboard. Each key has its own rate limit pool. This is useful for separating development and production traffic.
What happens if I lose my API key?
Revoke the lost key from the dashboard immediately, then generate a new one. The old key is invalidated instantly. Any in-flight requests using the revoked key will fail with 401.
Do I need a different key for the Python SDK?
No. The same key works with the Python SDK, raw requests, curl, and any HTTP client. Set it via the POLYORDERBOOKS_API_KEY environment variable or pass it directly to the client.
How do I install the Python SDK?
pip install polyorderbooks. The SDK wraps the REST API and handles authentication, pagination, and retries. Set your API key via the POLYORDERBOOKS_API_KEY environment variable or pass it directly.
Can I use requests instead of the SDK?
Yes. All endpoints are REST and documented at docs.polyorderbooks.com. Pass your API key as an X-API-Key header. The SDK is a convenience wrapper — raw requests work identically.
What is the simplest way to get started?
Sign up for the free Starter plan, grab your API key from the dashboard, pip install polyorderbooks, and call client.markets() to list available markets. From there, pull books or prices for any slug.
Does the SDK support async?
The current SDK uses synchronous requests. For async workflows, use aiohttp or httpx directly with the REST API. The endpoints and authentication are the same.
Can I use the SDK with Jupyter notebooks?
Yes. The SDK works in Jupyter notebooks, Google Colab, and any Python environment. Set the API key as an environment variable before importing the client.
Can I use Polymarket's free /prices-history instead?
For simple price charts and implied probabilities, yes — /prices-history is free and requires no API key. Use PolyOrderbooks when you need full L2 depth, spread, aligned metrics, or historical book snapshots for fill simulation.
What is the difference in resolution?
The CLOB /prices-history returns minute-level or sub-minute intervals at best, and older data may only be hourly. PolyOrderbooks captures at 1-second resolution and lets you query grids from 60s down to 1s.
Do I need both?
Many users start with /prices-history for quick price checks and move to PolyOrderbooks /books when they need depth for backtesting, slippage analysis, or microstructure research. The free Starter tier gives you 3 days to test the difference.
Is Polymarket's /prices-history reliable for backtesting?
It's reliable for price-level analysis, but it doesn't give you order book depth. For backtesting that includes fill simulation and slippage, you need the L2 data that only PolyOrderbooks provides.
Which is better for building a trading dashboard?
For a simple price chart, /prices-history is free and fast. For a dashboard that shows depth, spread, and liquidity metrics, PolyOrderbooks /books gives you all the data you need in one endpoint.
How many markets does Polymarket have?
Thousands. New 5-minute markets are created every 5 minutes, and longer timeframes (1h, 1d) are created regularly. The /markets endpoint is the authoritative source for the current count.
What is a slug?
A slug is a unique identifier for each market, like btc-updown-5m-1787486400. You use it to query order books, prices, and metrics. Slugs encode the coin, timeframe, and resolution timestamp.
How often should I refresh my market index?
For active trading, every 5 to 15 minutes. For batch analysis, every hour is fine. The /markets endpoint is lightweight and does not count heavily against your rate limit.
Can I get only resolved markets?
Yes. Pass ?status=resolved to see only markets that have already settled. Each resolved market includes the winning outcome, which is useful for historical analysis and backtesting.
How are metrics computed?
Metrics are derived from the same L2 order book data used by the /books endpoint. Spread is best_ask minus best_bid. Depth is the sum of all size values on each side. VWAP weights each price level by its size.
Are metrics aligned with book snapshots?
Yes. Metrics, books, and prices share the same timestamps, so you can join them in a DataFrame or analysis tool without any time alignment logic.
Can I get metrics without pulling raw books?
Yes. The metrics endpoint is separate from the books endpoint. If you only need summary statistics, skip the books endpoint and use metrics directly. This saves processing time and reduces data transfer.
What does VWAP tell me that spread doesn’t?
Spread tells you the gap between the best bid and best ask. VWAP tells you the average execution price across all levels, weighted by size. A market can have a tight spread but a high VWAP if there is thin depth beyond the top of book.
What is the base URL?
https://api.polyorderbooks.com/v1. All endpoints are relative to this base. There is no versioning beyond v1; breaking changes will get a v2 path.
How do I authenticate?
Include an X-API-Key header on every request. Get your key from the dashboard after signing up. There is no OAuth or token refresh flow.
What format are the responses?
All responses are JSON. Error responses have a consistent {"error": "<message>"} structure. Success responses are arrays or objects depending on the endpoint.
What happens on a bad request?
The API returns HTTP 400 with a JSON error message explaining what went wrong. Common causes: missing required parameters, invalid slug, or out-of-range time values.
Can I use Google Colab?
Yes. The polyorderbooks SDK works in Google Colab with no special setup. Install it with !pip install polyorderbooks and set the API key as an environment variable.
How do I handle large datasets in notebooks?
Use coarser resolutions (5s or 1m) for initial exploration, then drill into 1s data for specific time windows. Pandas handles tens of thousands of rows well.
Can I export notebook results to CSV?
Yes. After building a DataFrame, use df.to_csv("output.csv") to export. This works for any analysis you want to share or use outside the notebook.
How do I share notebook results with my team?
Export DataFrames to CSV or Parquet with df.to_csv() or df.to_parquet(). For interactive charts, export as HTML with fig.write_html(). You can also share the notebook itself as a .ipynb file or convert it to a static HTML report.
Which format should I use?
Parquet for analysis and backtesting (fastest queries, smallest files). CSV for sharing with non-technical stakeholders. JSON for API ingestion and debugging.
How much smaller is Parquet than JSON?
Typically 3 to 5x smaller for order book data. The exact ratio depends on the number of price levels and the compression ratio.
Can I query Parquet files without loading them into memory?
Yes. DuckDB and Polars can query Parquet files directly without loading them into memory. This is useful for large datasets.
Do PolyOrderbooks datasets come in Parquet?
Yes. Sample datasets are provided in Parquet format for optimal file size and query performance. You can convert to CSV or JSON as needed.
How many API requests does a daily pipeline need?
It depends on how many markets you track. Each market requires one request per endpoint (books, prices, metrics). Tracking 500 active markets means ~1,500 requests per run.
Should I use the SDK or raw requests?
The SDK handles retries and pagination automatically, which saves code. Raw requests give you more control over error handling and logging. For production pipelines, raw requests with explicit retry logic are often preferred.
How do I handle new markets appearing?
Refresh your market index at the start of each pipeline run. New markets appear in the /markets list before they start trading.
What if the API is down during a scheduled run?
Log the failure and retry on the next scheduled run. Do not retry immediately because if the API is down for maintenance, immediate retries waste rate limit budget.
What is the difference between L1 and L2 data?
L1 shows only the best bid and best ask (top of book). L2 shows every price level with its size. L2 is essential for depth analysis, fill simulation, and slippage estimation.
How do I identify liquidity zones?
Look for price levels with disproportionately large size compared to neighboring levels. These concentrations act as support/resistance.
Does depth predict price direction?
Depth imbalances are a directional signal but not definitive. Use depth as one input alongside spread, volume, and other indicators.
How does depth differ between BTC and ETH markets?
BTC markets typically have deeper books and tighter spreads than ETH markets. This reflects higher trading volume and more market maker participation.
What is a good spread on Polymarket?
For active BTC 5-minute markets, spreads of 1 to 2 cents during steady-state trading indicate good liquidity. Wider spreads (5+ cents) suggest low participation.
Why do spreads widen near resolution?
Market makers widen spreads to protect against adverse selection. As resolution approaches, the risk of being on the wrong side of a binary outcome increases.
Can I trade at the spread?
Yes. Placing a limit order at the best bid or best ask means you are providing liquidity, not crossing the spread. You earn the spread instead of paying it.
How does spread relate to slippage?
Spread is the minimum cost of immediate execution. Slippage is the additional cost when your order walks through multiple price levels.
How much slippage should I expect?
For a 500-share buy in a liquid BTC 5-minute market, expect 0.5 to 2 cents of slippage. Larger orders or thinner markets will see more.
Can slippage be negative?
In theory, yes, if the book moves in your favor between signal and execution. In practice, slippage is almost always positive (unfavorable).
How do I reduce slippage?
Use limit orders instead of market orders. Split large orders into smaller pieces over time. Trade in liquid markets (BTC 5-minute) where depth is deepest.
Does slippage affect backtest results?
Significantly. A strategy that appears profitable on midpoint data may be unprofitable after accounting for spread and slippage. Always include execution cost modeling.
What determines the outcome of a market?
A Chainlink oracle reads the cryptocurrency price at the resolution timestamp and compares it to the opening price. If the price is higher, the market resolves Up.
Can the outcome be challenged?
No. The oracle price is final. Chainlink decentralized network is designed to produce a single, tamper-resistant price that cannot be disputed.
What happens to my orders at resolution?
All outstanding orders are cancelled instantly at the resolution timestamp. Your positions are settled at $1 (winning) or $0 (losing).
Can I still query resolved market data?
Yes. Resolved markets remain fully queryable via the API. Every row reflects the winning outcome.
Are BTC and ETH markets correlated on Polymarket?
Yes, typically 0.7 to 0.9 during normal conditions. The correlation reflects the underlying relationship between Bitcoin and Ethereum prices.
Can I trade correlation directly?
You can trade relative value by going long one market and short the correlated market when the spread deviates from its mean. This is a pairs-trading approach.
How do I detect lead-lag relationships?
Compute cross-correlation between two price series at different time offsets. BTC typically leads ETH during volatile periods.
Does correlation persist across market lifecycles?
Correlation is strongest during steady-state trading. It can break down near resolution when individual market factors dominate.
How many markets do I need for a reliable backtest?
At least 20 to 50 markets of the same type (e.g., BTC 5-minute) to get statistical significance.
Should I use 1s or 5s resolution for backtesting?
1s resolution for the most accurate fill simulation. 5s is acceptable for strategies that do not depend on sub-second timing.
How do I avoid overfitting?
Use walk-forward analysis, keep parameter counts low (2 to 3 at most), test on out-of-sample data, and validate on markets not used in optimization.
What P&L should I expect from a good strategy?
After accounting for spread and slippage, even modest positive P&L is good. Watch for strategies that are only profitable when ignoring execution costs.
Is arbitrage common on Polymarket?
Logic arbitrage is rare because market makers actively monitor quotes. Cross-market arbitrage between platforms is more common but requires multi-platform access.
Can I automate arbitrage detection?
Yes. Monitor the sum of Up and Down ask prices in real-time. When it drops below $1 minus your threshold, trigger a buy signal for both outcomes.
What profit should I expect from arbitrage?
Logic arbitrage on Polymarket typically yields 0.5 to 2 cents per trade before transaction costs. Volume and speed matter more than per-trade profit.
What are the main risks?
Execution risk, liquidity risk, market maker reaction, and counterparty risk. Automated systems with low latency help mitigate execution risk.
How much can market makers earn?
It depends on spread width and volume. In active BTC 5-minute markets, market makers can earn 0.5 to 2 cents per round-trip trade, multiplied by volume.
What is the minimum capital to market make?
You need enough capital to provide meaningful quotes on both sides. For Polymarket prediction markets, $500 to $1,000 is a reasonable starting point.
How do I manage inventory risk?
Adjust your quotes to attract the opposite flow when your inventory is one-sided. Widen your spread as inventory grows. Consider hedging on correlated markets.
What are the biggest risks for market makers?
Adverse selection (trading against informed flow), inventory risk (market moves against your position), and operational risk (latency, system failures).
What programming language should I use?
Python is the most common choice due to its ecosystem (pandas, requests, asyncio). JavaScript/TypeScript works well for real-time bots using Node.js. Choose what you are most productive in.
How do I test my bot without risking money?
Run in paper trading mode: generate signals and log them without placing actual orders. Compare your signals against actual market outcomes to validate your strategy.
What are the biggest risks for automated trading on Polymarket?
API rate limits (use exponential backoff), slippage (account for spread in signals), and bugs (circuit breakers prevent runaway losses).
How do I handle API downtime?
Log the failure and pause trading. Do not retry aggressively. Resume automatically when the API recovers. Most profitable opportunities can wait a few minutes.
Was Polymarket V2 a breaking change for order books?
Yes, at the cutover: matching stopped, all resting limit orders were canceled, and every order book was rebuilt. Account balances and open positions carried over automatically, and conditional token IDs did not change.
Does my historical order-book dataset break across the V2 cutover?
No. Prices stay quoted 0-1, the L2 snapshot shape is unchanged, and archives read as one continuous series. The only adjustment is fee modeling: apply V1 fee semantics before April 28, 2026 and V2 taker-only fees after it.
Do I need py-clob-client-v2 or @polymarket/clob-client-v2 to trade?
Yes. V1 packages and V1-signed orders are no longer accepted on production; pre-V2 clients received HTTP 503 cancel-only responses. The constructor also changed to an options object with chain instead of chainId.
Is collateral still USDC on Polymarket?
You still deposit and withdraw USDC, but settle on-chain in pUSD, Polymarket's ERC-20 redeemable 1:1 for native USDC. API traders must wrap USDC.e into pUSD before placing V2 orders and approve the V2 exchange contracts.
Did Polymarket V2 reduce slippage?
No. V2 fixed nonce- and balance-related failed fills, but it did not change order-book depth. Spreads and slippage are structurally the same after the upgrade.