19 / Ventures & FinancePrediction Market
Kalshi Crypto Market-Making and ML Trading Bots
Automated market making and machine-learning bots trading real money on 15-minute crypto markets · March – July 2026
- 36,604Contracts traded live by the market maker over four weeks
- 7Coins quoted live on 15-minute markets
- 6Generations of machine-learning models trained on the recorded data
- 44.4 MRows of order-book data captured by my own recorder
Spread capture on thinly traded markets
The venue was Kalshi, a regulated US exchange for yes-or-no contracts. Every 15 minutes it opens a new market on whether a coin’s price will finish the window higher, and each contract pays $1 or nothing.
On the less popular coins the gap between the best bid and best offer was often 10 to 60 cents on a one-dollar contract. My thesis was that a small automated market maker could rest orders on both sides and earn that gap. Later I tried to predict the outcomes outright with machine learning.
The market maker was profitable with real capital, and the models never beat the market’s own price. The most valuable result was a correct method for measuring those outcomes.
Live trading with real capital. Results were reconstructed from the bots’ logs of exchange fill messages, not taken from an account statement. A classmate contributed baseline machine-learning code; the trading systems and models described here are mine.
Systems built
- Market making
Live quoting bot on seven coins
Async Python bots that rest bids on both sides of each 15-minute market over a WebSocket feed, skew quotes as inventory builds, and roll to the next market every quarter hour.
- Data
Market-data recorder
My own top-of-book recorder, which ran from March 28 to August 1 and captured 44.4 million rows across about 10,000 markets per coin, plus Coinbase spot prices.
- Machine learning
Six model generations
Liquid neural networks, a LightGBM meta-model, PPO reinforcement learning, transformers and a temporal convolutional network, trained on the recorded data.
- Accounting
Profit reconstruction from exchange records
Every result on this page was reconstructed from raw fill messages and settlements, after each of the project’s own profit trackers was found to be wrong.
Market-maker versions and live results
The first analysis measured where the spreads were. Bitcoin and Solana traded 1 to 5 cents wide; BNB and HYPE averaged 30 to 60. I wrote the first bot on the night of March 28 and it was trading live on five coins by 2:17 a.m. Over the next four weeks it went through about ten versions.

| Version | Dates | What changed |
|---|---|---|
| Simple quoting scripts | Mar 28 – 29 | One script per coin, improving the best bid by 1¢ |
| Orchestrator and auto-tuner | Mar 29 – Apr 1 | Seven worker processes, a database, a 15-minute analysis engine and a Coinbase spot circuit breaker |
| Simple scripts, second run | Apr 1 – 11 | Reverted to standalone bots with relaxed price limits; Bitcoin dropped |
| Optimized production line | Apr 11 – 24 | Optuna-chosen parameters, an order-book imbalance shield and dynamic sizing |
- BNB9,615
- XRP7,992
- HYPE7,570
- ETH3,777
- SOL3,499
- DOGE2,741
- BTC1,410
The thinly traded coins, where spreads were widest, account for most of the volume
The simplest bots did as well as the most elaborate ones. The orchestrated fleet, with its database, dashboard and self-tuning parameters, ran for two and a half days and did not outperform the plain scripts that replaced it.
Ordinary spread capture was positive but small, and 83% of its contracts were filled as resting orders. A side branch that applied the same quoting to sports, weather and other non-crypto markets broke even after fees.
Profit tracker audit
The hardest problem in the project was measuring profit correctly. A later audit rebuilt every result from the raw exchange messages, per market: cash paid, fees, and one dollar for each winning contract held at expiry. Every profit tracker I wrote disagreed with that reconstruction, usually in my favour.
| Measurement | Tracker against reconstruction | Cause of difference |
|---|---|---|
| Market maker, first four days | Overstated the profit | Counted matched buy-and-sell pairs only and left out contracts held to expiry |
| Market maker, whole run | Overstated the profit | Same method: inventory left to expiry lost money, because the positions that fail to exit are mostly the losers |
| Transformer bot’s own log | Showed a profit where the reconstruction shows a loss | Booked early exits only; 58 of the 60 positions held to expiry lost and were never recorded |
| Transformer backtest that justified going live | Showed a profit where the reconstruction shows a loss | Settled trades on a Coinbase price proxy, not on the exchange’s actual result |
Model performance against the market price
From late April I tried to predict the contracts directly, training on my recorded order-book data and Coinbase spot prices: liquid neural networks feeding a LightGBM meta-model, reinforcement-learning agents, and then transformers. One transformer classifier traded live for five days in May. Its own log showed a profit. The reconstruction shows a loss.

- Labels
Proxy training labels
Training labels came from Coinbase prices, which disagreed with the exchange’s real settlement in 8 to 12% of markets. The backtest used the same proxy, so its agreement with the model did not reflect real settlement.
- Information
Publicly available inputs
The inputs were the top of the order book and the spot price, which every participant sees. The early models predicted the result correctly 62 to 65% of the time; “is the price above 50¢” was right 72% of the time.
- Evaluation
Test-set contamination
Early stopping and parameter searches on the test set, random splits of overlapping windows, and searches of 1,000 trials over about 220 trades all produced results that did not hold.
- Data bugs
Zero-valued features and time-zone errors
A file-naming rule meant the trade-flow features were zero in all training data, and recorder timestamps were labelled with the wrong time zone for five weeks.
Conclusion. Passive quoting on thin markets was mildly profitable and not worth its operational burden at that size. The machine-learning track showed no edge: no model beat the market price. The checks I ran at the time, including the chart above, had already shown this, and I traded anyway. That is the lesson I carried most directly into later projects.
Timeline of about twelve system generations
- Mar 28
Recorder starts. First market maker written and live the same night on five coins.
- Mar 29 – Apr 10
Orchestrated fleet, then simpler bots. A side branch quotes non-crypto markets and breaks even.
- Apr 11 – 24
Optimized production line with Optuna-chosen parameters. Market making stops on April 24.
- Apr 26 – May 19
Machine-learning track. A transformer bot trades live for five days and loses.
- Jul 5
A final convolutional model is built and never traded.
All dates are 2026. Live figures are reconstructions from bot logs, with no account statement to confirm them; backtest figures are labelled as such. Past performance does not predict future results. Nothing here is investment advice.