Bet with the Winners. Mirror trades from top Polymarket traders with intelligent position sizing and real-time execution.
Polymarket Copy Trading Bot
Copy the best, automate success. Mirror trades from top Polymarket traders with intelligent position sizing and real-time execution.
Why This Bot?
A copy trading bot for Polymarket that prioritizes transparency, flexibility, and real-time execution. Unlike manual trading or basic scripts, this bot offers complete automation with intelligent position sizing.
Key Features
| Feature | Description | | ------------------------ | --------------------------------------------------------------------- | | ๐ฅ๏ธ Web Dashboard | Full-featured web interface for analytics, trading, and configuration | | ๐ Position Tracking | Accurate tracking of purchases and sells across balance changes | | โก Real-time Execution | Monitors trades every second and executes instantly | | ๐ Trade Aggregation | Combine multiple small trades into larger executable orders | | ๐ฅ Multi-Trader Support | Track and copy trades from multiple traders simultaneously | | ๐ Smart Position Sizing | Automatically scales trades based on your capital vs trader's balance | | ๐ Tiered Multipliers | Apply different multipliers based on trade size ranges | | ๐พ MongoDB Integration | Persistent storage of all trades and positions | | ๐ณ Docker Support | Production-ready deployment with Docker Compose |
Quick Start
# Clone and install
git clone <repository-url>
cd polymarket-copy-trading-bot-v1
npm install
Configure
cp .env.example .env
Edit .env with your wallet, traders, MongoDB, RPC
Run
npm run build
npm run web # Web interface at http://localhost:3000
npm start # Or terminal mode
Web Interface
The bot includes a full web dashboard at http://localhost:3000 with three main views:

Traders Analytics
- P&L and ROI charts for all tracked traders
- Monthly and daily performance trends
- Volume analysis and win rate statistics
- Sortable table with detailed metrics
Example trader: Check performance on Predictfolio
My Trades
- Your copy trading performance and P&L
- Trade history with market details
- Position tracking across all markets
Settings
- Traders Management โ Add/remove traders to copy
- Copy Strategy โ Configure PERCENTAGE/FIXED/ADAPTIVE mode, multipliers, tiered sizing
- Safety Limits โ Set max/min order sizes, position limits, daily volume caps
- Bot Settings โ Fetch interval, preview mode, trade aggregation
- Wallet Info โ View balances (USDC, MATIC)
- Quick Actions โ Health check, stats, close resolved positions, manual sell
.env file. Restart the bot to apply changes.
Installation
Prerequisites
- Node.js v18+
- MongoDB (Atlas recommended)
- Polygon wallet with USDC
- POL (MATIC) for gas (~$5-10)
Standard Setup
git clone <repository-url>
cd polymarket-copy-trading-bot-v1
npm install
cp .env.example .env
Edit .env:
USER_ADDRESSES = '0xTrader1, 0xTrader2'
PROXYWALLET = 'yourpolygon_wallet'
PRIVATEKEY = 'yourprivate_key'
MONGO_URI = 'mongodb+srv://...'
RPC_URL = 'https://polygon-mainnet.infura.io/v3/...'
npm run build
npm run web # Web interface
npm start # Terminal mode
Docker
cp .env.docker.example .env.docker
export $(cat .env.docker | grep -v '^#' | xargs)
docker-compose up -d
๐ Docker Guide โ
Configuration
| Variable | Description | Default | | --------------------------- | --------------------------------- | ---------- | | USER_ADDRESSES | Traders to copy (comma-separated) | โ | | PROXY_WALLET | Your Polygon wallet | โ | | PRIVATE_KEY | Wallet private key | โ | | MONGO_URI | MongoDB connection string | โ | | RPC_URL | Polygon RPC endpoint | โ | | COPY_STRATEGY | PERCENTAGE / FIXED / ADAPTIVE | PERCENTAGE | | COPY_SIZE | Copy size (% or USD) | 10 | | TRADE_MULTIPLIER | Position size multiplier | 1.0 | | TIERED_MULTIPLIERS | Size-based multipliers | โ | | MAXORDERSIZE_USD | Maximum order size | 100 | | MINORDERSIZE_USD | Minimum order size | 1 | | PREVIEW_MODE | Simulate without trading | false | | TRADEAGGREGATIONENABLED | Combine small trades | false |
See .env.example for full configuration options.
CLI Commands

npm run web # Start web interface
npm start # Start copy trading bot
npm run analyze # Analyze tracked traders
npm run analyze:my # Analyze your trades
npm run health # System health check
npm run stats # View positions and P&L
npm run close:resolved # Close resolved market positions
npm run redeem # Redeem winning positions
npm run close:stale # Close old inactive positions
Documentation
- Quick Start Guide โ Get running in 5 minutes
- Docker Guide โ Production deployment
- Multi-Trader Guide โ Advanced multi-trader setup
- Tiered Multipliers Guide โ Size-based multiplier configuration
- Position Tracking โ How position tracking works
- Simulation Guide โ Backtest strategies
- Funding Guide โ How to fund your wallet
Safety
โ ๏ธ Use at your own risk. This bot executes real trades with real money.
Best Practices:
- Use a dedicated wallet with limited funds
- Start with
PREVIEW_MODE=trueto test - Research traders before copying
- Monitor the bot regularly
- Set appropriate safety limits
Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/name) - Commit changes (
git commit -m 'Add feature') - Push to branch (
git push origin feature/name) - Open Pull Request
License
Educational and research purposes. Users responsible for compliance with local laws and Polymarket ToS.
Disclaimer: Trading involves risk of loss. Developers not responsible for financial losses.