Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hummingbot/hummingbot/llms.txt
Use this file to discover all available pages before exploring further.
start
Starts the trading bot with your configured strategy.
Basic Usage
This will:
- Perform preliminary checks (configuration, connections)
- Initialize the strategy
- Connect to exchanges
- Begin executing the trading logic
Usage with Options
start --log-level [LEVEL]
Set logging verbosity: DEBUG, INFO, WARNING, ERROR, CRITICAL
Example:
Start V2 Strategy
start --v2-conf [config_file]
Path to V2 strategy configuration file (for script strategies)
Example:
start --v2-conf my_script_config.yml
Pre-Start Checks
Before starting, Hummingbot validates:
Strategy Configuration
- Strategy file exists
- All required parameters are set
- Configuration is valid
Exchange Connections
- API credentials are configured
- Connections can be established
- Exchange APIs are responsive
Oracle Rates (if required)
For strategies using rate conversion:Rate Oracle:
Source: binance
BTC-USDT: 50000.00
ETH-USDT: 3000.00
Please confirm to proceed if the above oracle source
and rates are correct for this strategy (Yes/No) >>>
Gateway (for DEX strategies)
- Gateway service is running
- Blockchain connections are active
- Wallet is connected
Successful Start
Preliminary checks:
- Strategy check: All required parameters confirmed.
- Exchange check: All connections confirmed.
- All checks: Confirmed.
Status check complete. Strategy 'pure_market_making' started successfully.
Paper Trading Notice
If using paper trading mode:
Paper Trading Active: All orders are simulated and no real orders are placed.
Status check complete. Strategy 'pure_market_making' started successfully.
Start Failures
Common reasons the bot fails to start:
Configuration Issues
Preliminary checks:
- Strategy check: Please import or create a strategy.
Status checks failed. Start aborted.
Solution: Create or import a strategy:
create
# or
import my_strategy.yml
Connection Errors
Preliminary checks:
- Strategy check: All required parameters confirmed.
- Exchange check: Invalid connections:
binance: Invalid API key or secret
Status checks failed. Start aborted.
Solution: Reconnect to the exchange:
Bot Already Running
The bot is already running - please run "stop" first
Solution: Stop the current bot:
stop
Stops the currently running trading bot.
Basic Usage
This will:
- Cancel all outstanding orders
- Stop the strategy execution
- Disconnect from exchanges
- Clean up resources
Output:
Winding down...
Canceling outstanding orders...
Hummingbot stopped.
Skip Order Cancellation
stop --skip-order-cancellation
Stops the bot without canceling open orders.
Use this with caution. Outstanding orders will remain on the exchange and may get filled after the bot stops.
Stop Process Details
When you run stop, the following happens in order:
V2 Strategy Cleanup
If using a V2 strategy, calls on_stop() for cleanup
Stop Strategy
Stops the strategy execution loop
Cancel Orders
Cancels all outstanding orders (unless skipped)
Remove Connectors
Disconnects from all exchanges
Stop Clock
Stops the internal clock/event loop
Clear References
Cleans up strategy and configuration references
macOS App Nap
On macOS:
- Start: Disables App Nap to prevent system sleep during trading
- Stop: Re-enables App Nap to allow normal power management
Implementation Details
start Command
Implemented in /hummingbot/client/command/start_command.py:44
Features:
- Thread-safe execution (redirects to main thread if needed)
- Async validation with timeout (default 300s for Gateway)
- Oracle rate confirmation for strategies requiring conversions
- MQTT integration (patches loggers and starts event forwarding)
- V2 strategy support with config file parsing
stop Command
Implemented in /hummingbot/client/command/stop_command.py:13
Features:
- Thread-safe execution
- Graceful shutdown sequence
- V2 strategy cleanup hooks
- Order cancellation (optional)
- Complete resource cleanup
Common Workflows
Normal Operation
# Start trading
start
# Monitor performance
status --live
# Stop when done
stop
Quick Restart
# Stop and immediately restart
stop && start
Testing Different Log Levels
# Start with debug logging
start --log-level DEBUG
# Stop and restart with normal logging
stop
start --log-level INFO
Emergency Stop (Keep Orders)
# Stop without canceling orders
stop --skip-order-cancellation
Troubleshooting
Gateway Timeout
For DEX strategies, if you see:
TimeoutError waiting for gateway service to go online...
Unable to start strategy pure_market_making.
Solutions:
-
Ensure Gateway is running:
-
Check Gateway connection:
-
Verify Gateway config:
config gateway_api_host
config gateway_api_port
Network Errors During Start
If you see network timeouts:
A network error prevented the connection check to complete.
Solutions:
- Check internet connection
- Verify exchange is online
- Increase timeout:
config other_commands_timeout 60
Orders Not Canceling on Stop
If orders remain after stopping:
- Manually cancel via exchange website
- Or restart bot and stop again:
“Already Running” Error
If bot thinks it’s running but no strategy is active:
-
Try stopping first:
-
If that doesn’t work, restart Hummingbot completely
Monitoring After Start
Once started, use these commands to monitor:
# View current status
status
# Live updating status
status --live
# Check recent trades
history
# View balances
balance
Automatic Restart
Hummingbot doesn’t automatically restart if it stops. However, you can:
-
Use external process managers:
- systemd (Linux)
- launchd (macOS)
- PM2 (cross-platform)
-
Enable kill switch to auto-stop on losses:
config kill_switch_mode True
config kill_switch_rate -5
- status - Check if bot is running and view performance
- config - Adjust settings before starting
- import - Load a strategy before starting
- exit - Close Hummingbot completely