DEV Community

Benjamin-Cup
Benjamin-Cup

Posted on • Edited on

**Polymarket Trading Bots: My Recent Open-Source Projects for Automated Prediction Market Trading**

Exploring real-time automation, copy trading, and market-making on Polymarket — now with 319 stars on GitHub

As someone deeply immersed in prediction markets and DeFi automation, I've spent the past months building tools to make trading on Polymarket more efficient, programmable, and — when used carefully — potentially profitable.

Today, I'm thrilled to share my most comprehensive open-source project yet: a full suite of Polymarket trading bots written primarily in Python. The repo — https://github.com/Bolymarket/Polymarket-arbitrage-trading-bot-python with active community interest and recent updates (last commit just yesterday!).

Whether you're a quant developer, a Polymarket power user, or someone curious about bridging crypto prediction markets with algorithmic trading, this project offers production-grade starting points.

Why Polymarket? And Why Build These Bots?

Polymarket has become one of the most exciting platforms in crypto: real-money prediction markets on everything from crypto prices to elections, with high liquidity in short-term crypto up/down markets (especially the fast 5-minute epochs for BTC, ETH, SOL, XRP).

But manual trading is slow and error-prone. High-frequency opportunities vanish in seconds, top traders' moves are worth copying, and there's always arbitrage-like spread in YES/NO pairs.

I wanted tools that:

  • Run real-time with WebSocket feeds
  • Handle gasless execution on Polygon L2 via Builder relayer
  • Include risk controls, dry-run modes, and full automation
  • Cover directional, copy, and neutral strategies

The result is three modular bots in one repo.

1. Endcycle Sniper Bot — High-Speed 5-Minute Market Trading

This is the flagship: a real-time sniper for Polymarket's 5-minute crypto up/down markets.

Core Idea

Monitor orderbook + spot prices → generate UP/DOWN signals → execute (or simulate) trades near epoch end → auto-redeem winners gaslessly.

Two Main Strategies:

  • Buy-Above (Momentum): Enter when YES price spikes above a threshold (e.g., >0.95), betting momentum continues.
  • Buy-Opposite (Mean-Reversion): When one side hits extreme (e.g., >0.98), buy the opposite — capitalizing on overreactions.

Tech Highlights:

  • Polymarket Gamma API for market discovery
  • CLOB WebSocket for live orderbook
  • Coinbase/Binance spot feeds for reference prices
  • YAML config + env overrides (e.g., POLYBOT5M_DRY_RUN=true)
  • Risk: stop-loss, position caps, hedging options
  • Auto-redeem via Builder relayer

Beginner workflow is included: clone → venv → pip install → dry-run pipeline → add keys → go live with tiny sizes.

Try the Telegram trial bot for a quick feel: https://t.me/benjamin_polymarket_trading_bot

2. Copy Trading Bot — Mirror Top Traders Automatically

Want to follow proven Polymarket traders without watching 24/7?

This bot does exactly that:

  • Monitor selected wallets via Polymarket API (polls activity, positions)
  • Store pending trades in MongoDB
  • Executor copies buys/sells/merges to your wallet(s)
  • Flexible sizing: percentage of their order or fixed USD
  • Multi-wallet support
  • Preview/dry-run mode + PnL dashboard (npm run check-copy-pnl)

It's fully local — your keys, no custody.

Architecture separates monitor and executor so you can scale independently.

Great for learning from top performers while keeping control.

3. Ladder Trading Bot — Neutral Market-Making & Spread Capture

My favorite low-risk strategy: provide liquidity by selling YES + NO pairs when their combined price > $1 (e.g., 1.03–1.10).

No directional bet — you split USDC into YES/NO, sell both at premium, redeem winner.

Workflow:

  1. Split USDC → YES + NO tokens
  2. Sell pairs sequentially (limit orders above best bid + spread)
  3. Monitor resolution
  4. Auto-redeem

Configurable: portfolio allocation, min pair sum, spread offset, timeouts.

Perfect complement to directional plays — consistent edge from liquidity inefficiencies.

Technical Stack & Getting Started

  • Languages: Python core (CLI, engines, execution), some TypeScript/Node for copy bot
  • Key Integrations: Polymarket Gamma API, CLOB WebSocket, Builder relayer (gasless), spot price oracles
  • Safety First: Dry-run everywhere, risk limits, small-size testing mandatory
  • Setup (quick version):
  git clone https://github.com/Gabagool2-2/polymarket-trading-bot-python.git
  cd polymarket-trading-bot-python
  python -m venv .venv
  source .venv/bin/activate
  pip install -e .
  # Add .env with keys
  # Then: polybot5m run --dry-run   or   python scripts/run_5m_core.py --dry-run
Enter fullscreen mode Exit fullscreen mode

Full README has detailed configs, step-by-step scripts, and warnings.

Important Disclaimer

These are powerful tools, but trading prediction markets carries significant risk. Start in dry-run/paper mode only. No strategy guarantees profits — slippage, resolution risks, market changes, and bugs can lead to losses. Use small amounts, understand the code, and never risk what you can't afford to lose. Past performance ≠ future results.

What's Next? Community & Contributions

The repo is actively maintained — I just updated the README yesterday. I'm open to:

  • Pull requests (new signals, integrations, bug fixes)
  • Feature requests (e.g., more assets, advanced ML signals)
  • Collaborations

Questions I have for readers:

  • Which bot excites you most: sniper momentum, copy-trading, or neutral ladder?
  • Are you already trading on Polymarket? What markets/timeframes?
  • Devs: want to extend this for your own strategies?

Feel free to star/fork the repo — it helps visibility!

GitHub logo Bolymarket / Polymarket-arbitrage-trading-bot-python

polymarket V2 arbitrage trading bot polymarket V2 arbitrage trading bot polymarket V2 arbitrage trading bot polymarket V2 arbitrage trading bot polymarket V2 arbitrage trading bot polymarket V2 arbitrage trading bot polymarket V2 arbitrage trading bot polymarket V2 arbitrage trading bot polymarket V2 arbitrage trading bot polymarket V2 arbitrage

Polymarket Arbitrage Trading Bot | V2 Ready

Polymarket Trading Bot • 5-Min Market Bot • Fully Automated System

A high-performance, automated trading system for Polymarket prediction markets — now fully upgraded for Polymarket V2.

Built in Python, the system leverages real-time WebSocket data, gasless L2 execution, and an advanced risk-management framework optimized for short-term and high-frequency trading environments.

🚀 V2 Upgrade Highlights

  • Full compatibility with the new V2 exchange architecture
  • Updated SDK/API integration
  • Support for new order structures & contract addresses
  • Integrated pUSD collateral flow (via USDC.e wrapping)
  • Improved execution reliability during high-volatility windows
  • Seamless handling of order cancellations and migration events

Designed for arbitrage, directional strategies, and ultra-short-term markets (including 5-minute rounds), this bot framework provides a robust foundation for building and scaling automated trading strategies on Polymarket V2.

image

Contact

I have extensive experience developing automated trading bots for Polymarket and have built several profitable bots. and updating all…

This is my public Polymarket Account.

@benjamin-rustyedge4 on Polymarket

Check out this profile on Polymarket.

favicon polymarket.com

Reach out anytime for a live demo, customization help, or just to chat prediction markets.

Contact Info

Email
benjamin.bigdev@gmail.com

Telegram
https://t.me/BenjaminCup

X
https://x.com/benjaminccup

If you want to get new ideas and strategies for Polymarket trading bots, please read my series of articles.

Happy (and safe) trading! 🚀

Polymarket #PredictionMarkets #CryptoTrading #TradingBot #DeFi #AutomatedTrading #Quant #Python #OpenSource #Web3

Top comments (0)