A 24/7 bot that scans Polymarket, Kalshi, and Manifold Markets for arbitrage opportunities — price discrepancies of 10%+ on the same events across platforms.
- Multi-platform scanning: Polymarket, Kalshi, and Manifold Markets
- Smart event matching: Fuzzy string matching to identify the same event across platforms
- Confidence scoring: 1-10 score based on spread size, liquidity, and time to event
- Success probability estimates: Based on historical spread closure rates (73% base rate for 10%+ spreads)
- ROI calculation: Estimated return on investment for each opportunity
- Alert-only mode: No automatic trading — human decision required
- Spam prevention: Tracks already-alerted opportunities to avoid duplicate notifications
- 15-minute scan interval: Configurable via environment variables
🚨 ARBITRAGE OPPORTUNITY DETECTED 🚨
━━━━━━━━━━━━━━━━━━━━━━
📌 Event: Will Bitcoin reach $100,000 in March?
📅 Closes: Mar 31, 2026
💰 Price Discrepancy:
• Polymarket: 45.0¢ (SELL YES / BUY NO)
• Kalshi: 30.0¢ (BUY YES)
📊 Analysis:
• Spread: 15.0%
• ROI Potential: 50.0%
• Success Probability: 78%
• Confidence: ⭐⭐⭐⭐⭐⭐⭐☆☆☆ (7/10)
🔗 Links:
• [Polymarket](https://...)
• [Kalshi](https://...)
━━━━━━━━━━━━━━━━━━━━━━
⚠️ Alert-only mode. No automatic trading.
| Variable | Default | Description |
|---|---|---|
TELEGRAM_BOT_TOKEN |
— | Telegram bot token |
TELEGRAM_CHAT_ID |
— | Telegram chat ID for alerts |
SPREAD_THRESHOLD |
0.10 |
Minimum spread to alert (10%) |
SIMILARITY_THRESHOLD |
85 |
Fuzzy match threshold (0-100) |
SCAN_INTERVAL_SECONDS |
900 |
Seconds between scans (15 min) |
MARKETS_PER_PLATFORM |
200 |
Markets to fetch per platform |
- Push to GitHub
- Create a new Railway project from the GitHub repo
- Set environment variables in Railway dashboard
- The
Procfileconfigures Railway to runpython bot.pyas a worker
- Every 15 minutes, the bot fetches the top markets from each platform
- It compares every pair of markets across different platforms using fuzzy string matching
- If two markets match (≥85% similarity) and have a price spread ≥10%, it's flagged as an opportunity
- A confidence score (1-10) is calculated based on:
- Spread size: Larger spread = higher score
- Liquidity: More liquidity = higher score (easier to execute)
- Time to event: More time remaining = higher score (more time for spread to close)
- Success probability is estimated based on historical data (73% base rate for 10%+ spreads)
- A Telegram alert is sent with all details
- Best opportunities: Spreads between 10-30% with confidence ≥ 6
- Execution: Buy YES on the cheaper platform, sell YES (or buy NO) on the more expensive platform
- Risk: Platforms may have different resolution criteria — always verify before trading
- Liquidity: Ensure sufficient liquidity on both sides before entering a position