Skip to main content

PolySimulator HFT API v1

Build, test, and deploy prediction market trading bots in a risk-free environment powered by real-time Polymarket data. When you’re ready, switch to live trading by changing a single environment variable.

Quick Start

Get your API key and place your first trade in under 2 minutes.

API Reference

Interactive playground — test every endpoint with your API key.

Example Bot

Copy-paste a working Python trading bot and start experimenting.

Why PolySimulator?

FeatureDescription
Real DataLive mid-prices, bids, asks from Polymarket’s CLOB order book
Book WalkingMarket orders fill against real order book depth — no infinite liquidity
Slippage Protectionprice field acts as worst-price limit — identical to Polymarket
Limit OrdersGTC, IOC time-in-force with sub-second matching engine
Batch OrdersUp to 25 orders per request (Enterprise tier; tier-dependent — free=1, pro=5, pro_plus=10, enterprise=25; see GET /v1/keys/tiers)
WebSocket FeedsReal-time price ticks and execution notifications
OHLCV CandlesHistorical candlestick data for backtesting
CLOB-Compatible/v1/clob/order mirrors Polymarket’s schema — URL-swap migration
String NumericsAll price/size/balance values are strings — no float precision loss

Architecture Overview

                       ┌─────────────────────────┐
                       │    Your Trading Bot     │
                       │   (REST + WebSocket)    │
                       └────────────┬────────────┘

                       ┌────────────▼────────────┐
                       │  PolySimulator API v1   │
                       │  FastAPI + Redis + PG   │
                       └────────────┬────────────┘

              ┌─────────────────────┼─────────────────────┐
              │                     │                     │
    ┌─────────▼─────────┐ ┌─────────▼─────────┐ ┌─────────▼─────────┐
    │    PostgreSQL     │ │       Redis       │ │    Polymarket     │
    │    (Supabase)     │ │   (Price Cache)   │ │   CLOB + Gamma    │
    └───────────────────┘ └───────────────────┘ └───────────────────┘

Base URL

EnvironmentURL
Productionhttps://api.polysimulator.com
Endpoints are mounted under /v1 — append the version + path to the base, e.g. GET https://api.polysimulator.com/v1/health. (The one documented exception is /api/beta/cohort-status.) Keep the base URL without /v1 so each path can prepend its own /v1 — that’s the convention the Quick Start and API Reference use.

One Config Change to Go Live

1

Build with PolySimulator

Develop and test your bot against the virtual API with a simulated API wallet (10,000onPro,10,000 on Pro, 25,000 on Pro+; Free-tier keys are read-only with no API wallet).
2

Validate Strategy

Review your portfolio, trade history, and equity curve to confirm your edge.
3

Switch to Live

Set TRADING_MODE=live and add your Polymarket credentials. Same API, real money.
The /v1/clob/order endpoint uses the same schema as Polymarket’s real CLOB API. When migrating to live, you can even point your bot directly at clob.polymarket.com with zero code changes.

AI Agent Integration (MCP)

PolySimulator docs are indexed for two of the most common AI-coding-tool integrations. Either gives Cursor, Windsurf, Claude Desktop, Continue, and similar assistants live access to the current API schema.

Mintlify MCP

# Add to your AI tool's MCP server config
npx @mintlify/mcp@latest polysimulator

Context7

The docs are also published to Context7 (verified, trust score 7.5+). If your tool already has Context7 wired up, append use context7 to any prompt and the latest PolySimulator docs are pulled into the conversation:
how do I place a CLOB-compatible BUY order on PolySimulator? use context7
In Cursor / Claude Code, just install the Context7 MCP server once (see context7.com/install) — no per-project setup. Either MCP path lets you ask things like:
  • “Write a Python script to place a limit order on PolySimulator”
  • “What rate limits apply to the free tier?”
  • “Show me the WebSocket price feed message format”
  • “How do I migrate a @polymarket/clob-client bot to PolySimulator?”

What’s Next?

Authentication

Learn how API key auth works and create your first key.

Place a Trade

Execute market and limit orders with string-precision numerics.

WebSocket Feeds

Subscribe to real-time price updates and execution notifications.

Error Handling

Handle rate limits, errors, and build retry strategies for your bot.