Polymarket Arbitrage Bot — Crypto Trading Bots tool screenshot
Crypto Trading Bots

Polymarket Arbitrage Bot: Best Crypto Trading Bots for Arbitrage Traders in 2026

6 min read·

Executes dump-and-hedge arbitrage on Polymarket 15-minute Up/Down markets via TypeScript, polling Gamma API for market discovery and CLOB for orders with simulation mode.

Pricing

Open-Source

Tech Stack

TypeScript/Node.js/Polygon

Target

crypto arbitrage traders

Category

Crypto Trading Bots

What Is Polymarket Arbitrage Bot?

Polymarket Arbitrage Bot is an open-source Crypto Trading Bot built by dev-protocol for automating dump-and-hedge strategies on Polymarket's 15-minute Up/Down markets covering assets like BTC, ETH, SOL, and XRP. It polls the Gamma API for market slugs, monitors CLOB orderbooks for bid/ask prices and time remaining, detects sharp dumps in the first N minutes, buys the dipped side, hedges the opposite when combined cost hits ≤0.95 threshold, and handles settlement with P&L tracking. Polymarket Arbitrage Bot is one of the best Crypto Trading Bots for crypto arbitrage traders, with 220 GitHub stars as of October 2024, full TypeScript typing, and production-ready features like proxy wallet support and stop-loss hedging.

Quick Overview

AttributeDetails
TypeCrypto Trading Bots
Best Forcrypto arbitrage traders
Language/StackTypeScript/Node.js/Polygon
LicenseN/A
GitHub Stars220 as of October 2024
PricingOpen-Source
Last Releasefeat: polymarket arbitrage bot — October 2024

Who Should Use Polymarket Arbitrage Bot?

  • Crypto arbitrage traders monitoring Polymarket 15m Up/Down markets who want automated dump detection and hedging without manual order placement.
  • DeFi developers building Polygon-based strategies needing CLOB integration, API key derivation from signers, and simulation for backtesting.
  • Quantitative traders with USDC on Polygon seeking configurable thresholds like move detection percentage and max hedge wait time for risk control.
  • Indie bot operators running Node.js scripts 24/7 with .env config for multi-asset support across BTC, ETH, SOL, XRP.

Not ideal for:

  • Traders on non-Polymarket platforms or spot markets without binary Up/Down outcomes.
  • Beginners lacking Polygon wallets with USDC and POL/MATIC for gas.
  • High-frequency traders needing sub-second execution beyond 15m period polling.
  • Teams requiring GUI dashboards instead of CLI logging and TOML history files.

Key Features of Polymarket Arbitrage Bot

  • Dump-and-hedge strategy — Detects price drops exceeding configurable threshold (e.g., 5%) on Up or Down side within first N minutes (e.g., 3m), buys dip with fixed shares, then hedges opposite side when leg1 cost + opposite ask ≤ target (default 0.95).
  • Automatic market discovery — Queries Gamma API with asset slugs (BTC-USD, ETH-USD) and period timestamps to resolve active 15m market IDs, switches on rollover every 15 minutes.
  • CLOB order execution — Submits limit orders to Polymarket's central limit order book using derived API keys from EOA/Proxy/GnosisSafe signers or explicit key/secret/passphrase.
  • Stop-loss hedging — If ideal hedge price unmet within max wait (e.g., 10m), forces hedge at current ask to cap losses at stop-loss percentage (e.g., 2%).
  • Simulation mode — Defaults to dry-run logging all actions without real orders; set PRODUCTION=true for live trading and token redemption on settlement.
  • Position and P&L tracking — Logs per-period trades to append-only history.toml, redeems winning outcome tokens post-close using POL gas, computes realized profit/loss.
  • Error resilience — Retries transient Gamma/CLOB API failures, uses stderr for runtime logs, supports proxy wallets for non-custodial execution.

Polymarket Arbitrage Bot vs Alternatives

ToolBest ForKey DifferentiatorPricing
Polymarket Arbitrage BotPolymarket 15m Up/Down arbitrageDump-and-hedge with Gamma API discovery, TypeScript safetyOpen-Source
HummingbotGeneral CEX/DEX market makingLiquidity mining strategies, broader exchange support via CCXTOpen-Source
FreqtradeSpot/futures backtestingPython-based with hyperopt, Telegram integrationOpen-Source
CCXT ProHigh-frequency API wrappersWebSocket streams for 100+ exchanges, no built-in strategiesPaid

Hummingbot suits multi-exchange liquidity provision but lacks Polymarket-specific 15m binary market logic; use it for AMM pools on Uniswap. Freqtrade excels in historical backtesting across Binance futures yet requires custom indicators for prediction markets—pair with browse all Crypto Trading Bots for alternatives. CCXT Pro handles raw orderbooks efficiently for custom HFT but demands full strategy implementation from scratch.

How Polymarket Arbitrage Bot Works

Polymarket Arbitrage Bot operates on a 15-minute cycle aligned with Polymarket's Up/Down markets. It starts by querying the Gamma API (/markets?slug=${asset}-15m&period=${timestamp}) to fetch the active market ID, then polls CLOB endpoints every 10 seconds for Up/Down bid/ask prices and time-left. Dump detection triggers if one side's bid drops > MOVE_THRESHOLD (e.g., 0.05) within WATCH_WINDOW (first 180s), executing Leg 1 buy at best bid.

Hedging logic waits for combined position cost (leg1 fill price * shares + opposite ask * shares) ≤ SUM_TARGET (0.95), submitting Leg 2 buy; otherwise, stop-loss activates after MAX_WAIT (600s) at current ask. On market close (time-left=0), it redeems the winning outcome via Polymarket contracts on Polygon, burning YES/NO tokens for USDC. All via Viem or ethers.js under the hood for signer-based auth, with TypeScript ensuring order params match CLOB schemas.

# Clone and setup
$ git clone https://github.com/dev-protocol/polymarket-arbitrage-trade-bot.git
$ cd polymarket-arbitrage-trade-bot
$ cp .env.example .env
$ # Edit .env: PRIVATE_KEY=..., MARKETS=BTC,ETH, SUM_TARGET=0.95
$ npm install
$ npm run build
$ npm start  # Simulation mode

This sequence installs dependencies, configures wallet and thresholds, builds TS to JS, then runs the bot in sim mode—expect console logs of discovered markets, polled prices, and mock trades every 15m cycle without touching funds. Switch to npm run prod post-testing for live execution.

Pros and Cons of Polymarket Arbitrage Bot

Pros:

  • Full simulation mode prevents capital loss during strategy tuning on live data.
  • Type-safe TypeScript catches config errors at build time, unlike Python bots prone to runtime type mismatches.
  • Native Polymarket/Gamma integration resolves market IDs automatically, no manual slug tracking.
  • Configurable risk params (thresholds, wait times, shares) allow precise back-of-envelope EV calcs (e.g., 2-5% per cycle at 0.95 target).
  • Append-only TOML history enables post-mortem analysis of 100+ cycles without database setup.
  • Proxy/GnosisSafe support fits institutional-grade non-custodial trading on Polygon.

Cons:

  • Polling-based (10s intervals) misses sub-second arb opportunities in volatile dumps.
  • Limited to 15m Up/Down markets; no support for longer horizons or multi-outcome events.
  • Requires manual .env tweaks for new assets beyond BTC/ETH/SOL/XRP.
  • No built-in backtesting on historical orderbooks—sim relies on live data only.
  • Gas costs for redemptions add ~$0.50 per winning cycle at current Polygon rates.

Getting Started with Polymarket Arbitrage Bot

Fund a Polygon wallet with USDC (for trades) and POL/MATIC (gas). Clone the repo, install via npm install, copy .env.example to .env, and set keys:

PRIVATE_KEY=your_polygon_wallet_private_key
API_KEY=optional_clob_key
API_SECRET=optional
API_PASSPHRASE=optional
MARKETS=BTC,ETH
SUM_TARGET=0.95
MOVE_THRESHOLD=0.05
WATCH_WINDOW=180
MAX_WAIT=600
PRODUCTION=false  # Start here
SHARES=100

Run npm run build && npm start. The bot discovers markets (e.g., BTC-USD-15m-171...), polls CLOB, logs potential dumps/hedges to console and history.toml. After 2-3 cycles verifying logic (check P&L mocks), set PRODUCTION=true and rerun—first real trade hits on next qualifying dump. Monitor stderr for API errors; restart survives transients.

Verdict

Polymarket Arbitrage Bot is the strongest option for automating 15m Up/Down arb on Polymarket when running 24/7 Node.js instances with Polygon exposure. Its TypeScript safety and sim-to-prod toggle minimize deployment risks, delivering 2-5% EV per cycle at scale. Skip for non-binary markets; test sim first before live USDC allocation.

Frequently Asked Questions

Looking for alternatives?

Compare Polymarket Arbitrage Bot with other Crypto Trading Bots tools.

See Alternatives →

Related Tools