Skip to content

Controllers

Controllers are the production-grade building block of the Strategy V2 framework. They define reusable, modular sub-strategies that are more configurable and robust than standalone scripts — ideal for long-running deployments and multi-strategy setups.

A controller interfaces with the MarketDataProvider (OrderBook, Trades, Candles) and emits ExecutorActions that instruct the parent script to create or stop executors. Controllers are not started directly — they are loaded by the special v2_with_controllers.py script, which can run multiple controllers simultaneously in a single bot instance.

Controllers vs Scripts

Use controllers when you need: - Multiple strategies running in parallel (e.g., market making on 5 pairs) - Production-grade, config-driven deployments - Strategy logic that's reusable and independently testable

Use scripts for simpler, single-pair strategies or when learning the framework.

Base Classes

Controller base classes live under hummingbot/strategy_v2/controllers/:

Implementations live under the top-level /controllers directory in the repo. The CLI name is the path with / replaced by . (for example market_making.pmm_simple, generic.lp_rebalancer.lp_rebalancer).

Directional Trading Controllers

These strategies aim to profit from predicting the market direction and take positions based on signals.

Market Making Controllers

Other Controllers