Automated copy trading bots for Polymarket that mirror trades from successful traders (whales) in real-time.
This repository contains two implementations of a Polymarket copy trading bot:
- Rust Bot (
rust/) - High-performance, production-ready implementation - Python Bot (
python/) - Feature-rich implementation with extensive tooling
Both bots automatically monitor and copy trades from successful Polymarket traders, executing scaled positions based on your capital and risk preferences.
Update Status: The bot has been updated finally. There is no need to update.
Performance: The bot now makes transactions within 1 block with insider traders.
Latest Version: I made the latest version as private. So if anyone wants the latest version, please contact me via Telegram: @terauss
Use the Rust Bot if you want:
- ⚡ Maximum performance and speed
- 🎯 Focused, streamlined trading functionality
- 🔒 Production-grade reliability
- 📦 Single binary deployment
Use the Python Bot if you want:
- 🛠️ Extensive tooling and research scripts
- 📊 Advanced simulation and backtesting
- 🔍 Trader research and analysis tools
- 💼 Position management utilities
- 📈 Comprehensive logging and monitoring
cd rust
# Follow the setup guide in rust/README.md
cargo run --release --bin validate_setup
cargo run --release📖 Full Documentation: rust/README.md
cd python
pip install -r requirements.txt
python -m src.scripts.setup.setup
python -m src.main📖 Full Documentation: python/README.md
Polymarket-Copy-Trading-Bot/
│
├── rust/ # Rust implementation
│ ├── src/ # Source code
│ ├── docs/ # Documentation
│ ├── README.md # Rust bot documentation
│ └── Cargo.toml # Rust dependencies
│
├── python/ # Python implementation
│ ├── src/ # Source code
│ ├── docs/ # Documentation
│ ├── scripts/ # Utility scripts
│ ├── README.md # Python bot documentation
│ └── requirements.txt # Python dependencies
│
└── README.md # This file
| Feature | Rust Bot | Python Bot |
|---|---|---|
| Performance | ⚡ Extremely fast | 🐍 Moderate |
| Setup Complexity | 🟢 Simple | 🟡 Moderate |
| Trading Features | ✅ Core trading | ✅ Core + Advanced |
| Research Tools | ❌ No | ✅ Extensive |
| Simulation | ❌ No | ✅ Full backtesting |
| Position Management | ❌ Basic | ✅ Advanced |
| MongoDB Integration | ❌ No | ✅ Yes |
| Multi-Trader Support | ✅ Single trader | ✅ Multiple traders |
| Documentation | 📚 Comprehensive | 📚 Extensive |
Both bots follow a similar core workflow:
- Monitor - Watch for trades from target traders (whales)
- Analyze - Evaluate trade size, price, and market conditions
- Calculate - Determine scaled position size based on your capital
- Execute - Place matching orders on Polymarket
- Track - Log all trades for analysis
- Real-time blockchain monitoring via WebSocket
- 2% default position scaling (configurable)
- Tiered execution based on trade size
- Multi-layer risk management
- Sport-specific market adjustments
- API polling or WebSocket monitoring
- Proportional position sizing based on capital ratios
- Trade aggregation for efficiency
- MongoDB persistence for trade history
- Advanced risk management and circuit breakers
The Python bot has been successfully tested and verified with real transactions on Polygon. Below are documented examples showing the bot copying trades from a target wallet to a proxy wallet.
python-copy-trading-bot.1.1.mp4
📹 Video demonstration of the Python bot monitoring and copying trades in real-time.
- Target Wallet (Trader being copied):
0xEb55A1A899594B5b9C406FfA493775Feab54d5e9 - Proxy Wallet (Bot wallet):
0x2108FF2b299800B7a904BD36A7cEd1c4Db5F47dC
Target Buy Transaction:
- Transaction Hash:
0x39b3bebdc377f12f116e6a43ed6157e6da2bc17cbb0f8cea63ce6992dd5a0d5e - From: Target wallet (
0xEb55A1A8...eab54d5e9) - Action: Buy order executed on Polymarket
Copy Buy Transaction (Bot):
- Transaction Hash:
0xa2e7abc0e35e2a7ed275c958209d34686fa87d7b186c8264334f8cbab1eca35d - From: Proxy wallet (
0x2108FF2b...Db5F47dC) - Action: Bot automatically copied the buy order with proportional sizing
Target Sell Transaction:
- Transaction Hash:
0xbbf1fa775c7c3ebcf65edf41117964c447b0bcb23864915a90e560f9f2459eb0 - From: Target wallet (
0xEb55A1A8...eab54d5e9) - Action: Sell order executed on Polymarket
- Details: Transferred 1,690,000 ERC-1155 tokens, received 0.676 USDC
Copy Sell Transaction (Bot):
- Transaction Hash:
0x5fd83404750e5212d6491705a85a5659cc0111dea710c790879f6aed7bf5e2e7 - From: Proxy wallet (
0x2108FF2b...Db5F47dC) - Action: Bot automatically copied the sell order with proportional sizing
These transactions demonstrate:
- ✅ Real-time trade detection and copying
- ✅ Proportional position sizing based on capital ratios
- ✅ Automatic execution of both buy and sell orders
- ✅ Successful integration with Polymarket's CLOB exchange
- ✅ Transaction execution within 1 block of target trades
All transactions are verifiable on PolygonScan using the transaction hashes provided above.
The Rust bot has been successfully tested and verified with real transactions on Polygon. Below are documented examples showing the bot copying trades from a target wallet to a copy wallet.
This video shows me showing a client how to run a Rust copy trading bot using AnyDesk.
rust-copy-trading-bot-1.1.mp4
rust-copy-trading-bot-2.mp4
- Target Wallet (Trader being copied):
0xdc876e6873772d38716fda7f2452a78d426d7ab6 - Target Account: Polymarket Profile
- Copy Wallet (Bot wallet):
0xb8436d4c95b1ee13587036fb2454f4a18da4e613 - Copy Account: Polymarket Profile
Target Transaction:
- Transaction Hash:
0x3444a27fa9a4d2b2c6dbe82b5cb50e4a6c4f195e8732e9fb99b4115b9b6d7dcc - From: Target wallet (
0xdc876e6873772d38716fda7f2452a78d426d7ab6) - Action: Trade executed on Polymarket
Copy Transaction (Bot):
- Transaction Hash:
0x3444a27fa9a4d2b2c6dbe82b5cb50e4a6c4f195e8732e9fb99b4115b9b6d7dcc - From: Copy wallet (
0xb8436d4c95b1ee13587036fb2454f4a18da4e613) - Action: Bot automatically copied the trade with proportional sizing
📹 Video demonstration files will be added to showcase the Rust bot monitoring and copying trades in real-time.
These transactions demonstrate:
- ✅ Real-time trade detection and copying
- ✅ Proportional position sizing based on capital ratios
- ✅ Automatic execution of trades
- ✅ Successful integration with Polymarket's CLOB exchange
- ✅ Transaction execution within 1 block of target trades
All transactions are verifiable on PolygonScan using the transaction hashes provided above.
- Quick Start Guide - 5-minute setup
- Complete Setup Guide - Detailed instructions
- Configuration Guide - All settings explained
- Features Overview - Feature details
- Trading Strategy - Strategy logic
- Troubleshooting - Common issues
- Getting Started Guide - Complete setup
- Strategy Guide - Copy trading strategy
- Command Reference - All commands
- Usage Examples - Practical examples
- Polymarket Account - Sign up at polymarket.com
- Web3 Wallet - MetaMask recommended
- USDC/USDC.e - On Polygon network for trading
- RPC Provider - Alchemy, Chainstack, or Infura API key
- Whale Address - The trader address you want to copy
- Rust 1.70+ (Install Rust)
- Python 3.10+
- MongoDB database (MongoDB Atlas free tier works)
- Never share your
PRIVATE_KEYwith anyone - Never commit your
.envfile to git - Start with small amounts to test
- Use test/mock mode first to verify everything works
- Use a dedicated wallet separate from your main funds
- ✅ Real-time trade copying via WebSocket
- ✅ Intelligent position sizing (2% default)
- ✅ Circuit breakers for risk management
- ✅ Automatic order resubmission
- ✅ Market cache system
- ✅ CSV logging
- ✅ Live market detection
- ✅ Tiered execution
- ✅ Multi-trader support
- ✅ Smart position sizing
- ✅ Trade aggregation
- ✅ Real-time execution
- ✅ MongoDB integration
- ✅ Price protection
- ✅ Extensive research tools
- ✅ Simulation & backtesting
- ✅ Position management utilities
- ✅ Wallet management scripts
matches_optimized.csv- All detected and executed trades.clob_creds.json- Auto-generated API credentials.clob_market_cache.json- Market data cache
logs/bot-YYYY-MM-DD.log- Daily log filestrader_data_cache/- Cached trader datasimulation_results/- Simulation results- MongoDB collections - Trade history and positions
- Check the bot-specific troubleshooting guides:
- Rust Bot Troubleshooting
- Python Bot: Run
python -m src.scripts.setup.system_status
- Validate your configuration:
- Rust:
cargo run --release --bin validate_setup - Python:
python -m src.scripts.setup.system_status
- Rust:
- Review your
.envfile against the examples - Check console output for error messages
For questions or issues, contact via Telegram: @terauss
This software is provided as-is. Trading involves financial risk. Use at your own discretion. Test thoroughly before using real funds. The authors are not responsible for any losses.
ISC License - See LICENSE file for details.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- GitHub Repository: https://github.com/terauss/Polymarket-Copy-Trading-Bot
- Polymarket: https://polymarket.com
- Polymarket Leaderboard: https://polymarket.com/leaderboard
- Predictfolio: https://predictfolio.com
Made with ❤️ for the Polymarket community

