Paper-trade Polymarket prediction markets — scan for opportunities using TAIL, BONDING, and SPREAD strategies, simulate trades, and track portfolio performance.
Resources
1Install
npx skillscat add spoonbobo/trinity/polymarket-autopilot Install via the SkillsCat registry.
Polymarket Autopilot (Paper Trading)
Scan Polymarket prediction markets for opportunities and simulate trades without risking real money.
All market data is fetched from public APIs (no API keys or wallet required).
Scan Markets
uv run {baseDir}/scripts/scan_markets.py --strategy all --limit 50Filter by strategy:
uv run {baseDir}/scripts/scan_markets.py --strategy tail --min-volume 10000 --limit 30
uv run {baseDir}/scripts/scan_markets.py --strategy bonding --min-liquidity 5000
uv run {baseDir}/scripts/scan_markets.py --strategy spread --jsonFlags: --strategy tail|bonding|spread|all, --limit N, --min-volume N, --min-liquidity N, --json.
Paper Trade
Open a trade (requires token ID from scan output):
uv run {baseDir}/scripts/paper_trade.py \
--market "Will BTC hit 100k by June?" \
--token-id <clob_token_id> \
--direction YES --amount 200 --strategy TAILClose a trade by ID:
uv run {baseDir}/scripts/paper_trade.py --close 1List open trades:
uv run {baseDir}/scripts/paper_trade.py --listReset portfolio:
uv run {baseDir}/scripts/paper_trade.py --resetStarting capital defaults to $10,000. Override with --capital 50000 on first run.
Database: ~/.openclaw/workspace/polymarket-paper.db (override with --db).
Portfolio
uv run {baseDir}/scripts/portfolio.pyWith live prices (fetches current CLOB midpoints for unrealised P&L):
uv run {baseDir}/scripts/portfolio.py --resolveJSON output for programmatic use:
uv run {baseDir}/scripts/portfolio.py --resolve --format jsonShow closed trade history:
uv run {baseDir}/scripts/portfolio.py --resolve --historyStrategies
| Strategy | Logic | When to use |
|---|---|---|
| TAIL | Follow strong trends: probability > 60% or < 40% with volume | Momentum plays on clear favourites or underdogs |
| BONDING | Contrarian: wide bid-ask spread (>8%) signals overreaction | Buy uncertainty when markets panic |
| SPREAD | Arbitrage: YES + NO midpoints sum > 1.02 | Exploit mispriced complementary outcomes |
The scanner detects opportunities; you (or a cron) decide which trades to execute.
Auto-Resolve Settled Markets
Check if any open paper trades have resolved and close them automatically:
uv run {baseDir}/scripts/resolve.pyPreview what would be resolved without changing the database:
uv run {baseDir}/scripts/resolve.py --dry-runThis enables a fully autonomous cron loop: scan -> trade -> resolve -> report.
Backtest Strategies
Replay strategies against historical closed markets to tune thresholds:
uv run {baseDir}/scripts/backtest.py --limit 100 --bet-size 100Test a specific strategy:
uv run {baseDir}/scripts/backtest.py --strategy tail --limit 200JSON output with full signal details:
uv run {baseDir}/scripts/backtest.py --strategy all --limit 150 --jsonShows win rate, average P&L, top wins/losses, and simulated dollar returns per strategy.
News Scanner
Cross-reference breaking news with open Polymarket markets:
uv run {baseDir}/scripts/news_scanner.py --limit 50Custom RSS feeds:
uv run {baseDir}/scripts/news_scanner.py --feeds "https://feeds.bbci.co.uk/news/rss.xml,https://rss.nytimes.com/services/xml/rss/nyt/World.xml"Lower the keyword match threshold for more results:
uv run {baseDir}/scripts/news_scanner.py --min-relevance 1 --jsonDefault feeds: BBC News, NYT, Reuters, Google News. No API keys required.
Typical Workflow
- Scan for opportunities:
uv run {baseDir}/scripts/scan_markets.py --json - Check news for information edge:
uv run {baseDir}/scripts/news_scanner.py - Open a paper trade:
uv run {baseDir}/scripts/paper_trade.py -m "..." -t <id> -d YES -a 100 -s TAIL - Monitor:
uv run {baseDir}/scripts/portfolio.py --resolve - Auto-close settled markets:
uv run {baseDir}/scripts/resolve.py - Review performance:
uv run {baseDir}/scripts/portfolio.py --resolve --history - Tune strategies with backtesting:
uv run {baseDir}/scripts/backtest.py --limit 200
Cron Setup
Schedule scans every 15 minutes using OpenClaw cron:
cron add "*/15 * * * *" "Scan Polymarket for opportunities and report findings. Use the polymarket-autopilot skill." --name "polymarket-scan"Auto-resolve settled markets every hour:
cron add "0 * * * *" "Resolve any settled Polymarket paper trades using the polymarket-autopilot skill." --name "polymarket-resolve"Daily morning summary at 8 AM:
cron add "0 8 * * *" "Show my Polymarket paper portfolio with live prices, resolve any settled trades, and post a summary." --name "polymarket-daily"Discord Reports
Post portfolio summaries to Discord using a webhook:
curl -X POST "$DISCORD_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d "{\"content\": \"$(uv run {baseDir}/scripts/portfolio.py --resolve 2>/dev/null)\"}"Set DISCORD_WEBHOOK_URL in your environment or openclaw.json.
Notes
- Paper trading only. No real money, no wallet keys, no on-chain transactions.
- Market data comes from Polymarket's public Gamma API and CLOB API (no authentication).
- News feeds are standard RSS/Atom (BBC, NYT, Reuters, Google News) -- no API keys.
- Database is local SQLite at
~/.openclaw/workspace/polymarket-paper.db. - Scanner makes ~2 API calls per market; use
--limitto control scan breadth and rate. - CLOB prices are real-time midpoints used for entry/exit pricing.
- The agent can compose these scripts freely -- scan, news, trade, resolve, backtest, review.