Automated trading engine for Polymarket's Bitcoin prediction markets. Analyzes price movements and places trades on 5-minute BTC bracket markets.
Polymarket offers "bracket" prediction markets on Bitcoin's price โ for example, "Will BTC be between $83,000โ$83,500 at 12:05 UTC?"
Each bracket is a binary contract: shares trade between $0.00 and $1.00. If you buy YES at $0.50 and the price lands in that bracket, you get $1.00 โ a 100% return.
This engine watches BTC price feeds, identifies the most likely bracket, and places trades automatically โ either as paper trades (sandbox) or with real USDC on Polygon (production).
Pulls real-time BTC price from your chosen source (Polymarket, Binance, or Coinbase). Can combine multiple sources for accuracy.
Scans Polymarket for active 5-minute (or 15-minute) BTC bracket markets. Finds which bracket contains the current BTC price.
Evaluates the probability of BTC staying in (or moving to) each bracket using momentum, volatility, and price divergence signals.
In sandbox mode, simulates the trade. In production, submits a real order to Polymarket via the CLOB API on Polygon.
Monitors the market until expiry. Records the outcome โ win or loss โ and updates your session PnL.
Moves to the next market slot. Stops automatically if the session loss limit is hit or the round count is reached.
Paper trading with a simulated wallet. No real money, no wallet needed. Use this to test strategies, watch the engine run, and understand market patterns. Works out of the box.
Real trading with USDC on Polygon. Requires a Polygon private key and Polymarket funder address. The engine submits actual CLOB orders. Use with caution โ real money at risk.
Paper trading demo. Buys the current bracket at $0.49, sells at $0.70. Safe, predictable, and good for testing the UI and understanding the flow.
Signal-driven strategy. Waits until later in the time slot, then analyzes ATR (Average True Range), price gaps, and exchange divergence before entering. Designed for higher edge at the cost of fewer trades.
The dashboard has three tabs:
| BTC Price Source | Where to fetch the real-time BTC price. Polymarket uses their own oracle; Binance/Coinbase are external exchanges. Combining two sources averages them for more stability. |
| Market Window | Trade on 5-minute or 15-minute bracket markets. 5-minute is faster turnover, 15-minute gives more time for analysis. |
| Max Session Loss | Safety net. If cumulative session losses hit this dollar amount, the engine stops automatically. Default: $3. |
| Wallet Balance | Starting balance for sandbox mode. Has no effect in production (uses your real Polygon wallet balance). |
| Slot Offset | How many time slots ahead to target. 1 = next slot (safest), 2+ = further out (riskier, potentially higher reward). |
| Rounds | How many market cycles to run. 0 = unlimited (runs until you stop it or hit the loss limit). |
Warning: Production mode trades real money. The private key is stored on this server. Only use a dedicated trading wallet โ never your main wallet. Start with small amounts until you understand the risk profile.
simulation strategy to learn the flow.late-entry strategy is more selective โ it may skip slots where signals are weak.