Mock Trading API
Polymarket Mock Trading API
Polymarket has no sandbox, testnet, or paper-trading API — trades settle with real funds from the first fill. PolyTrackers provides the missing piece: a virtual mock wallet seeded with $10,000 in virtual funds, priced against live Polymarket odds, reachable over a REST / OpenAPI surface for public and paid reads plus an MCP server for the mock-trade flow. Test a strategy programmatically before you ever risk capital.
Driving this from an AI agent? Install the PolyTrackers skill with one command, then use the mock-trade tools below:
npx skills add polytrackers/polymarket-copy-trading-skillOfficial repo: github.com/polytrackers/polymarket-copy-trading-skill.
How to start paper trading Polymarket programmatically
- Register a free PolyTrackers account. Create a free account at /register. No card is required. Every account gets one $10,000 virtual mock wallet.
- Generate an Agent API Key. In your Profile, generate an Agent API Key. Every key holds signals:read for MCP read tools. Leave Paper trades (mock:trade) switched on so your agent can commit mock trades. Each account keeps one active key; direct REST bearer signal endpoints require a paid key.
- Read live market data and signals. Call GET /api/clob/price (public) for live odds. Use a paid Agent API Key for GET /api/anomalies over REST, or use Free MCP read tools with signals:read for the free programmatic signal path. Point codegen at /api/openapi.json.
- Run the mock-trade flow over MCP. Connect an MCP client to https://polytrackers.com/api/mcp. Call pt_mock_price_get for the live price, pt_mock_trade_place to place the simulated order, and pt_mock_analytics_get to score the result. The write tools need the mock:trade scope, which a key on any plan can hold. You can also place mock trades in the browser at /mock-trading.
REST quickstart
Live market prices are public — no key required:
# Live CLOB price — public, no key required
curl "https://polytrackers.com/api/clob/price?conditionId=<CONDITION_ID>&outcome=YES"Direct REST signal reads authenticate with a paid Agent API Key. Free Agent API Keys use MCP read tools instead of the REST bearer endpoint for anomaly signals:
# Paid REST signal read (Pro/Elite Agent API Key, signals:read scope)
curl "https://polytrackers.com/api/anomalies?limit=50" \
-H "Authorization: Bearer ptk_..."Generate a typed client from the machine-readable contract at /api/openapi.json.
Node
// Node 18+ (global fetch). Paid Agent API Key, signals:read scope.
const res = await fetch(
"https://polytrackers.com/api/anomalies?limit=50",
{ headers: { Authorization: `Bearer ${process.env.POLYTRACKERS_API_KEY}` } },
);
if (!res.ok) throw new Error(`PolyTrackers ${res.status}`);
const { data } = await res.json();
console.log(data); // Paid REST response; tier shaping still applies after auth.Python
# Python 3 (requests). Paid Agent API Key, signals:read scope.
import os, requests
res = requests.get(
"https://polytrackers.com/api/anomalies",
params={"limit": 50},
headers={"Authorization": f"Bearer {os.environ['POLYTRACKERS_API_KEY']}"},
timeout=15,
)
res.raise_for_status()
print(res.json()["data"]) # Paid REST response; tier shaping still applies after auth.The programmatic mock-trade flow (MCP)
Placing a simulated order is an agent action, so it runs over the MCP server at https://polytrackers.com/api/mcp rather than a REST body. See the MCP server setup guide for client config. The tool sequence:
pt_mock_wallet_create(Every plan (mock:trade))
Create a fresh virtual wallet inside your plan's wallet limit. Any key with the paper-only mock:trade scope can call this committed mock-write tool. (Free accounts get one $10,000 mock wallet; you can also create it in the browser at /mock-trading.)pt_mock_price_get(Free (signals:read))
Fetch the live YES/NO price for the market you want to test against, sourced from Polymarket's own data.pt_mock_trade_place(Every plan (mock:trade))
Place a simulated order sized by notional cost in USD/USDC against the live price. No real capital moves; this committed mock write needs the mock:trade scope, which a Free, Pro or Elite key can hold.pt_mock_analytics_get(Free (signals:read))
Read the wallet's realized/unrealized P&L summary to score the strategy.pt_mock_wallets_list(Free (signals:read))
Enumerate the caller's mock wallets to compare separate strategies over time.
The mock write tools (pt_mock_wallet_create, pt_mock_trade_place) require the paper-only mock:trade scope. A Free, Pro or Elite key holds it when you leave Paper trades switched on at key creation, and it never moves real funds. The read tools work with any key, and you can also place mock trades in the browser at /mock-trading.
The free-tier path
- Register at /register — free, no card required.
- One $10,000 virtual mock wallet per free account.
- One Agent API Key with
signals:readand, when you switch Paper trades on,mock:trade, rate-limited to 10 requests/min per tool and 200 requests/day shared across all tools. - Public price reads over REST, and authenticated read and mock-trade tools over MCP. Free ptk_ keys do not call the paid REST
/api/anomaliesbearer endpoint directly. No upgrade is needed for agent-driven committed mock trades. Elite addsagent:fullfor wallet deletion, auto-trade and copy settings.
Why mock-first for copy trading
Before you mirror a whale with real funds, validate them on paper. Pull a trader or whale profile, mirror their positions into a mock wallet, and let the strategy play out against live odds. If the simulated P&L holds up across enough resolved markets, you have evidence — not a hunch — before switching the same roster to live copying. Poly-alternatives that copy with real funds from the first fill give you no such dry run.
Rate limits
| Surface | Limit | Scope |
|---|---|---|
| Free Agent API Key (MCP read and mock-trade tools) | 10 requests/min per tool · 200 requests/day shared | Per API key |
| GET /api/anomalies (REST bearer) | Requires a paid Agent API Key; Free ptk_ keys return 401 | Paid REST signal read |
| GET /api/clob/price | Public read, no key required | Cached public read |
| Trade execution (real funds) | 10/min per user · 20/min per API key | Per user + per key |
REST and MCP request-level throttles include a Retry-After header and a structured JSON body. MCP tool-level throttles return JSON-RPC retry metadata such as retry_after_seconds and _meta.rate_limit instead; back off from the signal your client receives. The full contract lives in the API docs.
Going live
Mock trading is free. When a strategy earns real capital, you can flip the same tracked roster to live copying, which mirrors trades with real funds from your connected wallet. Real-money trades — live copies included — carry a 0.25% PolyTrackers fee per trade, applied through Polymarket's builder-fee mechanism and separate from any fees Polymarket itself charges. Paper (mock) copy trading remains free. Real execution over the API additionally requires a trade:execute key, which every plan can switch on at key creation, or an Elite agent:full key, and passes through a bound pt_trade_preflight token before pt_trade_execute.
MCP alternative
Prefer to wire this into Claude, Cursor, or Codex directly? The same mock-trade tools are exposed over the MCP server with copy-paste client configs and Agent API Key setup.
Frequently asked questions
Does Polymarket have a paper trading API?
No. Polymarket does not publish a paper-trading, mock-trading, or demo API — copying or trading happens with real funds from the first fill. PolyTrackers is an independent third-party platform that provides one: a virtual mock wallet seeded with $10,000, priced against live Polymarket odds, reachable through public price REST reads, paid REST signal reads, and an MCP server for AI agents.
Does Polymarket have a testnet?
No. Polymarket has no public testnet or sandbox environment for order placement. PolyTrackers fills that gap with mock (paper) trading: simulated orders against live market prices, so you can validate a strategy end-to-end without a sandbox and without risking capital.
Can AI agents paper trade Polymarket?
Yes, through PolyTrackers, on every plan. Agents connect over the MCP server at https://polytrackers.com/api/mcp with an Agent API Key. Read tools (pt_mock_price_get, pt_mock_analytics_get, pt_mock_wallets_list, pt_mock_wallet_get) work with any key. The committed mock write tools that create a wallet and place simulated orders (pt_mock_wallet_create, pt_mock_trade_place) need the paper-only mock:trade scope, which Free, Pro and Elite accounts can all switch on when they create the key. You can also place mock trades in the browser at /mock-trading.
Is the mock trading API free?
Yes. A free account (no card required) generates one Agent API Key, rate-limited to 10 requests per minute per tool and 200 requests per day shared across all tools, and gets one $10,000 mock wallet. Every key holds signals:read for the read tools. With Paper trades (mock:trade) switched on, the same free key places committed mock trades programmatically through pt_mock_trade_place. Direct REST signal reads over bearer auth need a paid key.
Related guides
Test your Polymarket strategy in code — no real money
Register free to read live odds over public REST and signals over MCP, then let your agent paper trade with the mock:trade scope. Committed programmatic mock writes work on every plan.