Polymarket Trading Bot is a production-ready, open-source automated Polymarket trading bot built for prediction market trading, copy trading, and algorithmic strategies using the Polymarket CLOB API. It supports real-time orderbook trading, wallet copy trading, risk-managed execution, and pluggable strategies, making it one of the most advanced Polymarket bots available on GitHub.
π Telegram Contact:: https://t.me/@SmartLead007
This project is designed to rank for and solve real use cases related to:
- Polymarket trading bot
- Polymarket copy trading bot
- Prediction market automation
- Polymarket CLOB API trading
- Automated trading strategies for Polymarket
- Trade YES / NO tokens automatically
- Uses Polymarket CLOB (Central Limit Order Book)
- Limit-orderβonly execution (no blind market orders)
- Monitor selected wallets
- Mirror trades proportionally
- Configurable delay, size scaling, and filters
- Avoid frontrunning and over-exposure
- Plug-and-play strategy system
- Multiple strategies can run in parallel
- Easy to add your own custom logic
Included strategies:
- Spread arbitrage
- Momentum / flow trading
- Copy trading (leader-follower)
- Live orderbook via WebSocket
- Best bid / ask tracking
- Spread & liquidity analysis
- Volume imbalance detection
- Max position per market
- Max daily loss
- Trade cooldowns
- No trading near market resolution
- Automatic stale-order cancellation
polymarket-bot/
βββ src/
β βββ api/ # Polymarket REST + WebSocket clients
β βββ market/ # Market scanner & orderbook engine
β βββ strategy/ # Trading & copy strategies
β βββ trader/ # Order, position & risk managers
β βββ config/ # Environment & constants
β βββ utils/ # Logger, math helpers
β βββ index.ts # Bot entry point
βββ .env.example
βββ package.json
βββ README.md
- Node.js 18+
- Polymarket API access
- Polygon wallet private key
git clone https://github.com/YOUR_USERNAME/polymarket-trading-bot.git
cd polymarket-trading-bot
npm installCreate .env from the example:
PRIVATE_KEY=your_private_key_here
POLYMARKET_API_KEY=your_polymarket_api_key
RPC_URL=https://polygon-rpc.com
# Risk controls
MAX_POSITION_USD=100
MAX_DAILY_LOSS_USD=50
MIN_SPREAD=0.03
# Copy trading
COPY_WALLETS=0xabc...,0xdef...
COPY_RATIO=0.5npm run start -- --mode=papernpm run start -- --mode=live- Tracks trades from selected wallets
- Mirrors entries and exits
- Adjustable risk scaling
- Optional execution delay
Enter trades when YES / NO prices are mis-priced:
YES_ASK < (1 - NO_BID - FEES)
- Detects price acceleration
- Confirms with volume
- Uses trailing stops for exits
Prediction markets involve financial risk. You are fully responsible for:
- API keys
- Private keys
- Capital usage
- Legal compliance in your jurisdiction
Always test in paper mode before trading real funds.
A Polymarket trading bot is an automated program that trades prediction market contracts on Polymarket using predefined strategies or copied trades.
Yes. The bot uses WebSocket feeds for real-time orderbook updates and fast execution.
Absolutely. Create a new file under src/strategy/ implementing the base strategy interface.
Yes. It includes a wallet copy trading engine in addition to algorithmic strategies.
- β Core trading engine
- β Copy trading
- β Risk management
- π Backtesting engine
- π Strategy performance analytics
- π Telegram / Discord alerts
- π Web dashboard (Next.js)
Contributions are welcome:
- New strategies
- Bug fixes
- Performance improvements
- Documentation updates
Open an issue or submit a pull request π