Book a free call

How Automated AI Trading Bots Change Market Liquidity

AI trading bots quote prices around the clock and tighten spreads, but in a stress event they can pull back at once and drain liquidity. Here is how it works.

Hertiv engineering teamReviewed by a senior engineer
8 min read
How Automated AI Trading Bots Change Market Liquidity
On this page

Short answer

Automated AI trading bots change market liquidity in both directions. In calm markets they narrow spreads and deepen order books by quoting buy and sell prices continuously. In stressed markets they can withdraw together, widen spreads and deepen falls. Whether they help or hurt depends on how they are built, what data they learn from, and the controls around them.

What is an automated AI trading bot?

An automated AI trading bot is software that buys and sells assets on its own, using a machine learning model or a set of rules to decide when to trade, how much to trade and at what price. It watches prices, order books and sometimes news, then places orders without a human clicking a button.

Older bots followed fixed rules, such as buying when a price crossed a moving average. AI-driven bots learn patterns from past market data and adjust their behaviour as conditions change. A bot might learn that spreads widen before a news release, or that a certain order-book shape usually precedes a price move.

Most bots do one of three jobs. Market-making bots quote buy and sell prices to earn the spread. Arbitrage bots exploit price gaps between venues. Execution bots split a large order into small pieces so it moves the price less. The liquidity impact comes mostly from the first two, which is where DeFi trading bots and exchange liquidity shows the same pattern in crypto markets.

How do bots add liquidity to a market?

Bots add liquidity by always being ready to trade. A market maker quotes a buy price slightly below the current price and a sell price slightly above it, all day and night. Anyone who wants to buy or sell can trade against those quotes instead of waiting for another person to show up.

This matters most in quiet markets and smaller assets. A thinly traded token or stock might sit for minutes without a trade if only humans are watching. A bot keeps quotes live, so a seller can exit and a buyer can enter without a long wait or a large price concession.

The bot earns the gap between its buy and sell prices, which is called the spread. In return, the market gets continuous prices and smaller price jumps between trades. Exchanges encourage this by paying rebates to bots that quote on both sides, and by ranking venues on how tight their spreads are.

What happens to spreads and order-book depth?

The clearest sign of a bot's effect is the spread and the depth of the order book. The table below compares a market with and without active quoting bots, in the usual direction of the effect.

MeasureWithout botsWith quoting bots
Bid-ask spreadWider, moves with each tradeNarrower and steadier
Depth near the priceThin, few orders close byThicker, more orders stacked
Cost of a large orderHigher, price slips moreLower, more volume absorbs it
Trading outside hoursSlow or stoppedContinues around the clock
Price after a shockGaps and jumpsSmoother, but can thin fast

Depth is the amount available to trade near the current price. When bots stack orders on both sides, a large buy or sell order moves the price less, because it eats through quoted volume instead of jumping to the next human order far away.

The last row is the warning. Bots improve the average day but can make the worst day worse, because the same bots that add depth in calm conditions may withdraw it together when risk rises. That is why liquidity matters for crypto exchanges as much as for stock markets.

How does arbitrage keep prices in line?

Arbitrage bots keep prices in line by buying an asset where it is cheap and selling it where it is dear. If a token trades at 100 on one exchange and 101 on another, a bot buys on the first, sells on the second, and pockets the difference minus fees.

Each arbitrage trade pushes the two prices toward each other. The cheap venue gets buying pressure, which lifts its price, while the dear venue gets selling pressure, which lowers it. The gap closes quickly, often within seconds, so traders on either venue see prices close to the wider market.

This is useful for anyone who needs a fair price. A fund buying a large position does not want to pay 101 when the same asset is 100 elsewhere. Arbitrage also connects new venues to established ones, so a small exchange can offer prices that track the big markets from day one.

The limit is cost. Arbitrage only works when the gap is bigger than fees, transfer times and the risk that the price moves before both legs complete. Bots that are too slow, or that trade on venues with slow withdrawals, lose the gap before they can close it.

What is different about AI-driven bots?

AI-driven bots differ from rule-based bots because they learn and adapt. A rule-based bot does the same thing every time a condition appears. A machine learning bot updates its view of the market from new data, so it can change its quotes, its size and its risk limits as conditions shift.

That adaptability helps in normal conditions. An AI bot can learn that volatility rises after certain news, widen its quotes ahead of the event, and tighten them again once the news passes. It can also learn which order-book shapes signal real demand and which signal a spoof, where a trader places orders they never intend to fill.

The risk is that many bots learn the same lessons from the same data. If hundreds of models are trained on the same price history and the same news feeds, they can reach the same conclusion at the same moment. When they all pull quotes together, liquidity vanishes at exactly the time traders need it most.

AI bots also carry model risk. A model trained on calm years may behave badly in a crisis it has never seen, and a model that overfits to past patterns can trade confidently on a signal that no longer works. Teams that run these bots usually add hard limits on size, loss and speed, so the model cannot act without a guardrail.

When do bots drain liquidity instead?

Bots drain liquidity when they withdraw at the same time. In a sharp fall, a market-making bot faces a simple problem: if it keeps quoting, it will buy an asset that keeps falling. Its risk model tells it to widen its quotes or stop quoting entirely, and most bots reach that conclusion within seconds of each other.

The result is a thinner order book, wider spreads and larger price jumps. A sell order that would have moved the price by 1 in a normal market can move it by 5 when the bots are gone. That is the pattern behind flash crashes, where prices fall sharply in minutes and then partly recover once quoting resumes.

Exchanges and regulators respond with circuit breakers, which pause trading after a large move, and with rules that require designated market makers to keep quoting through stress. Some venues also slow down the fastest orders, so a human or a slower bot has time to step in.

For traders, the lesson is to treat bot liquidity as fair-weather liquidity. It is real and valuable on most days, but it is not a promise. Orders placed during a stress event should be smaller, patient and priced with limits, because the depth shown on screen may not be there when the order arrives. The same caution applies when teams plan a venue, which is part of crypto exchange development and its liquidity design.

Example (hypothetical): a mid-size exchange on a volatile morning

Example (hypothetical): a mid-size exchange lists a token at 100. On a normal morning, quoting bots hold 50,000 units within 1 of the price on each side, and the spread is 0.50. A trader who wants to sell 30,000 units can do so with little price movement.

At 10:00, a large seller places a market order for 30,000 units. The bots absorb the first 20,000 units at prices between 99 and 100, and the remaining 10,000 units push the price down to 98. The sale is done, and the price has slipped by 2.

Then the bots react. Their models see a sharp fall and widen their quotes. The spread grows from 0.50 to 4, and the depth within 1 of the price falls from 50,000 units to 8,000 units. A second seller of 10,000 units now faces a much worse price than the first seller did, even though the news has not changed.

By midday the bots return, the spread narrows back to 0.60, and depth recovers to 45,000 units. The morning shows both sides of the story: bots made the first sale cheap and easy, then made the second sale expensive by leaving together.

What are the common mistakes?

The most common mistakes with AI trading bots are trusting screen liquidity, ignoring correlated models, and running a bot without limits.

  • Trusting the depth on screen. Quoted volume can vanish in seconds, so a large order should be split and priced with limits.
  • Ignoring model correlation. If every bot learns from the same data, they will act together in a crisis. Diversify models and venues.
  • Running without hard limits. A bot needs maximum size, maximum loss and a kill switch that a human can reach.
  • Backtesting on calm data only. A model that has never seen a crash will behave badly in one. Test on stress periods too.
  • Chasing the tightest spread. The cheapest quote is often the first to disappear. Depth and reliability matter more than the headline spread.

Key takeaways

  • Bots add liquidity by quoting buy and sell prices continuously, which narrows spreads and deepens order books
  • Arbitrage bots keep prices aligned across venues by buying cheap and selling dear
  • AI bots adapt to changing conditions, but models trained on the same data can act together
  • In a stress event bots can withdraw at once, widening spreads and deepening falls
  • Treat bot liquidity as fair-weather liquidity: split large orders and use limits

Frequently asked questions

Do trading bots improve liquidity?

Yes, on most days. Quoting bots narrow spreads, deepen order books and keep trading going around the clock. The improvement is real but conditional: the same bots can withdraw together in a stress event, so the liquidity they add is not guaranteed when markets are under pressure.

What is the difference between an AI trading bot and a rule-based bot?

A rule-based bot follows fixed conditions, such as buying when a price crosses a level. An AI bot learns patterns from market data and adjusts its quotes, size and risk limits as conditions change. AI bots adapt better to new regimes but can behave unpredictably on data they have never seen.

Can trading bots cause flash crashes?

They can contribute to them. When many bots reach the same conclusion at once, they can pull their quotes together, which thins the order book and lets a sell order move the price much further. Exchanges use circuit breakers and market-maker obligations to limit this effect.

How does arbitrage improve liquidity?

Arbitrage bots buy an asset where it is cheap and sell it where it is dear, which pushes the two prices toward each other. This keeps prices aligned across venues and means traders on a small exchange see prices close to the wider market instead of stale or distorted ones.

Why do spreads widen when markets fall?

Market makers widen spreads because quoting during a fall risks buying an asset that keeps dropping. Their risk models tell them to charge more for taking that risk or to stop quoting. When many bots do this at once, the spread widens sharply and depth near the price thins out.

Should a new exchange rely on bots for liquidity?

Bots help, but they are not enough on their own. A new exchange should combine quoting bots with designated market makers who are paid to quote through stress, plus circuit breakers and fee structures that reward depth. Relying only on voluntary bots leaves the venue exposed in a crisis.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building a trading product and need liquidity design? Talk to Hertiv.

A senior engineer replies within one business day. Or see our AI agents for finance service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call