Polymarket Copy Trading Bot
Professional automated copy trading solution for Polymarket that mirrors trades from top performers with intelligent position sizing and real-time execution.
Overview
The Polymarket Copy Trading Bot is an enterprise-grade automated trading system that replicates trades from successful Polymarket traders directly to your wallet. The bot monitors trader activity 24/7, calculates proportional position sizes based on your capital, and executes matching orders in real-time with minimal latency.
How It Works
- Select Traders - Choose top performers from Polymarket leaderboard or Predictfolio
- Monitor Activity - Bot continuously watches for new positions opened by selected traders using Polymarket Data API
- Calculate Size - Automatically scales trades based on your balance vs. trader's balance
- Execute Orders - Places matching orders on Polymarket using your wallet
- Track Performance - Maintains complete trade history in MongoDB
Quick Start
Prerequisites
- Node.js v18+
- MongoDB database (MongoDB Atlas free tier works)
- Polygon wallet with USDC and POL/MATIC for gas
- RPC endpoint (Infura or Alchemy free tier)
Installation
# Clone repository
git clone https://github.com/Honey-Mist/polymarket-copy-trading-bot.git
cd polymarket-copy-trading-bot
# Install dependencies
npm install
# Run interactive setup wizard
npm run setup
# Build and start
npm run build
npm run health-check # Verify configuration
npm start # Start trading
** For detailed setup instructions, see Getting Started Guide**
Key Features
Core Functionality
- Multi-Trader Support - Track and copy trades from multiple traders simultaneously
- Smart Position Sizing - Automatically adjusts trade sizes based on your capital relative to trader's portfolio
- Tiered Multipliers - Apply different multipliers based on trade size for optimized risk management
- Position Tracking - Accurately tracks purchases and sells even after balance changes
- Trade Aggregation - Combines multiple small trades into larger executable orders for efficiency
- Real-time Execution - Monitors trades every second and executes instantly
- MongoDB Integration - Persistent storage of all trades and positions for analytics
- Price Protection - Built-in slippage checks to avoid unfavorable fills
Advanced Capabilities
- Adaptive Strategy - Dynamic position sizing based on market conditions
- Health Monitoring - Built-in health checks and error recovery
- Comprehensive Logging - Detailed logs for debugging and performance analysis
- Gnosis Safe Support - Compatible with both EOA and Gnosis Safe wallets
Monitoring Method
The bot currently uses the Polymarket Data API to monitor trader activity and detect new positions. The monitoring system polls trader positions at configurable intervals (default: 1 second) to ensure timely trade detection and execution.
Configuration
Essential Variables
| Variable | Description | Example |
|---|---|---|
USER_ADDRESSES | Traders to copy (comma-separated) | '0xABC..., 0xDEF...' |
PROXY_WALLET | Your Polymarket wallet address | '0x123...' |
PRIVATE_KEY | Wallet private key | 'abc123...' |
MONGO_URI | MongoDB connection string | 'mongodb+srv://...' |
RPC_URL | Polygon RPC endpoint | 'https://polygon...' |
TRADE_MULTIPLIER | Position size multiplier (default: 1.0) | 2.0 |
FETCH_INTERVAL | Check interval in seconds (default: 1) | 1 |
Finding Traders
- Visit Polymarket Leaderboard
- Look for traders with positive P&L, win rate >55%, and active trading history
- Verify detailed stats on Predictfolio
- Add wallet addresses to
USER_ADDRESSES
** For complete configuration guide, see Quick Start**
Documentation
Getting Started Guides
- Getting Started Guide - Complete beginner's guide with step-by-step instructions
- Quick Start - Fast setup for experienced users
- Simulation Guide - Learn how to backtest strategies
- Trader Selection Guide - Best practices for selecting profitable traders
Advanced Documentation
- Position Tracking - Understanding position management
- Funding Guide - Setting up your trading wallet
- Deployment Guide - Production deployment instructions
License
ISC License - See LICENSE file for details.
Acknowledgments
- Built on Polymarket CLOB Client
- Uses Predictfolio for trader analytics
- Powered by Polygon network
Advanced Features
Version 2 (Advanced Edition)
** Version 2 Available:** An advanced version with RTDS (Real-Time Data Stream) monitoring is now available as a private repository.
Version 2 features:
- Fastest Trade Detection - Near-instantaneous trade replication with minimal latency
- Reduced API Load - Optimized data streaming for better performance
- Enhanced Features - Advanced risk management and position sizing algorithms
- Improved Profitability - Optimized execution for better trade outcomes
Additional Tools
We've also developed a high-performance trading bot for Polymarket built with Rust, designed for maximum speed and efficiency.
Recommended Infrastructure
VPS Hosting
For optimal performance, we recommend using a dedicated VPS with low latency to Polymarket servers:
Recommended Provider: TradingVPS
Benefits:
- Low latency to Polymarket infrastructure
- 24/7 uptime guarantee
- Optimized for trading applications
- Professional support
Support & Contact
For questions, issues, or feature requests, please reach out:
- Telegram: @honeymist0206
- GitHub: Honey-Mist
Disclaimer
Important: This software is provided for educational and research purposes only. Trading cryptocurrency and prediction markets involves substantial risk of loss. Past performance does not guarantee future results.
- The developers and contributors are not responsible for any financial losses incurred while using this bot
- Always test thoroughly in a safe environment before deploying with real funds
- Use at your own risk and never invest more than you can afford to lose
- Ensure you understand the risks associated with automated trading before use