Polymarket Copy Trading Bot
An automated copytrading bot for Polymarket that monitors and replicates trades from experienced traders in real-time using Supabase and Python.
Install / Use
npx skills add SnipeRun/polymarket-copy-trading-botInstalls into whichever agent you are using.
README
🤖 Polymarket Copy Trading Bot - Automated Prediction Market Trading
polymarket-copy-trading-bot for automated prediction market trading. Mirror successful traders' strategies on Polymarket in real-time with a Python-based copytrading bot.
<img width="1681" height="1040" alt="Screenshot 2026-04-24 020608" src="https://github.com/user-attachments/assets/c7f61771-03fb-477c-b3cc-853b2cce3e25" />Open Positions
<img width="1679" height="1039" alt="image" src="https://github.com/user-attachments/assets/31dbc545-901f-4a8a-93d6-88cedb747354" />Buy Sell logs
<img width="1680" height="1037" alt="image" src="https://github.com/user-attachments/assets/c15807e9-aef4-4883-aabb-0cd58a6f926f" />☁️ 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.
📋 Table of Contents
- About This Polymarket Copy Trading Bot
- Key Features
- How It Works
- Quick Start
- Configuration Guide
- Usage
- Project Structure
- Contributing
- License
🎯 About This Polymarket Copy Trading Bot
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.
✨ Key Features
Automated Copytrading for Polymarket
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
🏗️ How It Works
automated polymarket trading bot operates in simple steps:
Architecture
┌─────────────────┐
│ Polymarket │
│ API/Events │
└────────┬────────┘
│
↓
┌─────────────────┐ ┌──────────────────┐
│ Supabase DB │◄─────┤ Polling Scripts │
│ (PostgreSQL) │ └──────────────────┘
└────────┬────────┘
│ Realtime Subscription
↓
┌─────────────────┐
│ Main Bot │
│ - Listeners │
│ - Handlers │
└────────┬────────┘
│
↓
┌─────────────────┐
│ Constraints │
│ - Sizing │
└────────┬────────┘
│
↓
┌─────────────────┐
│ Order Maker │
│ (py-clob-client)│
└────────┬────────┘
│
↓
┌─────────────────┐
│ Polymarket │
│ CLOB API │
└─────────────────┘
Data Flow
- 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
🚀 Quick Start
Get your polymarket-copy-trading-bot running in 5 minutes:
Prerequisites
- Python 3.9 or higher
- Polymarket account with USDC
- Supabase account (free tier works)
- Private key from your Polymarket wallet
Installation
- 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
⚠️ IMPORTANT: Enable Realtime on Tables
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 .env
Edit .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.001
Getting 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.py
That's it! Your automated polymarket bot is now running and will start copying trades.
⚙️ Configuration Guide
Environment Variables
All configuration for this polymarket trading bot is done via .env:
Required Settings
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 copy
Optional Settings
TRADER_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)
Position Sizing Examples
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)
Finding Profitable Traders to Copy
Visit polymarket.com/leaderboard to find:
🎮 Usage
Starting the Bot
python scripts/main.py
The polymarket copy trading bot will:
- ✅ Validate all credentials
- ✅ Connect to Supabase database
- ✅ Start monitoring your target trader
- ✅ Automatically execute copytrading orders
Testing Configuration
Verify your setup before live trading:
python scripts/config.py
This will display your current configuration and validate all credentials.
Monitoring Your Bot
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
📁 Project Structure
polymarket-copy-trading-
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.6kCommit, push, and open a PR
