Agent skill

Polymarket Arb Scanner

This skill should be used when the user asks to "scan polymarket", "find arb opportunities", "check polymarket arbs", "run arb scanner", "polymarket arbitrage", or mentions detecting price inefficiencies on Polymarket.

Stars 2
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/ChinchillaEnterprises/ChillSkills/tree/main/polymarket-arb

SKILL.md

Polymarket Arbitrage Scanner

Detect and analyze arbitrage opportunities on Polymarket binary prediction markets.

How Arbitrage Works

In binary markets (YES/NO), prices should sum to $1.00. When YES + NO < $1.00:

  1. Buy equal shares of both outcomes
  2. One side always pays $1 per share on resolution
  3. Profit = $1 - (YES price + NO price) minus fees

Two Scan Modes

1. Mid-Price Scan (Fast)

  • Uses Gamma API mid-market prices
  • Theoretical opportunities (prices may not be executable)
  • Good for quick monitoring

2. Order Book Scan (Accurate)

  • Uses CLOB API actual bid/ask prices
  • Shows executable opportunities at current market depth
  • Slower but more reliable

Quick Start

Run the Dashboard

bash
cd /Users/tori/Documents/Repos/polymarket-tools/arb-scanner
source venv/bin/activate
streamlit run main.py

Opens at http://localhost:8501

Quick CLI Scan

python
from api import fetch_all_active_markets, filter_binary_markets
from clob import get_market_order_books, detect_orderbook_arb

markets = fetch_all_active_markets(max_markets=100)
binary = filter_binary_markets(markets)

for market in binary[:20]:
    if not market.get('clobTokenIds'):
        continue
    books = get_market_order_books(market)
    if books:
        yes_book, no_book = books
        ask_sum = yes_book.best_ask + no_book.best_ask
        print(f"{market['question'][:40]}... | Sum: {ask_sum:.4f}")

Key APIs

API Endpoint Use
Gamma gamma-api.polymarket.com/markets Market metadata, mid-prices
CLOB clob.polymarket.com/book Order book bid/ask

Market Reality

  • Most markets have ask sums of 1.001-1.03 (market makers take spread)
  • True arbs (sum < 1.0) are rare and disappear quickly
  • Best opportunities come during high volatility events

Files

  • Repo: ChinchillaEnterprises/polymarket-tools
  • Code: /Users/tori/Documents/Repos/polymarket-tools/arb-scanner/
  • Main: main.py (Streamlit dashboard)
  • API: api.py (Gamma API)
  • CLOB: clob.py (Order book API)
  • Calc: arb_calc.py (Arb detection)

Alerts

Set in .env:

TELEGRAM_BOT_TOKEN=your_token
TELEGRAM_CHAT_ID=your_chat_id

Risk Notes

  • Check liquidity before large trades
  • Arbs disappear fast - speed matters
  • Always verify prices on Polymarket directly
  • Account for gas costs on Polygon

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results