polymarket-copy-trading-bot for automated prediction market trading. Mirror successful traders' strategies on Polymarket in real-time with a Python-based copytrading bot.
โ๏ธ Skip The Setup โ snipe.run โ The Cloud Enterprise Version
The code in this repo is the free, minimal, self-hosted version. It works, but you'll be the one running a Python process 24/7, holding a private key on disk, debugging WebSocket drops, and rebuilding a dashboard from scratch.
snipe.run is the cloud enterprise version โ the bot this codebase evolved into. It runs 24/7 in production on institutional-grade infrastructure, executes trades in under 200ms, and has already traded millions in live Polymarket volume.
Why snipe.run, not the free version:
- โก 10-30ร faster execution โ sub-200ms WebSocket pipeline vs. 2-5 second polling. On Polymarket, speed is the edge. The trader you're copying moves โ you're on the book before anyone else.
- ๐ฐ Battle-tested in live production โ millions in traded Polymarket volume, running 24/7 for over two years. Not a demo. Not a prototype. A proven money-maker.
- ๐ฏ 7-layer automated exit engine โ trailing stops, winner-locks, time exits, loss cuts, proportional follow-sells, instant profit ladders. The free version has none of this. You'll lock in profits you'd otherwise give back.
- ๐ Automatic tier-scaling โ your sizing, max price, and risk caps scale with your bankroll automatically. Start at $100, compound to $100k+, no config changes.
- ๐ Never-miss, never-stop โ dedicated infrastructure that doesn't crash at 3am, doesn't drop WebSocket connections, doesn't need your laptop open. If a trader moves, you move. Period.
- ๐ Professional live dashboard โ P/L chart, open positions, exit reasons, real-time log stream, trader roster, win rate. No terminal, no
tail -f, no guessing.- ๐ค AI co-pilot โ reviews every position the moment it's opened, flags risk, answers "should I hold?" in plain English. Like having a hedge-fund analyst on every trade.
- ๐ฑ Telegram push alerts on every BUY, every exit, every move. Know what your bot did before you unlock your phone.
- ๐ Zero maintenance โ no server, no updates, no restarts, no "why did it crash". It just runs.
Set up in under 2 minutes. Sign in โ set your trading wallet โ go live. No Python, no CLI, no Supabase, no config files.
๐ Start at snipe.run โ see the full feature list in the Cloud Enterprise Version section below.
- About This Polymarket Copy Trading Bot
- Key Features
- How It Works
- Quick Start
- Configuration Guide
- Usage
- Project Structure
- Contributing
- License
polymarket-copy-trading-bot is an automated trading system designed to replicate the trading strategies of successful Polymarket traders in real-time. Built with Python, Supabase, and the Polymarket CLOB API, this prediction market bot monitors trader activities and automatically executes copytrading orders.
This polymarket copy trading bot provides:
- Real-Time Trade Detection: Monitors target trader's activities instantly
- Automatic Order Execution: Places orders on Polymarket automatically
- Position Tracking: Tracks all open positions and P&L in real-time
- Flexible Sizing: Copy trades at any percentage of the original size
- Supabase Integration: Reliable database for trade history and monitoring
automated polymarket trading bot operates in simple steps:
โโโโโโโโโโโโโโโโโโโ
โ Polymarket โ
โ API/Events โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ Supabase DB โโโโโโโโค Polling Scripts โ
โ (PostgreSQL) โ โโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโฌโโโโโโโโโ
โ Realtime Subscription
โ
โโโโโโโโโโโโโโโโโโโ
โ Main Bot โ
โ - Listeners โ
โ - Handlers โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โ
โโโโโโโโโโโโโโโโโโโ
โ Constraints โ
โ - Sizing โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โ
โโโโโโโโโโโโโโโโโโโ
โ Order Maker โ
โ (py-clob-client)โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โ
โโโโโโโโโโโโโโโโโโโ
โ Polymarket โ
โ CLOB API โ
โโโโโโโโโโโโโโโโโโโ
- Monitor: The bot continuously monitors your target trader via Polymarket API
- Detect: Real-time detection of new trades through Supabase
- Execute: Automatically places scaled orders on your Polymarket account
- Track: Maintains complete history of all copytraded positions
Get your polymarket-copy-trading-bot running in 5 minutes:
- Python 3.9 or higher
- Polymarket account with USDC
- Supabase account (free tier works)
- Private key from your Polymarket wallet
- Clone the polymarket bot repository
git clone https://github.com/giordanopsouza/polymarket-copy-trading-bot.git
cd polymarket-copy-trading-bot- Set up Python environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt- Configure Supabase Database
Create your Supabase project and run the setup:
- Go to supabase.com and create a project
- Navigate to SQL Editor
- Read the Document "supabase/README.md" and execute the SQL script
- Get your project URL and anon key from Settings โ API and Data API
The bot needs Realtime enabled to detect trades instantly. After creating the tables:
- Go to your Supabase Dashboard
- Click on Database โ Database tables -> edit table -> enable real time
- Find the following tables and enable Realtime for each:
historic_tradespolymarket_positions
- Click the toggle switch to enable Realtime for both tables
Without Realtime enabled, the bot won't detect new trades or position changes!
- Configure your copytrading bot
Copy the example environment file:
cp env.example .envEdit .env with your credentials:
# Supabase Configuration
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-anon-key-here
# Polymarket Credentials
PK=your-private-key-here
POLY_FUNDER=your-polymarket-proxy-address
# Trader to Copy
TRADER_WALLET=trader-wallet-address-to-copy
# Optional: Sizing Configuration
STAKE_WHALE_PCT=0.001Getting Your Credentials:
- Private Key: Go to reveal.magic.link/polymarket and reveal your key
- Proxy Address: Found under your profile picture on Polymarket
- Trader Wallet: Copy from any trader's profile on Polymarket
- Run your polymarket copy trading bot
cd scripts
python main.pyThat's it! Your automated polymarket bot is now running and will start copying trades.
All configuration for this polymarket trading bot is done via .env:
SUPABASE_URL= # Your Supabase project URL
SUPABASE_KEY= # Supabase anon/public key
PK= # Your Polymarket private key
POLY_FUNDER= # Your Polymarket proxy address
TRADER_WALLET= # Trader wallet address to copyTRADER_WALLET= # Trader wallet address to copy (can be changed anytime)
BANKROLL=500 # Your trading capital (default: 1000)
STAKE_WHALE_PCT=0.001 # Copy 0.1% of trader's size (default: 0.005)The copytrading bot scales trades automatically:
- If whale bets $10,000 and you set
STAKE_WHALE_PCT=0.001- Your bot will place a $10 trade (10,000 ร 0.001)
- If whale bets $5,000 and you set
STAKE_WHALE_PCT=0.002- Your bot will place a $10 trade (5,000 ร 0.002)
Visit polymarket.com/leaderboard to find:
python scripts/main.pyThe polymarket copy trading bot will:
- โ Validate all credentials
- โ Connect to Supabase database
- โ Start monitoring your target trader
- โ Automatically execute copytrading orders
Verify your setup before live trading:
python scripts/config.pyThis will display your current configuration and validate all credentials.
The bot provides real-time console output showing:
- New trades detected from target trader
- Position updates and P&L changes
- Orders placed on your account
- Connection status and errors
polymarket-copy-trading-bot/ # Polymarket copy trading bot
โโโ scripts/
โ โโโ main.py # Main bot application
โ โโโ config.py # Configuration management
โ โโโ make_orders.py # Order execution
โ โโโ get_player_positions.py # Position tracking
โ โโโ get_player_history_new.py # Trade history
โ โโโ constraints/
โ โโโ sizing.py # Position sizing logic
โโโ supabase/
โ โโโ create_table.sql # Database schema
โ โโโ README.md # Supabase setup guide
โโโ env.example # Configuration template
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
โโโ LICENSE # MIT License
- Set
STAKE_WHALE_PCTconservatively (0.001 = 0.1%) - Monitor the trader's performance before increasing position sizes
- Keep some capital in reserve for market opportunities
Contributions to this polymarket-copy-trading-bot are welcome!
- ๐ Report bugs and issues
- ๐ก Suggest new features
- ๐ Improve documentation
- ๐ง Submit pull requests
- โญ Star the repo if you find it useful
- Web dashboard for monitoring
- Advanced risk management features
- Telegram/Discord notifications
โ Want the improved, production-ready version? โ snipe.run
snipe.run is the improved, production-ready version of this bot โ same roots, rebuilt for real trading. Very fast. Very accurate. Zero installation. Every roadmap item above is already shipped, plus a lot the free version never will be:
- โ Profit-tested & reliable โ live on Polymarket for over two years, consistently profitable, zero missed signals, zero downtime
- โ Web dashboard โ production-grade, live P/L chart, open positions, recent closes, real-time log stream
- โ Advanced risk management โ automatic bankroll-tier scaling, event & trader exposure caps, re-buy cooldowns, cost-basis guard
- โ Telegram notifications โ real-time push on every BUY, every exit, every move
- โก Blazing fast โ sub-200ms WebSocket execution vs. 2-5s polling in the free version
- ๐ฏ Surgically accurate โ 7-layer automated exit engine โ trailing stops, winner-locks, time exits, loss cuts, follow-sells, profit ladders
- ๐ค AI co-pilot โ reviews every position the moment it opens, flags risk, answers "should I hold?"
- ๐ฐ Battle-tested โ millions in live Polymarket volume, running 24/7 for over two years
- ๐ Zero installation, zero maintenance โ no server, no CLI, no Python, no
.envfile. Sign in, set wallet, go live in under 2 minutes.๐ Start at snipe.run โ fast. accurate. no install. Support: t.me/sniperun
This polymarket trading bot is licensed under the MIT License - see LICENSE for details.
Disclaimer: This is an educational tool. Trading prediction markets involves financial risk. Use at your own discretion. Always start with small amounts and never invest more than you can afford to lose.
- snipe.run - Cloud enterprise version of this bot (no install)
- Polymarket - Official Polymarket platform
- Polymarket Docs - API documentation
- Supabase - Database platform
- py-clob-client - Polymarket Python SDK
Keywords: polymarket-copy-trading-bot, polymarket bot, prediction market bot, automated trading bot, polymarket automation, copy trading polymarket, polymarket mirror trading, crypto prediction markets
Built with โค๏ธ for the Polymarket community | Cloud Enterprise Version: snipe.run
Contact: https://t.me/sniperun
This polymarket copy trading bot helps traders automate their prediction market strategies. Star โญ the repo to support development!