Polymarket Arb Bot
A within-market arbitrage bot for Polymarket binary markets. When the two sides of a market can be bought for less than a dollar combined, it takes both, and pockets the difference at settlement, no directional risk.
The edge
For each watched market, monitor bestAsk(YES) + bestAsk(NO). If the sum drops at or below ARB_THRESHOLD (default 0.97), buy both sides in equal share size. At settlement exactly one outcome pays $1, locking in 1 − sum profit per share.
How it works
01
Watch the book
Subscribes to live order books for binary markets (e.g. BTC 5m / 15m windows) over WebSocket.
02
Spot the dislocation
For each market, monitors bestAsk(YES) + bestAsk(NO). When the sum dips to or below the threshold (default 0.97), there’s free spread.
03
Buy both sides
Buys YES and NO in equal share size the moment the condition holds.
04
Collect at settlement
Exactly one outcome pays $1, locking in 1 − sum profit per share, independent of which way the market resolves.
Stack
Built to run 24/7
Designed to deploy on a Linux VPS under systemd, laptops sleep and lids close, and an arb bot that isn’t watching the book is just a script. Single-instance by design: the bot’s Postgres counters, signals, and orders aren’t safe to race.