Prediction MarketsBrainClawAutomation

What Is Polymarket — and How a BrainClaw Agent Trades It 24/7

Polymarket turned “will this happen?” into a liquid, tradable price. It moved $3.7 billion in a single month, settles in stablecoins on-chain, and exposes its entire order book through a free API. That combination — a market that never sleeps plus machine-readable data — is exactly what an always-on AI agent is built for. Here is how Polymarket works, and how a BrainClaw agent runs a paper-trading autopilot on it while you sleep.

2026-06-23·9 min read

TL;DR

  • 📈 Polymarketis the world's largest prediction market — buy/sell shares in “Yes/No” outcomes where the price is the implied probability.
  • 🔌 Open API. Gamma (discovery), CLOB (order book + trading), and a Data API expose prices, volume, and spreads for free — perfect for algorithmic strategies.
  • 🤖 BrainClaw is your 24/7 OpenClaw agent: cron jobs, a database, Discord reports, and sub-agents — the runtime a trading autopilot needs.
  • 🧠 MegaBrain Gateway routes each step to the right model — cheap models for polling, frontier models for the actual call.
  • ⚠️ Start with paper trading. This guide simulates trades against live prices. No real capital, no real risk — learn the market first.

What is Polymarket?

Polymarket is a prediction market: a venue where you trade on the outcome of real-world events instead of betting against a house. Founded in June 2020 by Shayne Coplan, it runs on the Polygon network and settles every trade in USDC, the dollar-pegged stablecoin. By late 2025 it was clearing roughly $3.7 billion in 30-day volume, and after acquiring a CFTC-licensed exchange it relaunched for US users in May 2026 across 49 states.

Each market is a question with a binary outcome — “Will the Fed cut rates in July?”, “Will Bitcoin close above $150k this year?” — and two tradable shares: YES and NO. Each share pays out $1 if its outcome is correctand $0 if it isn't.

The key insight: price = probability

Because a winning share pays exactly $1, its current price reads directly as the market's implied probability. A YES share trading at $0.65means the market believes there's about a 65% chance the event happens. YES and NO prices on a fair market sum to roughly $1.00.

YES priceImplied probabilityPayout if YES winsProfit / share
$0.20~20%$1.00$0.80
$0.50~50%$1.00$0.50
$0.65~65%$1.00$0.35
$0.90~90%$1.00$0.10

This is what makes Polymarket interesting to an algorithm. Every market is a clean, numeric signal between 0 and 1. Movements in that number — driven by news, volume spikes, and overreactions — are measurable, comparable across thousands of markets, and available in real time.

Why it's built for automation: the API

Polymarket exposes its market data through three free APIs. You don't need permission, a partnership, or a paid data feed to read the entire book.

APIWhat it gives you
Gamma APIRead-only discovery: market metadata, questions, categories, status
CLOB APIThe order book itself — best bid/ask (/price), full book (/book), midpoint (/midpoint), spreads, price history. Trading via /order requires authentication.
Data APIPositions, trades, activity, holders, open interest, leaderboards, and analytics

Under the hood Polymarket uses a hybrid-decentralized CLOB (central limit order book): an off-chain operator hosts the book and matches orders, while settlement happens on-chain via smart contracts. Official SDKs exist for TypeScript (clob-client) and Python (py-clob-client), and Polymarket even publishes an official agent-skills repo for building bots. For a read-only paper-trading autopilot, plain HTTP requests to the public endpoints are enough.

Where BrainClaw comes in

A trading autopilot needs four things: it must run continuously, remember state, act on a schedule, and report back to you. A chatbot can't do any of that. A BrainClaw agent can — it's a hosted OpenClaw instance with the full runtime around it:

Autopilot needs…BrainClaw provides
Run 24/7A dedicated always-on VM — your agent never goes to sleep
Poll markets on a scheduleCron jobs (e.g. every 15 minutes) built into the runtime
Track trades & P&LPersistent storage + shell access to run Postgres or SQLite
Analyze many markets at onceSub-agent spawning for parallel market analysis
Report resultsNative Telegram, Slack & Discord integrations
Pick the right model per stepMegaBrain Gateway — 500+ models behind one endpoint

The model-routing piece matters more than it looks. Polling prices and formatting a Discord summary are cheap, mechanical tasks — route them to a fast, low-cost model. Reasoning about whether a 12% overnight swing is a real signal or noise is worth a frontier model. With Auto Model, BrainClaw makes that split for you instead of paying flagship prices for every API poll.

Three starter strategies

The original Polymarket Autopilot use-case ships three simple, legible strategies. They're not magic — they're starting points you refine against your own logged results.

StrategyIdeaTrigger example
TAIL (trend-following)Ride clear momentum when conviction and volume agree>60% probability + a volume spike
BONDING (contrarian)Fade overreactions when a market lurches on newsA sudden drop >10% on a headline
SPREAD (arbitrage)Catch mispricing when the book is internally inconsistentYES + NO price > 1.05

Setting it up (paper trading)

Everything below runs against live prices but with simulated money. The agent reads the real order book, decides what it would do, and records it. You get all the learning, none of the risk.

1. Create the paper-trading tables

From your BrainClaw shell, spin up Postgres (or SQLite) and create two tables:

CREATE TABLE paper_trades (
  id          SERIAL PRIMARY KEY,
  market_id   TEXT,
  market_name TEXT,
  strategy    TEXT,
  direction   TEXT,         -- YES | NO
  entry_price DECIMAL,
  exit_price  DECIMAL,
  quantity    DECIMAL,
  pnl         DECIMAL,
  timestamp   TIMESTAMPTZ DEFAULT NOW()
);

CREATE TABLE portfolio (
  id          SERIAL PRIMARY KEY,
  total_value DECIMAL,
  cash        DECIMAL,
  positions   JSONB,
  updated_at  TIMESTAMPTZ DEFAULT NOW()
);

2. Connect a Discord channel

In the BrainClaw dashboard, connect Discord and create a channel like #polymarket-autopilot for daily reports. Telegram or Slack work too.

3. Give your agent the autopilot prompt

You are a Polymarket paper-trading autopilot. Run on a cron every 15 minutes:

1. Fetch current market data from the Polymarket CLOB + Gamma APIs
   (prices, volume, spreads).
2. Evaluate opportunities with these strategies:
   - TAIL:    follow strong trends (>60% probability + volume spike)
   - BONDING: contrarian plays on overreactions (sudden drops >10% on news)
   - SPREAD:  arbitrage when YES + NO > 1.05
3. Record paper trades in the database (starting capital: $10,000).
4. Update portfolio state and open positions.

Every morning at 8 AM, post a summary to Discord #polymarket-autopilot:
- Yesterday's trades (entry/exit, P&L)
- Current portfolio value and open positions
- Win rate and per-strategy performance
- Market insights and what to watch

Use sub-agents to analyze multiple markets in parallel during
high-volume periods.

NEVER use real money. This is paper trading only.

4. Iterate.After a week of logs you'll see which strategy actually earns its keep. Tighten thresholds, add a strategy, or have the agent backtest historical price data before it changes its own parameters.

Before you ever go live:prediction-market trading carries real financial and legal risk, and availability depends on where you live. Polymarket is CFTC-regulated in the US but restricted or unavailable in many jurisdictions. Paper trading is for learning market behavior — not a forecast of real-money returns. Do your own research and never risk money you can't afford to lose. Nothing here is financial advice.

Why this is a good first BrainClaw project

Even if you never touch real capital, the Polymarket autopilot is one of the clearest ways to feel what an autonomous agent does differently from a chatbot. It runs without you. It keeps state across days. It wakes you with a report instead of waiting for a prompt. And it exercises the whole BrainClaw stack at once — cron, database, sub-agents, messaging, and smart model routing — on a problem with a clean numeric signal and a free data source.

That's a template you can repoint at anything with an API and a schedule: monitoring on-chain wallets, tracking sports lines, watching your own product metrics. Polymarket just happens to be an unusually clean place to start.

MegaBrain Gateway

500+ models. One API. No markup.

Use in Claude Code, Cline, Cursor, or any coding agent.

Try MegaBrain free →

Newsletter

Stay in the loop

Get the latest model comparisons and guides — no spam, unsubscribe anytime.