I'm open-sourcing my Polymarket market making bot.
The market-making bot that made me about $5k on Polymarket is now on GitHub, MIT-licensed, wallet still public. Here's what's in it, what I stripped out, and why giving away a bot that made money costs me nothing - the code was never the edge.
- polymarket
- open-source
- market-making
- build-in-public
The bot that made me about $5k on Polymarket is now on GitHub, every line, MIT-licensed: github.com/kachence/polymm. The wallet is still public at @b00k13, so you can hold the code up against the actual trades.
Most "I built a Polymarket bot" repos are a README and a screenshot of a number. This one traded real money for months and leaves receipts you can reconcile. It also stopped making money, which is the honest half of the story, and it's exactly why I can give it away without a second thought.
Why am I giving it away?
Two reasons, and they're the whole point.
First, this is the retired Python version. The bot I run now is a Rust rewrite, and that one isn't in the repo. What you're getting is the code that earned the ~$5k but then bled a good chunk because of adverse selection.
Second, and this is the one that matters: the code was never the edge. The edge was fresh odds and speed. The scrapers that kept my odds fresh aren't in the repo - they're half the edge and a terms-of-service minefield - so it ships with a public the-odds-api path instead. And speed is the exact thing that decayed and killed the returns. The last post is the full autopsy of how getting too slow turned a book of +EV bets into a loss.
So I'm not handing you a money printer. I'm handing you a working foundation. Read it, learn from it, and if you want it to pay, you'll have to bring something to it yourself. That's an honest deal, not a disclaimer. You can repurpose this bot for any type of market making where the spread is decent and you will probably do well, as long as you don't get picked off.
The code was never the edge. Fresh odds and speed were, and both are on you.
What's actually in there
The bot is a single async orchestrator running about ten concurrent loops - scanning for opportunities, watching the order book, chasing hedges, reacting to price moves. The strategy underneath is four steps:
# de-vig the bookmaker odds into a fair probability, then hunt for an edge
fair = devig(bookmaker_odds) # my fair value for the team
edge = fair - (best_bid + 0.01) # I quote a cent above the book
if edge >= MIN_EDGE: # 7% by default
place_limit_order(team, best_bid + 0.01)
# when one leg fills, hedge the other side to lock the arb for under $1 a shareDe-vig sportsbook odds to a fair price, post a limit order on Polymarket a cent above the best bid wherever there's a 7%+ edge, and when one side fills, hedge the other to own both outcomes for under a dollar. When the hedge doesn't fill, you're left holding the directional leg.
The bit I'm still a little proud of is the reactive layer. When the fair value moves against a resting order it fires an EDGE_LOST event and cancels before the order gets picked off. In theory. In practice it wasn't fast enough, and watching why is most of the previous post.
The bugs I owned up to last time have addresses now, too. The one where the bot confidently backed the wrong team lived in the odds-to-team mapping, the stale-odds, and wrong-game problems were in that same matching layer. Most of these have been taken care of but don't take anything for granted. Run your own tests. Understand how the bot works. Only then risk capital.
The analytics come with it
I built an analytics layer to work out why my bot was bleeding when I've had problems, and that's in the repo too - five scripts that run against any public Polymarket wallet, no private data needed. Point them at a wallet address and you get its P&L, the arb-versus-directional split, a position breakdown, and favourite-versus-underdog performance. They're the exact tools behind the numbers in the last two posts, so you can reproduce my analysis on your own account - or check mine.
What I stripped, and why
I'd rather be upfront about what's not in there:
- The scrapers. The private odds pipeline that fed the bot. Half the edge is here. You will have to do this yourself.
- The live Rust bot. That one's still working for me. I don't plan to release it.
Everything else - the full market-making engine, the hedging logic, the reactive system, the Supabase schema, the tests - is there.
So, should you run it?
If you clone it and flip it on as-is, you'll mostly donate to faster bots. I'd know. But the strategy is sound and the plumbing works, so if you bring the two things that beat me - fresher odds and quicker execution - there's a real bot in here. Read, learn, improve.
The code's at github.com/kachence/polymm, the whole track record is on the public wallet, and if you build something on top of it, I genuinely want to see it. The next drop is the Rust rewrite going live in public, with the numbers back on this page - subscribe and I'll send it over.