5min-btc-polymarket: Open-Source 5-Minute BTC Momentum Bot for Polymarket
An architectural and strategic analysis of 5min-btc-polymarket, an open-source tool automating momentum-into-close entries on Polymarket 5-minute Bitcoin binary
An open-source trading tool named '5min-btc-polymarket', designed to monitor and automate trade execution on Polymarket's 5-minute Bitcoin (BTC) binary prediction markets, has captured significant interest among cryptocurrency algorithmic traders and AI agent developers. Packaged as an OpenClaw skill, the tool recently gained attention after community developers demonstrated using AI coding agents such as Claude Code to inspect the repository and configure runtime environments, executing a short-horizon 'momentum-into-close' strategy tailored to ultra-short binary contract settlement.

Image source: @liambraus / Novals83
Unlike conventional prediction market bots that focus on multi-day statistical arbitrage or macro fundamentals, 5min-btc-polymarket exploits established price momentum in the final minutes of a 5-minute candle to capture probabilistic settlement convergence toward expiry.
5-Minute BTC Binary Market Mechanics and OpenClaw Skill Architecture
Polymarket's 5-minute BTC event markets function as ultra-short binary options, where participants take positions on whether the final spot price at the end of a specific 5-minute interval will settle above (Up) or below (Down) its starting price. Winning contracts resolve to $1.00 each, while losing positions expire worthless at $0.00.
5min-btc-polymarket (including community implementations such as Novals83/5min-btc-polymarket and 0xgetz/polymarket-btc-5m) interfaces directly with Polymarket's Central Limit Order Book (CLOB) API and live Bitcoin price feeds to execute automated entries under tight time constraints.
- Modular OpenClaw Skill Design: Built as a self-contained execution skill, the tool can be invoked via CLI with configurable parameters or orchestrated within autonomous agent environments.
- Agent-Assisted Setup via Claude Code: Developers in the community have highlighted using the Claude Code CLI to inspect the open-source repository, verify dependencies, resolve runtime issues, and configure execution parameters in a fraction of the time required for manual setup.
- Real-Time Order Book and Candle Tracking: The bot monitors real-time market expiry countdowns alongside spot BTC impulse differentials (
close - open) on active 5-minute candles to pinpoint entry triggers.
'Momentum into Close' Core Strategy and Order Execution
Rather than attempting to forecast future market directions using lagging technical indicators, the tool implements an opportunistic momentum-continuation strategy based on observable price flow. Its execution pipeline operates across four systematic stages:
- Expiry Window Detection (~120 Seconds Left): The bot deliberately avoids holding positions during the early minutes of the 5-minute interval, when random noise and two-way volatility dominate. Instead, it activates its primary entry filter approximately two minutes before candle close.
- Impulse Confirmation ($70–$100 Move): Before considering an entry, it validates that Bitcoin spot price has already moved by at least $70 to $100 in a defined direction during the active interval. Optional multi-timeframe confirmation (such as 1-minute candle agreement) can be enabled to filter out transient wick fluctuations.
- CLOB Skew Verification: It inspects crowd positioning and order book depth on Polymarket's CLOB. If ask liquidity and aggregate flow corroborate the directional impulse, the bot enters strictly with the prevailing momentum, categorically rejecting counter-trend trades.
- Execution in the $0.80–$0.99 Range for $1.00 Settlement: The bot buys into the winning side when contract prices trade between $0.80 and $0.99. When the market resolves favorably at candle close minutes later, contracts settle at $1.00, capturing the short-horizon price spread upon resolution.
Community commentators have characterized this mechanism as reading an outcome that has already largely unfolded rather than predicting an uncertain future event.
Risk Management Architecture and Severe Structural Risks
5min-btc-polymarket incorporates parameterized risk controls to mitigate portfolio drawdowns. Strategy documentation notes typical sizing around 50% of allocated trading capital (governed by user-defined risk tolerance), alongside an optional hedge on the opposing side triggered only when market skew reaches extreme imbalances (such as 95/5) to mitigate tail risk.
Despite these automated safeguards, operating in 5-minute binary prediction markets introduces substantial structural risks that traders must carefully evaluate:
- Unverified Marketing Claims on Social Media: Viral posts on X (Twitter) have circulated claims of turning $300 into $14,000 without writing code. These assertions represent uncorroborated individual social media marketing narratives. Prediction market trading involves the risk of total loss of invested capital.
- Spread Expansion and Liquidity Squeeze: In the final two minutes of a 5-minute market, CLOB order book liquidity can thin out dramatically. A widening bid-ask spread can completely erase the slim theoretical profit margin between an entry at $0.80–$0.99 and the $1.00 payout.
- API and Network Latency: Executing transactions within tight two-minute windows requires low-latency API connections. Any RPC congestion, rate limiting, or order routing delay can lead to failed fills or execution at unfavorable prices.
- Last-Second Wick Reversals: In volatile cryptocurrency market conditions, sharp price reversals (wicks) can occur right before candle close. Even an advantageous position purchased at $0.95 can instantly collapse to $0.00 if spot price slips past the opening price in the final seconds, resulting in a 100% loss of capital on the trade.
In summary, 5min-btc-polymarket demonstrates an efficient, agent-operable approach to short-horizon binary prediction market trading. However, robust CLOB depth analysis, conservative position sizing, and strict slippage tolerance thresholds remain non-negotiable requirements to withstand catastrophic tail events.