HeadlinesBriefing favicon HeadlinesBriefing.com

Risk-Free Arbitrage Bot for Polymarket and Kalshi

DEV Community •
×

Developer Sam built an open‑source bot that exploits a persistent 2‑5% price spread between the two leading prediction markets, Polymarket and Kalshi. By buying the YES contract on Kalshi and the NO contract on Polymarket, the combined cost stays below $1, guaranteeing a small profit that compounds when rotated weekly.

Normalizing data from Polymarket’s crypto‑native EVM order book and Kalshi’s regulated REST API proved messy, so Sam adopted pmxt, a unified wrapper modeled after CCXT. The bot fetches market snapshots, identifies inversions where YES price plus NO price falls under $1, and executes trades instantly, then uses a rotation logic to exit as soon as a better spread appears.

Testing on high‑volume events such as Fed Rates and election markets yielded spreads from 1.5% to 4.5%, confirming that algorithmic trading can thrive in mature prediction markets. Yet latency between API calls, liquidity mismatches, and fiat withdrawal delays mean the profit is not truly risk‑free. Future work will focus on tighter integration and faster settlement.