heyfive-dev/polymarket-arbitrage-trading-bot-v2 — explained in plain English
Analysis updated 2026-05-18
Automatically trade 15-minute Bitcoin up/down markets on Polymarket
Hedge both sides of a prediction market bet to reduce risk
Adapt a trading strategy over time using recent order book data
| heyfive-dev/polymarket-arbitrage-trading-bot-v2 | dataants-ai/cutscript | hisorange/artgen | |
|---|---|---|---|
| Stars | 93 | 93 | 95 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 4/5 | 3/5 | 3/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a funded Polygon wallet with USDC and carries real financial risk even when hedged.
This is an automated trading bot for Polymarket, a prediction market platform where users bet on the outcome of real-world events using cryptocurrency. Specifically, it targets 15-minute Up/Down markets, short-duration bets on whether a cryptocurrency price (like Bitcoin) will be higher or lower in 15 minutes. The bot's strategy works in two steps called predict-and-hedge. First, it analyzes the live order book (the list of current buy and sell offers) using a built-in price prediction algorithm to decide whether the price will go up or down. Then it places a "first leg" order on the predicted outcome, followed immediately by a "second leg" hedge order on the opposite outcome at a carefully calculated price. The goal is for the combined cost of both sides to be low enough that whichever outcome wins, the position is still profitable after fees. The prediction algorithm uses momentum, volatility, and trend signals extracted from the real-time price feed, and adapts its weights over time using a technique called online gradient descent, meaning it continuously updates its strategy based on recent performance. The bot requires a Polygon blockchain wallet funded with USDC (a US dollar-pegged cryptocurrency), an API connection to the Polymarket order book, and a connection to the Polygon network. Configuration is done through environment variables. After markets resolve, winning positions must be manually redeemed using separate included scripts, the bot does not redeem automatically. The README explicitly notes this is high-risk: the hedge reduces but does not eliminate losses, and both sides of a trade can fill at worse prices than intended. The full README is longer than what was provided.
An automated bot that trades short 15-minute Bitcoin up-or-down prediction markets on Polymarket using a predict-and-hedge strategy.
Mainly TypeScript. The stack also includes TypeScript, Polygon, USDC.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.