Virtual → Live Migration
PolySimulator is designed so your entire bot codebase works unchanged when switching from virtual (paper) trading to live (real-money) trading on Polymarket.Comparison
| Aspect | Virtual Mode | Live Mode |
|---|---|---|
| Money at risk | None (simulated $1,000) | Real funds |
| Order execution | Local ledger | Polymarket CLOB |
| Market data | Real prices from Polymarket | Real prices from Polymarket |
| API surface | Full HFT API v1 | Same endpoints |
| Settlement | Automatic on resolution | Polymarket blockchain |
Migration Steps
Test thoroughly in virtual mode
Run your bot through multiple market cycles. Verify:
- Order placement works correctly
- Error handling covers all edge cases
- P&L tracking is accurate
- WebSocket reconnection is stable
Get Polymarket API credentials
Obtain your Polymarket CLOB API credentials:
- API Key
- API Secret
- API Passphrase
Use CLOB-compatible endpoint (optional)
For bots already targeting the Polymarket CLOB API, use the CLOB compatibility endpoint which mirrors Polymarket’s schema:This means you can swap only the base URL to switch between virtual and live:
CLOB Compatibility Layer
The CLOB-compat endpoint translates between PolySimulator’s virtual ledger and Polymarket’s CLOB schema:| PolySimulator Field | CLOB Field | Notes |
|---|---|---|
market_id | token_id | Same underlying identifier |
side | side | BUY / SELL |
quantity | size | String numeric |
price | price | 0–1 range |
order_type | type | market / limit / GTC / GTD |
Rollback
To return to virtual mode:Checklist
- Bot tested across multiple market scenarios in virtual mode
- Error handling verified (network errors, rate limits, slippage)
- Polymarket API credentials obtained and secured
- Environment variables updated
- Initial live test with minimal order size
- Monitoring and alerting configured for live trading