I wanted to build a Polymarket trading bot.
I could find plenty of people talking about building bots.
Nobody was actually saying HOW they built them.
So I built one from scratch. 798 commits in 6 weeks.
Here's everything I learned. A thread 🧵
Replying to @Abomination81
Yeah, tested that too. Three sockets side by side: 95 to 97% each, union still 97%. Aggregation smooths out per node gaps but a few percent never touch the public mempool at all, probably direct to validator. Close to all, not quite all.
14
Replying to @Abomination81
Stand corrected. Decoded the calldata and you're right: first partial fill exposes the full GTC order, wallet, total size, and a ms creation timestamp showing exactly when it was placed. About 58% of maker fills in my sample revealed a hidden remainder, one was a 9,500 share bid resting 2 days. Good alpha, thanks again!
1
24
Replying to @Abomination81
Literally just tested this. As far as I can see, placement never hits the mempool, it's offchain to the CLOB API. The only pending txs to the exchanges are matchOrders from relayers, after the match. You do get every fill ~1.6s before confirmation with the maker wallet in the calldata, which is real alpha. But it's post-trade. Are you seeing resting GTC orders somewhere, or did you mean the settlements?
18
Replying to @Abomination81
I've had trouble running a copy trader because of this exactly, most profitable accounts are bots and/or makers and it's hard/impossible to copy them. This might help, thanks.
41
Any exchange that continues to use WUnderground History tab for resolution is not serious about weather markets.
@IBKR @Polymarket @RobinhoodApp
There are two explanations for missing METARs on their history tab. Fraud or incompetence. Neither is acceptable for resolution.
Replying to @AlterEgo_eth
Interesting concept but the repo doesn't match the description. It's a CS-542 class project on a Kalshi demo account. The XGBoost doesn't predict NWP model error, it predicts raw temperature from Visual Crossing historical CSVs. No ECMWF/GFS forecasts, no METAR data, no model spread features anywhere in the code.
The idea of ML bias correction on NWP is legit (meteorology has done this for decades as MOS, Model Output Statistics), but building it properly needs paired forecast-vs-observation training data. This repo just has historical weather and date features.
MSE of 27-31 for Chicago/NYC is 5°F+ error, that's not tradeable on 1°C bins.
136
Replying to @AnteandDeck
Liquidity is absolutely the bottleneck at that window. From what I've seen:
- Spreads at 18-30hr are typically 2-5c on the tighter city bins (Milan, Atlanta, Karachi) but can blow out to 10-30c on thinner ones
- Best ask is usually 0.5-3c above fair value — close enough to see the edge, too wide to capture it passively
- FAK fill rates at your intended price are rough, maybe 1 in 10 opportunities actually execute
The edge exists at 18-30hr but you're paying for it in fill rate. The real question is whether you'd rather have a high fill rate at 6-12hr with no edge, or a low fill rate at 18-30hr with real edge. I'd take fewer fills at better prices every time.
The cities matter too. Some books are consistently tighter than others at that window.
1
27
If you found this useful:
- Follow for ongoing updates as the bot evolves
- I'll keep posting strategy updates, live results, and new features
- The repo will be public when it's ready
- Ask questions — I'm not gatekeeping any of this
The whole point was: the next person who searches "how to build a Polymarket bot" deserves real answers.
Thanks for reading. Let's keep building.
18
The prediction market bot ecosystem needs more people sharing the HOW.
Not "I made money with my secret bot."
Not "Just use the API."
Not screenshot P/L with no context.
Actual engineering. Actual architecture. Actual numbers — including the losses.
That's what I've tried to do with this thread series. I hope it helped.
1
23
What I'd tell someone who wants to build their own:
1. Start with the scanner. If you can't find good wallets, nothing else matters.
2. Build paper trading BEFORE live. It's boring. It'll save you money.
3. Keep your stack boring. SQLite, Python, whatever you know. Don't get fancy.
4. Log everything. You'll need the evidence when things go wrong.
5. Budget for losses. They're tuition, not failure.
6. Be honest about edge. If you can't measure it, it probably doesn't exist.
1
10
What the open-source version will include:
- Full backend: scanner, profitability, paper trader, weather lab
- Full frontend: operator dashboard
- Database schema and migrations
- Deployment scripts for Raspberry Pi
- Test suites
- Dev log with 211 entries of decision history
- Runbooks for common operations
- Architecture docs
Everything except live API keys and my specific strategy parameters.
1
41
On open-sourcing the repo:
It's coming. Not today, but it's the plan.
The code works, but it's got rough edges I want to clean up first.
I'm a perfectionist. I want the open-source version to be something
someone can actually clone, understand, and build on.
Not a demo. Not a tutorial repo. The real production bot with documentation.
When it's ready, I'll announce it here.
1
21
The mimic research has a phased roadmap with explicit kill criteria:
Phase 0: Retrospective analysis of copy-trade data (done)
Phase 1: Forward observation — record book state around trades (in progress)
Phase 2: Behaviour labelling — what type of trade was it?
Phase 3: Feature extraction — what market state triggered it?
Phase 4: Negative examples — when did they NOT trade?
Phase 5: Hypothesis testing — simple stats, no ML
Phase 6: Rule-based prototype (only if Phase 5 shows signal)
Kill criteria: if no patterns emerge by Phase 5, stop.
1
43
What I'm working on now — two tracks in parallel:
Track 1: Keep improving copy trading execution. Reduce latency, catch more winning trades, then scale beyond the flat 5-share test size once the data supports it. Recent sessions are profitable — the question is how far I can push it.
Track 2: Mimic bot research. What if instead of copying trades, you learn to PREDICT what a good trader will trade?
- Record what good traders trade and when
- Record what market conditions existed at the time
- Find patterns: do they trade in specific conditions?
- If yes: trade the conditions, not the trader
1
21
Current state of the bot:
✅ Wallet scanner — finds and scores profitable traders
✅ Profitability engine — closed-position truth layer
✅ Paper trading — simulated copy trading with full event replay
✅ Live trading — real execution with risk management
🔨 Weather Lab — multi-model forecast research (not trading yet)
✅ Operator dashboard — dark, data-dense control panel
✅ Telegram alerts — notifications for significant events
Running 24/7 on a Raspberry Pi.
1
30
12 days ago I started posting how I built a Polymarket trading bot from scratch.
Scanner → profitability → paper trading → live trading → weather markets.
798 commits. 6 weeks. A Raspberry Pi.
Here's what's next. 🧵
2
103
Replying to @CaioAugustw8 @chinasctv
I would also be very interested, if you would be open to sharing.
1
1
33

