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.

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 ProtectionConfigurable max_slippage_bps on market orders
Limit OrdersGTC, IOC time-in-force with sub-second matching engine
Batch OrdersUp to 50 orders in a single request (tier-dependent)
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 URLs

EnvironmentURL
Productionhttps://api.polysimulator.com/v1
Local Devhttp://localhost:8000/v1

One Config Change to Go Live

1

Build with PolySimulator

Develop and test your bot against the virtual API with a simulated $1,000 balance.
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 MCP-enabled. AI coding assistants like Cursor, Windsurf, and Claude Desktop can query the API schema directly:
# Add to your Cursor MCP settings
npx @mintlify/mcp@0.1.3 polysimulator
Your AI assistant will then be able to answer questions 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”

What’s Next?