SkillAgentSearch skills...

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-bot

Installs 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.

License: MIT Python 3.9+ Polymarket

<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

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

  1. Monitor: The bot continuously monitors your target trader via Polymarket API
  2. Detect: Real-time detection of new trades through Supabase
  3. Execute: Automatically places scaled orders on your Polymarket account
  4. 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

  1. Clone the polymarket bot repository
git clone https://github.com/giordanopsouza/polymarket-copy-trading-bot.git
cd polymarket-copy-trading-bot
  1. Set up Python environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. 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:

  1. Go to your Supabase Dashboard
  2. Click on DatabaseDatabase tables -> edit table -> enable real time
  3. Find the following tables and enable Realtime for each:
    • historic_trades
    • polymarket_positions
  4. Click the toggle switch to enable Realtime for both tables

Without Realtime enabled, the bot won't detect new trades or position changes!

  1. 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
  1. 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:

  1. ✅ Validate all credentials
  2. ✅ Connect to Supabase database
  3. ✅ Start monitoring your target trader
  4. ✅ 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

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated1d ago
Forks1

Languages

Python

Security Score

90/100

Audited on Aug 7, 2026

No findings