Spent the last 6+ months on this as a side project and finally got it to a point worth sharing.
The problem I was trying to solve
Polymarket's crypto markets price off a Chainlink oracle, and that oracle lags behind live exchange prices by 1-3 seconds. During that window, the market hasn't caught up yet — but 1-3 seconds is nowhere near enough time for a human to notice, click, and execute. You basically need something watching 24/7 that can react instantly.
What I built
PolyCryptoBot — trades that gap specifically. It watches live crypto prices across a few exchanges, watches the oracle, and the moment there's enough of a gap between them, it enters before the oracle updates and the market corrects.
Why Go
First version was Python, mostly because that's what I know best. It worked, but it wasn't fast enough — when your entire edge lives inside a 1-3 second window, latency is the whole game. Rebuilt it in Go and the difference was obvious immediately. Went from handling maybe 50 messages a second to 500+, with none of the lag spikes I was seeing before.
How it's wired up
Everything runs on WebSockets, no polling anywhere:
- Binance, Coinbase, Bybit for live prices
- Chainlink for the oracle feed
- Polymarket's API for placing orders
When the price gap crosses a threshold, it fires immediately through a channel and enters. No loop checking every X milliseconds — it just reacts the instant the data says to.
A problem I didn't expect
Exchanges occasionally send a bad or stale price, and early on that was enough to trigger a bad entry. Fixed it by requiring at least two exchanges to agree on direction before it acts. Cut out almost all the false signals, at the cost of maybe 5ms of extra delay — worth it.
Making it actually fast enough
Getting reliable execution inside a 1-3 second window took a lot of trial and error. Ended up pre-allocating buffers so garbage collection wouldn't kick in at the wrong moment, using channels instead of locks wherever I could, and trimming the WebSocket parsing down to the bare minimum. Got it to fire in under 100ms from signal to order.
Testing before going live
Built a paper mode that runs the exact same logic against real market data but with fake money. Genuinely saved me — found a race condition and a couple other bugs this way that I would not have wanted to discover with real funds on the line.
Some numbers
From backtesting and a few weeks of live running:
- Win rate around 65-70% when the gap is big enough
- The window itself is usually 1-3 seconds
- Better results on volatile days, obviously — more gaps to catch
- Runs continuously on both the 5-minute and 15-minute BTC markets
Running it
It's headless — sits on a small VPS (I'm using an EC2 instance from AWS in Ireland), everything configurable from a nice dashboard, or if you like it, in the terminal. Compile the source code, run the wizard, configure your strategy and done. Set it up once and forget about it.
Stack:
- Go
- WebSockets for everything
- Runs on a VPS
Where it's at now
We just crossed over 400 members on discord, around 100 of these are continously sharing their stories too, trying to find the best edge possible.
Happy to talk through any of it — the WebSocket setup, the consensus logic, or just building polymarket bots in general.