Home › Guides › Hummingbot Explained

WHY BOTS FAILFREENO ACCOUNTAUTOMATED TRADE BOTSHummingbot ExplainedThe arithmetic of how bots failEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on hummingbot explained. Education only, with example numbers labelled.
WHY BOTS FAIL

Hummingbot Explained

Short answer

Hummingbot is an open source framework for running trading bots. It is best known for market making, which means placing both a buy order below the price and a sell order above it and trying to earn the gap.

Hummingbot is an open source framework for running bots that quote buy and sell prices, often called market making. This page explains the idea and the arithmetic, and says what we have not checked.

The page explains the idea in plain words, works through the arithmetic with a table, and shows how it hits grid, martingale and DCA bots, then tells you what to check before you run one.

  • A worked example with real arithmetic
  • How it hits grid, martingale and DCA bots
  • How to check for it before you run a bot
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Next: how market makers work

The market maker page explains who they are and how they earn and lose.

Read about market makersFree, no account
Reading time6 minutes
Worked exampleExact arithmetic
Tools linked0 on this page
Reviewed28 Oct 2026

What is included

  • What it is, in plain words
  • The formula or mechanism, with exact arithmetic
  • How it hits grid, martingale and DCA bots
  • A check you can run before you switch a bot on

Who it is for

  • People who run or plan to run a trading bot
  • Anyone reading a backtest or a bot sales page
  • Readers who want the numbers, not the pitch
  • Not advice, and not a signal service
Net gain per completed round trip by quoted spread, after a made-up 0.1 percent fee a side-0.10%0.1% spreadbid to ask+0.00%0.2% spreadbid to ask+0.20%0.4% spreadbid to ask+0.60%0.8% spreadbid to askMade-up fee of 0.1 percent of order value on each side, so 0.2 percent a round trip. Calculated by us on 31 Oct 2026, exact for theseinputs.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • Hummingbot is an open source framework for running trading bots. It is best known for market making, which means placing both a buy order below the price and a sell order above it and trying to earn the gap.
  • A market maker earns the spread when both sides fill, and carries inventory risk when only one side does. The second is where most of the danger sits.
  • In a made-up example with a 0.1 percent fee a side, a quoted spread of 0.2 percent nets 0.00 percent a round trip and a spread of 0.4 percent nets 0.20 percent (calculated by us on 31 Oct 2026, exact).
  • If the price then falls 1 percent before the sell fills, the same trips net -1.00 percent and -0.80 percent. One move can cancel many small gains.
  • This page explains how something works and does not recommend it. We have not tested it for this page. Check the current terms.

What Hummingbot is

Hummingbot is open source software for building and running trading bots, with a focus on strategies such as market making and arbitrage across exchanges. Open source means the code is public, so anyone can read it, run it and change it. It is a framework: it connects to exchange interfaces, keeps track of orders and balances, and lets you choose or write a strategy.

We have not installed it, run it, or read its current documentation for this page. Which exchanges it connects to, which strategies come with it, how it is installed and how it is licensed are facts to read in its own current documentation. Nothing on this page describes a feature of a particular version.

What market making means

Most orders in a market wait in a list. People who place waiting orders to buy below the price and sell above it are called market makers, because they supply the orders that others trade against. The gap between the best buy and the best sell is the spread. A market maker bot quotes a buy at a bid price and a sell at an ask price around a mid price, and when both fill, it keeps the gap. It must also cancel and replace its quotes as the mid moves, which is most of the work of the bot.

Which side fills first is not up to the bot. If the price drifts down, the buy fills and the sell does not, and the bot is left holding the asset as it falls. This is inventory risk.

The settings a market making bot needs

  • Spread. How far the buy and sell sit from the mid. Wider means more per trip and fewer fills.
  • Order size. How much each quote offers. Larger means more exposure when only one side fills.
  • Refresh time. How long a quote lives before it is cancelled and re-placed. A fast refresh keeps up with the price and sends many requests. See Binance API for the request arithmetic.
  • Inventory limits. How much of the asset the bot may hold before it stops quoting one side or skews its prices.
  • A stop. What the bot does in a fast one-way move.

Worked example: spread against fees

The numbers are made up. The mid price is 100. The bot buys at the bid and sells at the ask, and pays a fee of 0.1 percent of the order value on each side, so 0.2 percent a round trip. Each row sets a different total spread, measured from the bid to the ask as a share of the mid.

Quoted spreadBidAskGross gain per tripFees per tripNet per trip
0.1%99.95100.050.10%0.20%-0.10%
0.2%99.90100.100.20%0.20%0.00%
0.4%99.80100.200.40%0.20%0.20%
0.8%99.60100.400.80%0.20%0.60%

Calculated by us on 31 Oct 2026, exact for the stated inputs. At a spread of 0.1 percent the fees are larger than the gain, so each completed trip loses. The quoted spread must clear the round trip fee before anything is earned. The fee rate here is invented, and real rates differ by venue and account, so use your own.

Worked example: inventory risk

Take the same bot. It buys at the bid. Before its sell fills, the mid price falls 1 percent, and the bot re-quotes its sell around the new mid. It completes the trip at the new ask, which is lower than the old one.

Quoted spreadBought atSold at (after a 1% fall)Net per trip after fees
0.1%99.9599.05-1.10%
0.2%99.9099.10-1.00%
0.4%99.8099.20-0.80%
0.8%99.6099.40-0.40%

Calculated by us on 31 Oct 2026, exact. Even with a spread of 0.8 percent the trip loses 0.40 percent once the mid has fallen 1 percent. A bot that earns a fraction of a percent per trip can give back many trips of gain in one move. If the bot does not sell at a loss, it keeps holding, which is the same risk with the loss not yet counted.

The same round trips if the mid price falls 1 percent before the sell fills (net, percent)-1.10%0.1% spreadafter a 1% fall-1.00%0.2% spreadafter a 1% fall-0.80%0.4% spreadafter a 1% fall-0.40%0.8% spreadafter a 1% fallBought at the bid, sold at the new ask after the mid fell 1 percent. Made-up 0.1 percent fee a side. Calculated by us on 31 Oct 2026,exact.
A one percent fall in the mid price turns trips that earned a little into trips that lose, at every spread shown.

How a market making bot breaks

  • One-way markets. A steady trend fills one side again and again, and the bot builds a large position against the move.
  • Stale quotes. If a network or data problem delays a cancel, a quote can sit at an old price while the market has moved, and fill on bad terms.
  • Fees larger than the spread. A spread set too tight loses on each completed trip.
  • Thin books. Where there are few other orders, the bot is the market, and its fills are large against what the market can absorb.
  • Software risk. Open source code can have bugs, and a bot that is left running unwatched can do the wrong thing at speed.

How to check a setup

  1. Write down the round trip fee for your account and compare it with the spread you quote.
  2. Work out the loss on the largest position the bot may hold if the price falls the width of a normal bad day.
  3. Run on a practice environment first, and on paper trading on real prices.
  4. Start with a very small size, compare each fill with the quote, and check the log every day.
  5. Read the code you run. See open source crypto trading bot.
This page explains how something works and does not recommend it. We have not tested it for this page. Check the current terms of the software and of every exchange you connect it to. Crypto-assets can be financial products and can lose all the money put into them.

What this page does not tell you

It does not say how Hummingbot behaves, what it costs, or whether market making earns money. The spreads, fees and the one percent fall are made up. For a related bot type that also rests orders at set prices, see market maker and grid trading bot.

FAQ

Frequently Asked Questions

What is Hummingbot?

It is an open source framework for running trading bots, known for market making. Read its own current documentation for the exchanges and strategies it supports.

What is market making?

Placing a buy order below the price and a sell order above it, and trying to earn the gap when both fill. When only one side fills, the bot is left holding inventory.

Why can market making lose money?

Inventory risk: a one-way move fills one side repeatedly and leaves a position against the move. Fees larger than the spread also lose on every trip.

Is open source software safe to run?

Not automatically. The code is public, which lets you read it, and it can still contain bugs. Test with practice funds and then very small size.

What should I check before running it?

The round trip fee against your spread, the largest position the bot may hold, the key permissions you give it, and what it does in a fast one-way move.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It explains how a market making framework works, using made-up numbers. It does not recommend any software or venue.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss