This domain is for sale · trading.bot — serious offers: per@markusakerlund.com Make an offer →
Home / Strategies / Market Making Bots: Earn the Spread (and the Risks)
Strategies

Market Making Bots: Earn the Spread (and the Risks)

t.
trading.bot Research Desk Updated Aug 24, 2026 · 8 min read · Editorial standards
Market Making Bots: Earn the Spread (and the Risks)
Quick answer: A market making bot posts a buy order below the current price and a sell order above it, then earns the difference (the spread) when both fill. It works when trading is quiet and two-sided. It bleeds money when price trends hard against your inventory, or when faster, better-informed traders keep picking off your stale quotes.

How does a market making bot make money?

Every order book has a bid (highest price buyers will pay) and an ask (lowest price sellers will accept). The gap between them is the spread. A market maker's job is to stand in that gap: quote a bid slightly below fair value and an ask slightly above it, and collect the difference each time both sides trade.

Say BTC is trading at 60,000. Your bot posts a bid at 59,997 and an ask at 60,003. If a seller hits your bid and a buyer lifts your ask, you bought at 59,997 and sold at 60,003 — a 6-point, or roughly 1 basis point, gross profit on that round trip. Do that a few thousand times a day and the small edges add up. That is the entire premise.

The catch is in the word "if." You only earn the spread when both sides fill at prices you chose. Real markets rarely cooperate that neatly, which is where the risks live.

How does a market making bot actually work?

Under the hood, a market making bot runs a tight loop. It reads the order book, decides where fair value sits (usually the mid-price or a volume-weighted mid), then places a bid and an ask a set distance from it. As price moves or your orders fill, it cancels and re-posts. Good bots do this many times per second.

Three parameters do most of the work:

The academic reference point is the Avellaneda-Stoikov model, which formalizes exactly this: it computes a "reservation price" that drifts away from mid as your inventory grows, and an optimal spread based on volatility and how much risk you are willing to hold. You do not need the math to run a bot, but the intuition — skew your quotes against your own inventory — is non-negotiable.

Where does the spread income really come from? Fees and rebates

Raw spread capture is only half the picture. The other half is the fee structure. Most exchanges use a maker-taker model: the trader who posts a resting order (the maker) pays a lower fee, or even receives a rebate, while the trader who crosses the spread (the taker) pays more.

Because a market maker is almost always the maker, fees matter enormously. On a typical crypto venue, base maker fees run around 1 to 10 bps, dropping toward zero or into rebate territory at high volume tiers. When your gross spread edge is 1 bp per round trip, a 2 bp fee swing is the difference between a printing strategy and a slow-motion loss. Serious crypto market making is partly a game of earning fee rebates on volume you would otherwise lose money doing.

This is also why the strategy resembles grid trading bots on the surface but is not the same thing. A grid bot places static ladders and waits; a market making bot continuously re-quotes around a moving fair value and actively manages inventory. Grids are set-and-forget; market making is a real-time control problem.

What is inventory risk, and why does it eat profits?

Inventory risk is the first thing that kills market making bots. Here is the mechanism. When price trends up, buyers keep lifting your ask, so you keep selling. You accumulate a growing short position — right as the market moves against it. Every unit you sold at 60,003 is now underwater at 60,200. The spread you earned on each fill is tiny; the loss on the inventory you are stuck holding is not.

The market is not being kind to you when it fills your orders. It fills the side you least want filled. In a strong trend, a symmetric market maker is effectively a machine for buying tops and selling bottoms.

The defenses are all about limiting exposure:

None of these eliminate the risk. They just keep a bad hour from becoming an account-ending one. Sensible position sizing here follows the same logic as any other bot: size so that the worst plausible inventory swing is survivable, not just the average one.

What is adverse selection?

Adverse selection is the second killer, and it is more insidious than inventory risk because you cannot always see it happening. It means the traders who hit your quotes tend to know something you do not.

Your quotes are stale by the time they rest in the book — even a few milliseconds old. A faster trader who sees a price move coming will trade against your outdated quote, taking the good side of the deal. You filled, you booked your spread, and you are already losing, because the "fair value" you quoted against no longer exists. In crypto, where price on one venue leads others, this happens constantly to slow quoters.

You cannot beat information you do not have. What you can do is: quote wider when uncertainty is high, cancel fast when the book shifts, and avoid competing on pairs where professional flow is fastest. A retail bot quoting BTC/USDT against high-frequency firms is the fish at the table.

Is a market making bot actually profitable for retail traders?

Honestly: usually not, on major pairs. Market making on the deepest markets is dominated by firms with co-located servers, rebate deals, and latency measured in microseconds. A retail bot on a home connection is structurally behind on both speed and fees, and after costs most of these setups lose money. This is the same uncomfortable truth we cover in do trading bots actually work.

Where retail market making has a fighting chance is in the gaps the pros ignore: thinner altcoin pairs, newer perp DEX markets, or venues offering generous maker rebates that subsidize the risk. Even there, the edge is thin and inventory risk is worse because the assets are more volatile. Profitability depends less on a clever model and more on unglamorous things: fee tier, uptime, and disciplined inventory limits.

Backtests make this look easier than it is. A market making backtest that assumes your quotes always fill at the price you posted, with no queue position and no adverse selection, will look spectacular and then die in production. This is a textbook case of the trap described in backtest overfitting.

Can you run an automated market maker bot on crypto perps and DEXs?

Yes, and it is one of the more accessible entry points. Centralized exchanges expose maker-friendly APIs and tiered rebates. On the DeFi side, perpetual DEXs have turned market making into something you can participate in without running your own quoting engine.

Hyperliquid is the clearest example. Its HLP (Hyperliquidity Provider) vault runs market making and liquidation strategies on-chain, and depositors share the profit and loss. That means you can get market-making-style exposure by depositing into a vault rather than quoting yourself — with the honest caveat that the vault can and does have losing stretches when markets move violently. If you are quoting perps directly, remember you are also exposed to funding rates on any inventory you carry overnight, which can quietly add to or subtract from your spread income. For the broader toolkit, see our overview of Hyperliquid trading bots.

Whichever venue you choose, the risk profile does not change: you are being paid a small, steady fee to warehouse other people's risk, and the market decides how much of that risk you end up holding at the worst possible moment.

Frequently asked questions

Do market making bots actually make money?

Sometimes, but rarely for retail traders on major pairs. Professional firms dominate with speed and fee rebates that home setups cannot match, so most amateur bots lose money after costs. The realistic edge sits in thinner markets or rebate-heavy venues, where profit depends on discipline more than cleverness.

How much capital do you need to run a market making bot?

There is no fixed minimum, but too little capital hurts you. You need enough to hold inventory through adverse moves without hitting limits constantly, and enough volume to reach better fee tiers. Many retail attempts start in the low thousands, though smaller accounts struggle to overcome fees and inventory swings.

What's the difference between a market making bot and a grid bot?

A grid bot places static buy and sell ladders and waits passively for price to oscillate. A market making bot continuously re-quotes around a moving fair value and actively skews orders to manage inventory in real time. Grids are set-and-forget; market making is a live control problem that reacts every second.

What is adverse selection in market making?

Adverse selection means the traders hitting your quotes usually know something you do not. Faster or better-informed traders trade against your stale prices right before a move, taking the good side. You book your small spread and still lose, because fair value already shifted. Wider spreads and fast cancels are the main defenses.

Can you market make on Hyperliquid?

Yes. You can quote directly through its API, or gain market-making exposure by depositing into the HLP vault, which runs quoting and liquidation strategies on-chain and shares profit and loss with depositors. Both carry real risk: the vault has losing stretches in violent markets, and direct quoting exposes you to inventory and funding costs.

Sources

  1. Investopedia — Market Maker: Definition, What It Does, Examples
  2. Investopedia — Bid-Ask Spread
  3. Investopedia — Adverse Selection
  4. Investopedia — Maker-Taker Fees and Rebates
  5. Avellaneda & Stoikov (2008), High-frequency trading in a limit order book, Quantitative Finance 8(3)
  6. Hyperliquid Docs — Vaults (including the HLP market-making vault)
← PreviousLeverage and Trading Bots: How Much Is Too Much?