What is Hummingbot Trading?

Learn what Hummingbot trading is, how its bots, connectors, and Gateway work across CEXs and DEXs, and where the main risks and limits are.

AI Author: Sara ToshiMar 21, 2026
Summarize this blog post with:
What is Hummingbot Trading? hero image

Introduction

Hummingbot trading is the use of the Hummingbot open-source framework to run automated trading strategies on cryptocurrency exchanges and on-chain protocols. Its importance is not just that it automates orders. The deeper point is that it tries to make liquidity provision itself programmable and portable, so a trader can express a strategy once and connect it to many different venues.

That solves a real market problem. Crypto markets are fragmented across centralized exchanges, on-chain order books, and automated market makers. Each venue has its own API, order rules, latency profile, and operational quirks. If every strategy had to be rewritten for every exchange, only teams with substantial engineering resources could compete. Hummingbot exists to reduce that barrier by separating strategy logic from exchange connectivity.

The result is a framework that can be run locally or on hosted infrastructure, with the trading engine, connectors, and optional middleware arranged as modular pieces. The Hummingbot Foundation describes it as an open-source Python framework for building automated market-making and algorithmic trading bots, with deployment paths ranging from a local client for a single bot to an API-based cloud setup for managing multiple bots. That framing is useful because it tells you what Hummingbot is not: it is not a brokerage, not an exchange, and not a managed fund. It is software you operate.

The clearest way to understand Hummingbot trading is to see the invariant underneath all of its moving parts: a strategy decides what orders should exist, while connectors turn those decisions into venue-specific actions. Once that clicks, the architecture, the strategy types, and even the limitations all make more sense.

How does Hummingbot automate market making and trading strategies?

At first glance, an automated trading bot can seem like a black box that somehow “finds alpha.” Hummingbot is more concrete than that. Mechanically, it watches market data, computes desired actions from a strategy, and sends orders or on-chain transactions through standardized interfaces. The software does not remove the economic risks of trading. It removes some of the engineering friction involved in expressing and executing a trading policy.

That matters most for market making, which is central to Hummingbot’s original design. A market maker provides liquidity by quoting both a bid and an ask, standing ready to buy from sellers and sell to buyers. In return, the market maker hopes to earn the spread between those quotes, but only if fees, adverse selection, inventory drift, and execution risk do not overwhelm that spread. Hummingbot’s whitepaper explicitly frames the project around broadening the set of market makers by lowering technical barriers and enabling what it calls decentralized market making.

This is why Hummingbot is not just a collection of scripts. It is trying to create a reusable machine for a recurring task: observe a venue, compute target prices and sizes, place orders, track their state, refresh or cancel them as conditions change, and keep this loop running across many APIs and market structures. Whether the venue is a spot CLOB exchange, a perpetual venue, or an AMM DEX reached through Gateway, the framework tries to preserve the same high-level rhythm.

There is an analogy here to an operating system abstraction. A program written against a stable OS interface can run on different hardware because the OS hides device-specific details. Hummingbot connectors play a similar role for trading strategies by hiding exchange-specific API details behind a common interface. The analogy helps explain portability. It fails in one important way: exchanges are not passive hardware. They are adversarial, evolving, fee-charging venues with changing rules, outages, and market participants trying to trade against you.

Hummingbot architecture: strategies, connectors, Gateway, and deployment options

The architecture starts with the trading engine, often referred to in the docs as the Hummingbot Client. This is the component that runs strategy logic, tracks orders, polls or streams market data, and maintains the event loop that decides what to do next. If you are running a single bot locally to learn the system, this is the normal starting point.

The second layer is the connector abstraction. Connectors are packages of code that link Hummingbot’s internal engine with exchange and blockchain APIs through REST and WebSocket interfaces. Their purpose is standardization. A strategy should not need to know the exact JSON schema, authentication flow, or order-book message format of each exchange. Instead, it asks the connector for balances, market data, order placement, and cancellations through a common interface.

This abstraction is why the same strategy can often be pointed at different venue types with limited changes. Hummingbot documentation describes support for CLOB connectors and AMM DEX connectors. In practice, that means a strategy written for a central limit order book can use a CEX or an on-chain order book connector, while on-chain AMM interactions are often handled through Gateway, a middleware layer that helps Hummingbot clients connect to DEXs and land transactions on blockchain networks.

Gateway deserves special attention because it marks the boundary where trading logic meets blockchain execution. On a centralized exchange, placing an order usually means authenticated API calls against a custody platform. On an AMM DEX, the equivalent action may involve signing and broadcasting a blockchain transaction, waiting for inclusion, and paying network fees. Gateway exists because those tasks are qualitatively different from normal exchange API calls, yet Hummingbot still wants strategies to invoke them through a more uniform interface.

Around these core pieces are deployment and control tools. The official docs emphasize two main operational paths. The Hummingbot Client is best suited to local installation and single-instance use. The Hummingbot API is positioned as the server layer for cloud deployments and multi-bot management, with interfaces such as Condor used for control. The practical distinction is simple: local client setups are easiest for experimentation; API-based setups are for operators who want orchestration, automation, and multiple production bots.

How does a Hummingbot strategy decide prices and manage orders?

ModelHow it runsModularityBacktesting & deploymentBest for
Scriptontick callbacks each tickLow; direct codeSimple backtests; manual deployQuick experiments
ControllerComponent-based executorsHigh; reusable componentsCleaner backtests; multi-bot readyProduction and scaling
Legacy V1Rigid template-driven loopLow; mixed concernsHarder to reuse/testCompatibility with older bots
Figure 280.1: Scripts vs Controllers in Hummingbot

A strategy in Hummingbot is not merely a “signal.” It is an automated policy that repeatedly answers a concrete question: given the latest market state and my current inventory, what orders should exist right now? The implementation details differ by strategy family, but this question is the common mechanism.

The framework’s newer Strategy V2 model exposes two main ways to express this logic: Scripts and Controllers. A script gives the developer an entry point like an on_tick method and access to core components. That is the more direct path: every clock tick, inspect the state and decide what to do. Controllers are a more modular pattern built from components such as executors, intended to support backtesting and multi-bot deployment more cleanly. The broad idea is that Hummingbot is moving from rigid templates toward more composable strategy logic.

That distinction matters because there are really two jobs inside any bot. The first job is decision-making: where should orders be priced, how large should they be, and when should they be canceled? The second job is execution management: did the order actually post, partially fill, expire, or fail? Older strategy templates often mixed these concerns tightly. A more modular controller-based approach makes it easier to isolate them.

A useful worked example is the Pure Market Making strategy, because it is close to the canonical Hummingbot loop. PMM runs on a single spot trading pair on CLOB exchanges. It places bid and ask limit orders around a reference price, often the mid-price, using configurable spreads such as bid_spread and ask_spread. Every order_refresh_time seconds, the bot refreshes the quote set by canceling stale orders and replacing them with new ones.

Imagine a bot trading ETH-USDT on a spot exchange. Suppose the best bid is 2,999 and the best ask is 3,001, so the mid-price is 3,000. If the configuration tells PMM to quote 0.5% away from mid on both sides, the bot computes a target bid around 2,985 and a target ask around 3,015. It then submits those limit orders through the connector. As the market moves, the mid-price changes. Once the refresh interval expires, or if other internal conditions trigger a change, the existing orders are canceled and a fresh pair is proposed at new prices.

The mechanism matters more than the numbers. PMM is effectively trying to keep a standing quote on both sides of the market while avoiding two bad outcomes: posting stale orders too far from the current market, or posting too aggressively and getting picked off. This is why the docs emphasize not only pricing parameters but also order filtering, order optimization, hanging order behavior, inventory skew, and external price sources. These are all attempts to control the tension between fill probability and quote safety.

The PMM docs describe this as a tick-by-tick process. On each tick, the strategy first checks whether it should proceed. It then queries pricing and sizing logic, merges those proposals with cancellation logic, and executes the final set of actions. Each limit order gets an expiry timestamp tied to order_refresh_time. When that time is reached, the strategy generates a cancel proposal. This small detail explains a lot about Hummingbot’s behavior: it is not placing one “smart” order and waiting. It is continuously managing a short-lived inventory of orders.

Why inventory management matters more than spread in market making

A common beginner mistake is to think market making is mainly about choosing a spread. In practice, the harder problem is inventory management. If your bid fills repeatedly while your ask does not, you accumulate the base asset. If the market then falls, your mark-to-market losses can exceed many rounds of earned spread. If the reverse happens, you may sell too much inventory and miss upside or lose your ability to continue quoting symmetrically.

Hummingbot’s strategy configuration reflects this reality. PMM exposes features such as inventory_skew_enabled and inventory_target_base_pct, which let the bot bias order placement toward a desired portfolio split between base and quote assets. This is not cosmetic tuning. It changes the economics of the strategy by making the bot more eager to buy when inventory is too low and more eager to sell when inventory is too high.

The Avellaneda market-making strategy makes this inventory logic explicit. Rather than just placing symmetric orders around the mid-price, it computes a reservation price and an optimal spread from current liquidity, observed volatility, target inventory, session timeframe, and a user-chosen risk_factor, also called gamma. The reservation price is the price around which the bot would most like to trade given its inventory. If the bot holds too much of the asset, the reservation price shifts downward relative to mid, encouraging sells and discouraging buys. If it holds too little, the shift goes the other way.

This is a better model of what a serious market maker is actually trying to do. The goal is not “always quote mid plus or minus x.” The goal is “quote in a way that earns spread while steering inventory back toward a tolerable level.” Hummingbot’s Avellaneda implementation also supports an eta parameter to asymmetrically shape order sizes, so the strategy can influence inventory not just through prices but also through size.

There are caveats here, and the docs are appropriately cautious. The Avellaneda pages note that extreme risk_factor settings can push reservation prices or spreads into impractical territory, even to the point where valid orders may not be placed. They also note that the liquidity and volatility estimators need enough data to fill internal buffers before the model can behave as intended. This is an important reminder that formal models do not remove operational judgment. They add structure to it.

What is cross-exchange market making and how does it work?

ApproachInventory needsSpeed & latencyMain operational riskPrimary benefit
Single-venue MMSingle account inventoryLower speed requirementsOrder flow toxicity; inventory driftSimpler operations; steady spreads
Cross-exchange MMInventories on multiple venuesHigh speed and monitoringHedge leg failure; transfer delaysEarn wider spreads while hedging
Pure arbitrageMinimal net inventory if hedgedVery high speed requiredExecution slippage; intense competitionCapture price differences
Figure 280.2: Cross-exchange market making trade-offs

Hummingbot’s whitepaper gave special emphasis to cross-exchange market making. The basic idea is elegant. You quote liquidity on one venue while using prices from another venue as the anchor, and when your quoted order is filled, you offset that exposure elsewhere. This combines aspects of market making and arbitrage.

Why does that matter? Because a trader may want to provide liquidity on a venue where spreads are wider or incentives are better, while hedging on a more liquid venue where execution is easier. The quoted venue becomes the place where spread is earned. The hedge venue becomes the place where inventory risk is neutralized.

In principle, this can be powerful. In practice, the whitepaper is clear that it is operationally demanding. You need inventories on multiple exchanges, because inter-exchange transfers are slow and costly relative to the speed of trading opportunities. Arbitrage windows are short-lived and highly competitive. Exchange reliability matters. The strategy must account for spreads, fees, latency, order-book depth, and the possibility that one leg executes while the hedge leg slips or fails.

This is a good example of Hummingbot’s philosophy. It does not assume the market is clean. It exposes the messy engineering reality and tries to provide software tools for dealing with it: spread buffers, order book analysis, connector abstractions, and reliability-oriented monitoring. But the framework cannot abolish the underlying frictions. Cross-exchange strategies remain more complex because the market itself is fragmented.

CEX vs DEX execution risk: what changes when you move on-chain?

VenueExecution flowMain delays/failuresSecurity & custodyBest for
Centralized Exchange (CEX)REST/WebSocket orders; instant matchingAPI outages; rate limits; order rejectionsExchange custody of fundsLow-latency trading
AMM DEX (on-chain)Sign transaction, broadcast, confirmChain congestion; failed or front-run txsUser wallet private keysNoncustodial listings; token access
Hybrid (CEX + DEX)Mixed API calls and signed txsAsymmetric leg execution riskSplit custody; transfer delaysCross-venue hedging
Figure 280.3: CEX vs DEX execution risks

Hummingbot is often described as a framework that works across both centralized and decentralized exchanges. That statement is true, but the phrase can hide an important distinction. The strategy may be portable; the execution risk is not.

On a centralized exchange, the main concerns are API reliability, rate limits, custody risk, account permissions, and the accuracy of exchange-reported state. On a DEX or other on-chain protocol, the concerns extend to wallet security, transaction fees, confirmation time, slippage, and whether your transaction is actually included on-chain when and where you expected. Gateway exists because these are not small implementation details. They are a different execution environment.

Consider the same high-level intention (“rebalance by buying on one venue and selling on another”) expressed in two settings. If both venues are centralized exchanges, the bot mostly interacts with order books and account balances through APIs. If one side is an AMM DEX, the trade may route through a smart contract call and become exposed to chain congestion or gas spikes. The strategy concept is the same, but the failure modes are different.

This is also why Hummingbot is designed as user-operated software with sensitive credentials stored locally and encrypted, according to the whitepaper. The trust model is that you run the bot and retain control of API keys and wallet credentials, rather than sending them to a fully managed centralized service. That improves user control, but it also means operational security becomes the user’s responsibility.

When should you use Hummingbot for live market making or automation?

Hummingbot is most useful when a trader or team wants structured automation, not just a one-off script. If the goal is to continuously quote markets, maintain inventories across venues, or experiment with parameterized strategies, the framework gives a reusable base: event loop, state management, connectors, deployment options, and strategy templates.

This is especially relevant for traders who care about market making as a business process rather than a single trade idea. A discretionary trader can manually decide to buy or sell. A market maker needs a machine that watches, reprices, cancels, replaces, and records activity continuously. Hummingbot’s design is much closer to that second need.

It is also useful for teams that need portability. Because connectors standardize exchange interaction, the same broad strategy can often be moved from one venue to another without rewriting the whole bot. That does not mean connector differences disappear, but it does mean the strategy can be expressed at a higher level than raw API code.

The project’s ecosystem reflects this practical use. The official site highlights modular components such as the client, API, Gateway, Condor, MCP, and Quants Lab, along with a real-time reporting dashboard for instance-reported volume. Public materials also point to substantial community adoption and broad venue coverage, though those volume figures are reported by Hummingbot instances and should be read as ecosystem telemetry rather than as audited total market statistics.

What risks and failures should you watch for when running Hummingbot?

The easiest way to misunderstand Hummingbot trading is to treat automation as if it were risk removal. In reality, automation mostly changes the shape of risk. It can reduce reaction time and manual error, but it also lets mistakes repeat faster and more consistently.

A market-making bot can lose money because spreads are too tight for fees, because the market trends hard in one direction, because inventory skews too far, because stale orders remain live too long, or because external price references become misleading. A cross-exchange bot can fail because the hedge venue lags, balances become uneven, or transfer and execution frictions prevent proper rebalancing. A DEX-integrated bot can run into gas costs, failed transactions, or chain-specific issues.

Connector quality is another important limitation. Hummingbot’s connector model is powerful precisely because it abstracts venue complexity, but that also means connectors need ongoing maintenance as exchange APIs change. The official docs are explicit that connector upkeep is continuous work involving bug fixes, user issues, and adaptation to evolving standards. Portability depends on maintenance.

Security is similarly nuanced. The repository’s GitHub security advisories page currently shows no published advisories, but that should not be overread as proof of no vulnerabilities. More practically, deployment choices matter. The repository notes that Gateway starts in development mode with unencrypted HTTP by default unless production settings are configured. In other words, the software can be used safely, but only if the operator understands the environment they are creating.

Finally, no framework can guarantee profitability. Hummingbot gives you a structured way to express and execute strategies. Whether those strategies make money depends on market conditions, fees, latency, competition, parameter choice, and operational discipline.

How does Hummingbot's open governance affect connector support and project stability?

Hummingbot’s open-source status is not a side detail. The framework is described across the official site, docs, and repository as open source under Apache 2.0, with some components under Apache 2.0 or MIT licenses, and maintained by the Hummingbot Foundation with community participation. That matters because users can inspect the code, extend strategies, and avoid being locked into a black-box vendor.

It also shapes connector development and project evolution. Official docs describe governance processes around which connectors are supported and how proposals are made. The Foundation’s bylaws define an HBOT-based governance system for proposals and DAO resolutions, while also preserving board oversight and emergency intervention powers in defined adverse events. For an end user, the practical consequence is that Hummingbot is neither a purely centralized product nor a pure spontaneous commons. It is an open-source project with formal governance and explicit control points.

That governance layer becomes relevant when you depend on connector maintenance or want new venue support. A strategy framework is only as useful as its integrations, and integrations require engineering effort and prioritization. Hummingbot exposes that reality rather than hiding it.

Conclusion

Hummingbot trading is best understood as programmable market interaction: strategies decide what trades should exist, and connectors and middleware turn those decisions into real orders and transactions across many venues. The big idea is not just automation. It is the separation of trading logic from exchange-specific plumbing.

That separation is why Hummingbot can support single-venue market making, inventory-aware quoting, and more complex cross-exchange workflows across CEXs and DEXs. It is also why the framework is useful without being magical. It lowers the engineering barrier to trading automation, but the economics and risks of trading remain exactly where they always were.

If you remember one thing tomorrow, remember this: Hummingbot does not make markets easy; it makes them operable.

How do you improve your spot trade execution?

Improving spot trade execution means reading the order book, choosing the right order type, and limiting slippage while keeping fees in mind. On Cube Exchange, fund your account and use the market/order tools to place post-only or limit orders, size them to match visible depth, and monitor fills in real time.

  1. Fund your Cube account with fiat via the on-ramp or deposit a stablecoin (USDC/USDT) by on-chain transfer.
  2. Open the target market (e.g., ETH/USDC). Inspect the top 5 price levels of the order book and note the quoted spread and cumulative depth at each level.
  3. Choose an execution type: use a post-only limit order to capture maker pricing, a standard limit order placed a few ticks inside the spread for faster fills, or an IOC/FOK if you need immediate taker execution.
  4. Size orders to avoid walking the book: split large positions into multiple limit slices or a simple time-sliced sequence (3–5 chunks) and submit them sequentially.
  5. Review estimated fees and expected slippage, submit the order, and cancel or adjust if the book shifts beyond your depth checks.

Frequently Asked Questions

If I write a Hummingbot strategy once, can I run it unchanged across any CEX or DEX?

Not always - Hummingbot separates strategy logic from exchange-specific connectors so the same strategy can often be pointed at different CEXs and DEXs, but connectors and execution environments differ in APIs, rules, and failure modes, so you will frequently need connector-specific adjustments and to account for different execution risk when moving a strategy between venues.

Why is inventory management usually more important than choosing the spread in Hummingbot market making?

Because repeated one-sided fills change your inventory and expose you to directional moves, managing inventory (via skew parameters or model-derived reservation prices) is usually the harder and more consequential task than merely choosing a spread.

How do Strategy V2 Controllers differ from Scripts and why does that matter?

Scripts give a simple on_tick entry point for direct decision-making each clock tick, while Controllers are a more composable pattern (with executors and components) designed to cleanly separate decision logic from execution and to better support backtesting and multi-bot orchestration.

What extra risks should I expect when running a Hummingbot strategy that interacts with DEXs compared to CEXs?

On-chain DEX execution adds qualitatively different risks: you must sign and broadcast transactions, wait for inclusion, pay gas fees, and face slippage and potential failed transactions - all of which create different failure modes than CEX API calls and are why Gateway middleware exists to normalize those interactions.

Does Hummingbot hold my API keys and wallet private keys for me, or where are credentials stored?

Hummingbot is intended as user-operated software and, per the project’s materials, sensitive credentials (API keys and wallet keys) are kept by the operator and stored locally (the whitepaper and docs describe local encrypted storage), so you retain custody and therefore responsibility for operational security.

Can I rely on any connector to keep working forever, or how guaranteed is connector maintenance?

Connector upkeep is continuous: connectors must be maintained as exchange APIs and blockchain protocols change, and adding or prioritizing connectors is governed by the Foundation’s processes and community governance rather than being automatically guaranteed.

Why are cross-exchange market-making strategies operationally difficult even though the idea seems simple?

Cross-exchange market making requires inventories on multiple venues, fast and reliable execution to capture short arbitrage windows, and careful handling of fees, latency, and transfer delays - practically it is operationally demanding because transfers are slow/costly and hedges can fail or slip between legs.

How does Hummingbot handle partially filled orders - will partial fills change refresh and cancel timing?

The public docs and strategy pages do not fully specify partial-fill handling for every strategy; for exact behavior on partially filled orders (timing, sizing adjustments, and refresh logic) you should inspect the specific strategy’s source code referenced in the docs because runtime behavior can depend on configuration and implementation details.

What's the practical difference between running the Hummingbot Client locally and using the Hummingbot API/Condor in the cloud?

The Hummingbot Client is the easiest path for local, single-bot experimentation, while the Hummingbot API (server layer) plus tools like Condor are intended for cloud deployments, orchestration, and managing multiple production bots.

Is Gateway secure by default or do I need to change its configuration before using it in production?

Gateway starts in development mode with unencrypted HTTP by default; to run Gateway in production you must disable dev mode (set DEV=false) and generate TLS certificates so traffic is served over HTTPS.

Related reading

Keep exploring

Your Trades, Your Crypto