I made a Go bot for Polymarket's 5 minute btc market - built for pure speed
Spent the last month building a new Polymarket bot from scratch in Go, focused purely on oracle arbitrage where millisecond-level speed is critical.
What I made:
A bot that exploits the natural lag between live BTC exchange prices and Polymarket's on-chain Chainlink oracle.
When BTC pumps or dumps on Bitstamp/Coinbase, there's a 1-3 second window to enter before Polymarket's oracle updates. During this window, the market prices haven't adjusted yet - they still reflect the old oracle price.
Bot detects the divergence, enters YES (if BTC went up) or NO (if BTC went down), then exits after the oracle updates and corrects the market price.
Why I built this in Go:
Oracle arbitrage is extremely time-sensitive - you have literally 1-3 seconds to detect the divergence and enter before the window closes. For this specific strategy, I needed the absolute fastest execution possible, which is where Go excels.
Go's goroutines and event-driven channels allowed me to process 500+ WebSocket messages per second with zero latency spikes, which is critical when you're working with such tiny windows.
How it works technically:
Event-driven architecture using Go channels:
When price divergence exceeds threshold, a Go channel fires immediately and triggers entry. Pure event-based reactions - no polling loops. Speed is everything when you only have 1-3 seconds.
Features I built:
- Multi-exchange monitoring - Aggregates Bitstamp, Coinbase, Kraken for consensus (prevents false signals from single exchange glitches)
- Real-time oracle tracking - Monitors Chainlink updates with sub-second precision
- Paper mode - Test with simulated balance before risking real money (this saved me from expensive bugs)
- Both timeframes - Runs on 5-minute AND 15-minute BTC markets simultaneously
- Risk controls - Position limits, drawdown caps, stop-loss when oracle moves opposite direction
Performance stats:
Based on backtesting and live testing:
- Win rate: ~65-70% when lag exceeds threshold
- Entry windows: 1-3 seconds on average (extremely tight)
- Best results on high-volatility days (more lag opportunities)
- Works 24/7 - BTC prediction markets never close
What I learned building this:
- Go's concurrency model is perfect for this specific use case - handling multiple WebSocket feeds simultaneously with minimal latency
- When you only have 1-3 seconds to act, even 100ms delays are fatal
- Oracle lag is unpredictable but consistent enough to be tradeable
- Paper mode is mandatory - I caught 3 major bugs (including a race condition) before going live
- Exchange consensus prevents most false entries - worth the added complexity
Why this edge exists:
Oracle lag is a fundamental property of on-chain data feeds. Chainlink can't update instantly - there's always a 1-3 second delay between when price changes on exchanges and when it reflects on-chain.
This isn't an exploit that gets "patched" - it's structural to how blockchain oracles work.
Safety features:
- Paper mode (test without risking money)
- Position limits per market
- Drawdown caps (stops trading after X loss)
- Stop-loss triggers when oracle moves wrong direction
Tech stack:
- Go 1.21+ (backend)
- Goroutines for concurrent WebSocket handling
- Event-driven channels (core pattern)
- WebSocket connections to 3 exchanges + Chainlink
- Polymarket CLOB API for order placement
Current status:
Just launched it publicly at https://whop.com/polycryptobot/polycryptobot-5-min-btc-polymarket-bot/ after weeks of testing in paper mode and small-scale live trading.
Posted Mar 1, 2026, 1:43 AM UTC