- → OpenClaw connects to Polymarket via REST API — no custom plugin required, just a credential skill file
- → Your agent scans market odds, compares them to its probability estimate, and submits orders when edge exceeds your threshold
- → Wallet signing is handled via encrypted secrets — never store private keys in plaintext config
- → Position-size limits and cooldown parameters prevent runaway exposure from a single bad signal
- → This is not financial advice — prediction markets carry real risk of total position loss
Prediction markets are the most honest signal source on the internet. Polymarket has handled over $1 billion in volume. The problem: manually monitoring hundreds of markets 24/7 is impossible. An OpenClaw agent does it automatically — reading news, forming probability estimates, comparing them to live odds, and placing orders when the gap is wide enough to act.
How the OpenClaw Polymarket Bot Works
The architecture is straightforward. Your OpenClaw agent runs a loop with three phases: market scanning, probability estimation, and order execution. Each phase is a separate skill that hands off to the next.
Market scanning pulls active markets from Polymarket's CLOB API and filters by your criteria — minimum volume, maximum days to resolution, specific categories. Probability estimation asks your LLM to reason about the current news context for each market. Order execution compares the LLM estimate to the live market price and submits an order if the expected value is positive and above your minimum edge threshold.
Here's where most people get confused: the LLM is not predicting outcomes. It's estimating probabilities based on available information. That's a meaningful distinction — the bot is doing what a sharp bettor does manually, just faster and at scale.
Polymarket is not available to US-based users. This guide is for informational purposes. Verify your jurisdiction's laws on prediction markets before running any automated trading system. This is not financial or legal advice.
Prerequisites
Before writing a single line of config, get these in order:
- OpenClaw v2.1+ installed and running
- A funded Polygon wallet with at least $50 USDC for testing
- Polymarket API key (requires account verification)
- An LLM with strong reasoning — GPT-4o or Claude Sonnet work best here
- A news feed skill already configured in OpenClaw (NewsAPI or similar)
The news feed matters more than most people expect. Your bot's edge comes from processing news faster than the market adjusts. A 5-minute news lag turns a 60% win rate into a 48% win rate.
API & Wallet Setup
Store your credentials in OpenClaw's encrypted secrets store, not in config files.
# Add secrets via CLI — never paste into config.yaml
openclaw secrets set POLYMARKET_API_KEY "your-api-key-here"
openclaw secrets set POLYGON_PRIVATE_KEY "your-wallet-private-key"
openclaw secrets set POLYGON_ADDRESS "your-wallet-address"
# Verify they're stored correctly
openclaw secrets list
# Output:
# POLYMARKET_API_KEY [encrypted, set 2025-02-01]
# POLYGON_PRIVATE_KEY [encrypted, set 2025-02-01]
# POLYGON_ADDRESS [encrypted, set 2025-02-01]
Now create the Polymarket skill file at ~/.openclaw/skills/polymarket.yaml:
name: polymarket-trader
version: "1.0"
description: "Scans Polymarket for mispriced odds and executes positions"
connections:
polymarket:
base_url: "https://clob.polymarket.com"
api_key: "${POLYMARKET_API_KEY}"
wallet_address: "${POLYGON_ADDRESS}"
private_key: "${POLYGON_PRIVATE_KEY}"
chain_id: 137 # Polygon mainnet
parameters:
min_volume_usd: 10000 # ignore thin markets
max_days_to_resolution: 30 # no long-dated positions
min_edge_threshold: 0.05 # only act on 5%+ edge
max_position_usd: 50 # per-market limit
max_total_exposure_usd: 500 # portfolio limit
scan_interval_minutes: 5
cooldown_minutes: 15 # wait between trades on same market
Set max_position_usd to $10 and run for a week before increasing. You'll find bugs in your probability estimation logic that cost nothing to fix when position sizes are minimal.
Agent Configuration
The agent prompt is where the bot's edge actually lives. Generic prompts produce generic probability estimates. Specific prompts that encode your research process outperform significantly.
Here's a production-tested system prompt structure for the probability estimation step:
system: |
You are a prediction market analyst. For each market, you will:
1. Read the market question and resolution criteria carefully
2. Search recent news (last 48 hours) for directly relevant information
3. Identify the base rate for similar events historically
4. Adjust for current specific signals (positive or negative)
5. Output a probability estimate as a decimal (0.0 to 1.0)
6. Output a confidence score (low/medium/high)
Only output high confidence estimates when you have found
specific, recent, directly relevant news. Default to the
market price when uncertain.
Format: {"probability": 0.73, "confidence": "high", "reasoning": "..."}
That reasoning field matters. Log it. Review it weekly. You'll find systematic biases — the model tends to overweight dramatic recent news, for instance — and you can correct them in the prompt.
Market Scanning Logic
Scanning every market is wasteful. Good filters cut 90% of markets before the LLM sees them.
As of early 2025, the highest-edge opportunities on Polymarket consistently appear in these categories: near-term political events (within 7 days of resolution), breaking news events where prices lag by 10+ minutes, and markets where volume spiked recently but odds haven't moved yet.
| Filter | Recommended Value | Why |
|---|---|---|
| Min Volume (24h) | $5,000 | Thin markets have wide spreads that eat your edge |
| Max Days to Resolution | 14 days | Longer markets have too many unknown variables |
| Spread Max | 3 cents | Wide spreads require larger edge to be profitable |
| Min Market Age | 1 hour | Brand-new markets are often illiquid and volatile |
Position Management
This is the part that most bot builders ignore until they blow up a position. The probability estimate is only half of the trade decision. The other half is sizing.
Use a fractional Kelly criterion approach. If your edge is 8% on a binary market, Kelly says bet 8% of your bankroll. That's too aggressive for an automated system. Use quarter-Kelly (2% of bankroll per trade) and cap any single position at $50 until you have 100+ resolved trades to validate your model.
The OpenClaw parameters that matter most here:
- max_position_usd — absolute dollar cap per market regardless of Kelly calculation
- max_total_exposure_usd — total portfolio cap; the bot stops opening new positions once reached
- cooldown_minutes — prevents the bot from adding to a losing position before you review it
- min_edge_threshold — your minimum required edge; 5% is the floor, 8% is more conservative
Sound familiar? These are the same parameters a risk manager at a trading firm would set. The difference is that your OpenClaw bot enforces them automatically — no FOMO, no manual override at 2am.
Common Mistakes
Here's what we've seen consistently break Polymarket bots built on OpenClaw:
Using stale news feeds. If your news skill has a 15-minute cache, your bot is 15 minutes behind. Markets move in seconds on breaking news. Use a real-time feed or accept that your edge is in slower-moving markets.
Ignoring resolution criteria. Polymarket markets resolve on very specific criteria. Your agent needs to read the full resolution rules, not just the market title. A market titled "Will X happen?" might resolve "No" on a technicality your agent missed.
Not logging reasoning. When your bot makes a bad trade, you need to know why. Log the full LLM reasoning output for every order. Review losing trades weekly and adjust your system prompt.
Over-trading. The cooldown parameter exists for a reason. Bots without cooldowns will re-enter the same market five times in an hour as the LLM changes its estimate with each new news item. Set cooldown_minutes: 60 to start.
Skipping paper trading. Run the bot with dry_run: true for at least two weeks before putting real money in. OpenClaw logs every would-be order in dry run mode so you can review the full trade history.
Frequently Asked Questions
Does OpenClaw connect to Polymarket natively?
OpenClaw connects to Polymarket via the Polymarket REST API and CLOB. You configure credentials in your agent's skill file. No native Polymarket plugin ships by default, but the standard REST connector handles all API calls cleanly without additional dependencies.
Do I need a crypto wallet to use OpenClaw with Polymarket?
Yes. Polymarket requires a funded Polygon wallet. Your OpenClaw agent uses the wallet's private key — stored as an encrypted secret — to sign and submit orders. Never store private keys in plaintext config files or environment variables visible in your shell history.
Can OpenClaw read Polymarket market probabilities automatically?
Yes. The agent polls Polymarket's REST API for current odds, volume, and liquidity on any market you specify. You can schedule polls every five minutes or trigger them on a news event detected by a separate research skill connected in the same pipeline.
Is automated Polymarket trading legal?
Polymarket restricts access for US-based users. Automated trading is permitted by the platform for non-restricted users. Always verify your jurisdiction's laws on prediction markets before running any bot. This is not legal advice — consult a lawyer in your jurisdiction.
How does OpenClaw avoid overtrading on Polymarket?
Add a position-size cap and cooldown parameter in your skill config. Set max_position_pct to limit exposure per market, and min_edge_threshold to only act when the bot finds sufficient expected value. The cooldown prevents re-entry on the same market during volatile periods.
What LLM works best for Polymarket analysis with OpenClaw?
GPT-4o and Claude Sonnet perform well for news-to-probability reasoning tasks. For high-frequency market scans, use a cheaper model like Gemini Flash as the triage layer, then escalate ambiguous cases to a stronger model. This cuts API costs by roughly 70% on active scanning sessions.
Can I run multiple Polymarket strategies simultaneously with OpenClaw?
Yes. Launch separate named agents for each strategy, each with its own skill file, market filter list, and position limits. OpenClaw's multi-agent orchestrator keeps them isolated while sharing a single wallet connection and respecting the combined exposure limit you set.
R. Nakamura has built and stress-tested automated prediction market systems since 2022, running live agents on Polymarket, Manifold, and Kalshi. He has documented every major failure mode so you don't have to discover them with real money on the line.