🤖 BUILT FOR TRADING BOTS

Test your Polymarket strategies with zero risk.

Polymocket is a drop-in sandbox for Polymarket trading bots. Real prediction markets, real on-chain settlement on Polygon Amoy testnet, free mock collateral, fully automated. Validate your strategy here, then graduate to real capital with confidence.

🔌

Drop-in API parity

REST + WebSocket endpoints match Polymarket's CLOB API surface. Repoint your bot's base URL to api.polymocket.com and trade. Same EIP-712 order shape, same fill semantics.

💧

Free mock collateral

Hit POST /faucet/drip to receive 10,000 PMUSDC instantly. Per-wallet rate limit 24h. No real-money exposure, no signup forms, no captchas. Wallet-native onboarding.

Real Polygon Amoy

Not a fork, not a sim — actual Polygon Amoy testnet with full mempool fidelity. Strategies that work here translate cleanly to Polygon mainnet because the execution engine is the same.

How it works

Wallet-native flow. Sign orders client-side with your existing tooling. We settle on-chain on your behalf — no gas required from your bot.

01

Drip collateral

POST /faucet/drip with your wallet → 10k PMUSDC instantly.

02

Sign order

EIP-712 typed-data sign against the Polymocket CTFExchange domain.

03

Submit to CLOB

POST /orders with signed bytes. Get the orderHash + fill stream via WS.

04

Settled on-chain

Our settlement worker submits matchOrders to Amoy. CTF balances update.

Quickstart

Five minutes from clone to first signed order. Python and TypeScript SDKs coming soon — for now, hit the REST surface directly.

# 1. Drip 10k PMUSDC to your wallet
curl -X POST https://api.polymocket.com/faucet/drip \
  -H "Content-Type: application/json" \
  -d '{"wallet":"0xYOUR_WALLET"}'

# 2. List markets you can trade
curl https://api.polymocket.com/markets

# 3. Sign + submit an order (Node.js + viem)
import { signTypedData } from 'viem/accounts';

const order = {
  maker: '0xYOUR_WALLET',
  tokenId: 1n,
  makerAmount: 50_000_000n,  // 50 USDC (6 decimals)
  takerAmount: 100_000_000n, // 100 YES tokens
  side: 0,                   // 0 = BUY, 1 = SELL
  expiration: 9999999999n,
  // ...full Order struct, see docs
};

const sig = await signTypedData({
  domain: { name: 'Polymocket CTF Exchange', version: '1', chainId: 80002, verifyingContract: '0xEXCHANGE' },
  types: ORDER_TYPES,
  primaryType: 'Order',
  message: order,
  privateKey: '0x...',
});

await fetch('https://api.polymocket.com/orders', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ order, signature: sig }),
});

# 4. Stream fills (WS)
const ws = new WebSocket('wss://api.polymocket.com/ws');
ws.send(JSON.stringify({ type: 'subscribe', channel: 'trades', params: { tokenId: '1' } }));

What's under the hood

On-chain

  • Polygon Amoy testnet · chainId 80002
  • CTFExchange · CLOB matching contract
  • Conditional Token Framework (ERC-1155)
  • NegRiskAdapter · multi-outcome markets
  • PolymocketUSDC · 6-decimal mock collateral
  • EIP-712 signed orders · same shape as Polymarket

Off-chain

  • Price-time priority CLOB · per-token mutex
  • EIP-712 + EIP-1271 signature verification
  • Postgres · snapshot+WAL replay on boot
  • WebSocket fan-out · backpressure-bounded
  • In-process settlement worker · advisory-lock single-writer
  • Reorg defence + crash recovery