Build a Paper Trading Bot with OpenClaw: Prediction Market Automation
Create an automated paper trading bot for prediction markets with OpenClaw. Backtest strategies, track P&L, and get daily reports - all without risking real money.
Which model do you want as default?
Which channel do you want to use?
Limited servers, only 5 left
Prediction markets like Polymarket have exploded in popularity. They offer real-time probability estimates on everything from elections to tech product launches, and the trading opportunities are constant. But manually monitoring markets, spotting mispriced contracts, and executing trades is a full-time job.
This OpenClaw workflow builds an automated paper trading system that monitors prediction markets, executes simulated trades using configurable strategies, tracks performance, and delivers daily summaries to Discord. You test and refine trading strategies without risking a single dollar, then apply what you learn to real trading when you are confident.
Why Paper Trading Matters
Real money amplifies emotions. Fear and greed make you deviate from your strategy, chase losses, and exit winners too early. Paper trading removes the emotional component so you can evaluate strategies purely on their merits.
For prediction markets specifically, paper trading helps you:
- Test strategy logic before committing capital
- Understand market behavior across different event types (politics, sports, crypto, tech)
- Build confidence in your approach through documented track records
- Iterate fast because mistakes cost nothing
The best traders paper trade new strategies for weeks or months before going live. This workflow automates that process.
What You Will Build
A complete paper trading system with four components:
- Market scanner: Monitors Polymarket API for trading opportunities every 15 minutes
- Strategy engine: Evaluates opportunities against configurable rules (trend-following, contrarian, arbitrage)
- Portfolio tracker: Logs trades, tracks positions, and calculates P&L in a database
- Daily reports: Sends morning summaries to Discord with performance metrics and insights
Skills You Need
| Component | What It Does | Required? |
|---|---|---|
| web_search / web_fetch | Fetches Polymarket API data | Built-in |
| Cron jobs | Runs the scanner on schedule | Built-in |
| SQLite or PostgreSQL | Stores trade logs and portfolio state | Built-in / install |
| Discord / Telegram | Receives daily reports | Yes (pick one) |
| Sub-agents | Analyzes multiple markets in parallel | Built-in |
No external skills needed. For more on OpenClaw's built-in capabilities, see our skills guide.
Step-by-Step Setup
Step 1: Set Up the Database
First, create the tables for tracking paper trades and portfolio state. Send this to your OpenClaw:
Create a SQLite database for paper trading with these tables:
1. paper_trades: id, market_id, market_name, strategy, direction (BUY/SELL),
entry_price, exit_price, quantity, pnl, status (OPEN/CLOSED), created_at, closed_at
2. portfolio: id, total_value, cash, positions (JSON), updated_at
3. market_snapshots: id, market_id, market_name, yes_price, no_price,
volume_24h, timestamp
Initialize the portfolio with $10,000 cash and no positions.
Step 2: Configure Trading Strategies
Define the strategies the bot will use. Here are three proven approaches for prediction markets:
Set up these paper trading strategies:
TAIL (Trend Following):
- Buy when a market moves >5% in one direction with volume spike (>2x average)
- Exit when momentum reverses or profit target hits 15%
- Stop loss at 10%
- Max position size: 5% of portfolio
BONDING (Contrarian):
- Buy when a market drops >10% suddenly on news overreaction
- Look for markets where the drop seems disproportionate to the actual news
- Exit at mean reversion (price returns to pre-drop level) or after 48 hours
- Stop loss at 15%
- Max position size: 3% of portfolio
SPREAD (Arbitrage):
- Identify markets where YES + NO prices sum to >1.05 (5% spread)
- Paper trade both sides to lock in the spread
- Exit when spread closes or market resolves
- Position size: 10% of portfolio per spread
Step 3: Start the Market Scanner
Set up the continuous monitoring loop:
You are a Polymarket paper trading autopilot. Run via cron every 15 minutes:
1. Fetch current market data from the Polymarket API:
- Active markets with >$10K volume
- Current YES/NO prices and recent price history
- 24h volume and volume changes
2. For each active market, evaluate against all three strategies (TAIL, BONDING, SPREAD)
3. If a strategy triggers:
- Execute the paper trade in the database
- Log the rationale (which strategy, what signal triggered it)
- Update portfolio positions and cash balance
4. For open positions, check exit conditions:
- Profit target hit
- Stop loss hit
- Time-based exit (for BONDING)
- Market resolved
5. Save a market snapshot for backtesting
Use sub-agents to analyze multiple markets in parallel during high-volume periods.
Never use real money. This is paper trading only.
Step 4: Set Up Daily Reports
Configure morning summaries:
Every morning at 8 AM, post a summary to Discord #trading-bot:
Portfolio Overview:
- Total value (cash + positions at market price)
- Daily P&L and cumulative P&L
- Win rate (overall and per strategy)
Yesterday's Activity:
- New trades opened (market, strategy, entry price, rationale)
- Trades closed (market, entry/exit prices, P&L, hold time)
- Markets being watched but not yet triggered
Strategy Performance:
- TAIL: win rate, average P&L per trade, best/worst trade
- BONDING: win rate, average P&L per trade, best/worst trade
- SPREAD: win rate, average P&L per trade, best/worst trade
Insights:
- Which market categories are most profitable
- Any strategy adjustments to consider
- Upcoming high-volume markets to watch
Step 5: Iterate and Improve
After a week of paper trading, review performance and adjust:
Analyze the last 7 days of paper trading:
1. Which strategy performed best?
2. What types of markets (politics, crypto, tech) were most profitable?
3. Were there missed opportunities (markets that would have been profitable
but did not trigger)?
4. Recommend specific parameter adjustments for each strategy
5. Save the analysis to memory for future reference
Understanding the Strategies
TAIL (Trend Following)
Prediction markets exhibit momentum. When a political event moves a market from 60% to 75%, it often continues to 80%+ as more information confirms the trend. TAIL captures this momentum by entering after a significant directional move with volume confirmation.
Best for: Political events, sports playoffs, earnings-related markets Weakness: Choppy markets with no clear direction
BONDING (Contrarian)
Markets overreact to news. A misleading headline can crash a market 15% in minutes, only for it to recover once people read beyond the headline. BONDING exploits these temporary mispricings.
Best for: News-driven markets, high-volatility events Weakness: Sometimes the market is right and the drop is justified
SPREAD (Arbitrage)
In efficient markets, YES + NO should equal 1.00 (minus a small fee). When the sum exceeds 1.05, there is a risk-free 5% return available by trading both sides. This is rare in liquid markets but common in newer or less-traded ones.
Best for: New markets, low-liquidity markets Weakness: Opportunities are rare and may indicate market illiquidity
Backtesting Historical Data
Paper trading tests strategies going forward, but backtesting validates them against historical data:
Using the market snapshots we have been collecting:
1. Replay the last 30 days of market data
2. Apply each strategy as if we were trading in real time
3. Calculate what the portfolio would look like today
4. Compare backtested results to actual paper trading results
5. Identify any discrepancies (strategies that should have performed
differently)
Save the backtest results as a report I can reference.
Risk Management Rules
Even in paper trading, good risk management habits matter:
Enforce these risk rules:
- Never have more than 30% of portfolio in a single market category
- Maximum 10 open positions at any time
- If daily drawdown exceeds 5%, pause new trades for 24 hours
- If weekly drawdown exceeds 10%, pause and run a strategy review
- Track correlation between positions (avoid concentrated bets)
Tips for Effective Paper Trading
-
Treat it like real money. The whole point is to build habits that transfer to live trading. If you would not make a trade with real money, do not make it on paper either.
-
Track everything. Every trade should have a documented rationale. When reviewing performance, you need to understand why you entered, not just whether it was profitable.
-
Run for at least 30 days. Short runs produce noisy results. A month of data across different market types gives you statistically meaningful performance metrics.
-
Compare to a baseline. Track what a simple "buy the most popular market" strategy would return. Your sophisticated strategies should meaningfully outperform this baseline.
-
Paper trade new strategies separately. When you want to test a new approach, create a separate paper portfolio. Do not contaminate existing strategy performance data.
How ClawRapid Makes This Easier
Setting up cron jobs, databases, and sub-agent configurations requires OpenClaw knowledge. ClawRapid handles the infrastructure:
- Cron system pre-configured for scheduled scans
- Database ready for trade logging
- Discord/Telegram connected for daily reports
- Sub-agent spawning configured for parallel market analysis
Deploy with ClawRapid and start paper trading within the hour.
FAQ
Is this legal? Paper trading is completely legal. You are not placing real bets or interacting with any exchange. The bot only reads publicly available market data from the Polymarket API and simulates trades locally.
Can I convert this to real trading later? The workflow is designed for paper trading only. Converting to real trading would require Polymarket API authentication, real fund management, and additional safety checks. The strategies and insights you develop through paper trading transfer directly, but the execution layer is different.
How much does it cost to run? The main costs are the AI model for analysis (roughly $0.50-1.00 per day with frequent scans) and minimal server costs. Polymarket API access is free for reading market data.
Does this work with other prediction markets? The strategies are universal. You can adapt the market scanner to work with Kalshi, Metaculus, or any other prediction market with a public API. The database schema and reporting work identically.
How many markets should I track? Start with 10-20 active markets across different categories. As you get comfortable, expand to 50+. The sub-agent system handles parallel analysis, so the bot scales well.
What AI model works best for trading analysis? Claude and GPT both perform well for pattern recognition and strategy evaluation. Faster models (Claude Haiku, GPT mini) work fine for the routine scanning, while more capable models are better for the daily analysis reports.
What to Build Next
Paper trading is a stepping stone to broader financial automation:
- Earnings tracker for monitoring how real company performance affects prediction markets
- Market research to understand what Reddit and X are saying about events your bot trades
- Knowledge base to store trading insights and strategy notes for future reference
Browse all available workflows in our use cases guide.
Which model do you want as default?
Which channel do you want to use?
Limited servers, only 12 left
Articles similaires

OpenClaw for Real Estate: Automate Lead Capture and Property Showings
How real estate agents use OpenClaw AI to qualify leads, book property showings, and follow up with clients 24/7. Deploy in 60 seconds with ClawRapid.

OpenClaw for Restaurants: Reservations, Reviews, Orders, and Daily Specials
How restaurants use OpenClaw AI for automated reservations, Google review management, daily menu updates, and order taking. Deploy with ClawRapid in 60 seconds.

OpenClaw Lead Generation Setup: AI Qualification Chatbot + CRM Integrations
A complete guide to using OpenClaw for lead generation: qualification flows, lead scoring, CRM sync, follow-ups, and examples. Deploy in 60s with ClawRapid.