Python Polymarket Arbitrage Bot: 5 Crypto Strategies for BTC, ETH, XRP & SOL

·3 min read

Python Polymarket Arbitrage Bot: 5 Strategies Explained

Most Polymarket arbitrage bot repos show one trick: buy YES and NO when the sum is below $1.00. That works - until you want to scale across BTC, ETH, XRP, and SOL markets with different timeframes, outcome counts, and edge types.

I open-sourced a Python Polymarket arbitrage bot that runs five strategies in parallel, ranks signals with a composite score, and enforces risk limits independently of strategy logic. Full docs live at casatrick.github.io/polymarket-arbitrage-bot-python.

What this bot does differently

Instead of a single scanner loop, the architecture separates concerns:

Module Role
scanner.py Discovers crypto prediction markets
strategies.py Five strategy implementations
bot.py Orchestrates parallel scans + execution
risk_manager.py Position caps, daily loss limits, dedup
api_client.py Polymarket CLOB API wrapper

Every market scan pools signals from all applicable strategies, filters low-quality entries, ranks by score, and executes the top signals (max 3 per cycle).

Strategy 1: Intra-market arbitrage

When YES + NO prices sum below $1.00 after fees, buying both sides locks in risk-free profit at resolution (or via immediate merge/redeem on complete sets).

# Conceptual check
edge = 1.00 - (yes_price + no_price)
if edge >= config.min_spread_pct:
    execute_both_sides(market, size)

Default minimum spread: 1.5%. Max position: $500.

Strategy 2: Combinatorial arbitrage

Multi-outcome markets (price brackets, election fields) should sum to $1.00 across all outcomes. When the total is below $1.00, buy every outcome for guaranteed redemption value.

Requires 3+ outcomes and a minimum deviation of 2.0% by default.

Strategy 3: Cross-platform arbitrage

Compare Polymarket implied probability against spot feeds (Binance, CoinGecko). When divergence exceeds threshold, buy the underpriced outcome and hold for convergence. Directional - not risk-free - but higher frequency on short markets.

Strategy 4: Endgame arbitrage

Near resolution, one outcome often trades at 0.93+ with hours left. Buying high-probability outcomes captures small, capital-efficient returns. The bot filters by minimum annualized return and max time to resolution (48h default).

Strategy 5: Momentum / mean-reversion

Treat YES/NO prices as time series. Entry signals use Z-score, RSI, rate of change, and VWAP divergence across 5m, 15m, and 1h timeframes - the same toolkit as crypto momentum trading, adapted for prediction market tokens.

How signals are ranked

The StrategyAggregator scores each signal 0.0-1.0:

score = (profit × 0.30) + (confidence × 0.25) + (strategy_priority × 0.20)
      + (urgency × 0.15) + (risk_reward × 0.10)

Strategy priority weights favor structural arbitrage over directional trades:

  1. Intra-market (1.00)
  2. Combinatorial (0.95)
  3. Endgame (0.90)
  4. Cross-platform (0.80)
  5. Momentum (0.70)

When multiple strategies fire on the same market, only the highest-ranked signal executes - the risk manager blocks duplicate positions.

Risk management

Keys stay in .env - never hardcoded or logged. Recommended setup: dedicated trading wallet with capped capital.

Hard limits enforced outside strategy code:

Quick start

git clone https://github.com/casatrick/polymarket-arbitrage-bot-python.git
cd polymarket-arbitrage-bot-python
pip install -r requirements.txt
cp .env.example .env
python bot.py  # paper mode first

Enable or disable each strategy independently in config.py via its enabled flag.

When to use Python vs TypeScript

This Python bot optimizes for strategy research and multi-strategy scanning with fast iteration on parameters. For production dashboards, WebSocket-heavy execution, and late-entry timing on 5/15-minute BTC markets, see my TypeScript Polymarket arbitrage bot and late-entry trading bot.

Need a custom Polymarket arbitrage bot configured for your edge and risk tolerance? Get in touch.

Related posts