python -m pip install -r requirements.txtCreate a .env file in the PythonVersion directory with the following variables:
# Trader addresses to copy (comma-separated or JSON array)
USER_ADDRESSES=0x... # Replace with trader addresses
# Your wallet address
PROXY_WALLET=0x... # Your wallet address
# Your private key (keep this secret!)
PRIVATE_KEY=0x... # Your private key
# Polymarket CLOB URLs
CLOB_HTTP_URL=https://clob.polymarket.com/
CLOB_WS_URL=wss://ws-subscriptions-clob.polymarket.com/ws
# MongoDB connection string
MONGO_URI=mongodb://localhost:27017/polymarket_copytrading
# Or for MongoDB Atlas:
# MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/database
# Polygon RPC endpoint
RPC_URL=https://polygon-rpc.com
# Or use your own RPC provider:
# RPC_URL=https://polygon-mainnet.infura.io/v3/YOUR_PROJECT_ID
# USDC contract address on Polygon
USDC_CONTRACT_ADDRESS=0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174
# Monitoring settings
FETCH_INTERVAL=1
TOO_OLD_TIMESTAMP=24
# Retry settings
RETRY_LIMIT=3
NETWORK_RETRY_LIMIT=3
REQUEST_TIMEOUT_MS=10000
# Copy strategy (PERCENTAGE, FIXED, or ADAPTIVE)
COPY_STRATEGY=PERCENTAGE
COPY_SIZE=10.0
# Order size limits
MAX_ORDER_SIZE_USD=100.0
MIN_ORDER_SIZE_USD=1.0python -m src.main- Find trader addresses from:
- Polymarket Leaderboard: https://polymarket.com/leaderboard
- Predictfolio: https://predictfolio.com
- Format: Comma-separated or JSON array
- Example:
USER_ADDRESSES=0x123...,0x456... - Or:
USER_ADDRESSES=["0x123...","0x456..."]
- Example:
- Your Ethereum wallet address (the one you'll use for trading)
- Format:
0xfollowed by 40 hexadecimal characters
- Your wallet's private key (keep this secret!)
- Format:
0xfollowed by 64 hexadecimal characters ⚠️ Never share this or commit it to version control!
- Local MongoDB:
mongodb://localhost:27017/polymarket_copytrading
- MongoDB Atlas (Free):
- Visit https://www.mongodb.com/cloud/atlas/register
- Create a free cluster
- Create database user
- Whitelist IP:
0.0.0.0/0(or your IP) - Get connection string from "Connect" button
- Format:
mongodb+srv://username:password@cluster.mongodb.net/database
- Free options:
https://polygon-rpc.comhttps://rpc.ankr.com/polygon
- Or use your own:
- Infura: https://infura.io
- Alchemy: https://www.alchemy.com
- Format:
https://polygon-mainnet.infura.io/v3/YOUR_PROJECT_ID
- ✅ Install dependencies
- ✅ Create
.envfile - ✅ Run the bot:
python -m src.main
- Create
.envfile inPythonVersiondirectory - Copy template above and fill in your values
- Make sure MongoDB is running (if using local)
- Check MONGO_URI format
- For Atlas, verify IP whitelist
src/utils/create_clob_client.py
See:
README.md- Full documentationRUN_INSTRUCTIONS.md- Running instructionsFIX_PYTHON.md- Python installation help