Overview
Thebalance command displays your cryptocurrency balances across all connected exchanges and allows you to set limits on how much the bot can use. It also supports managing paper trading balances for testing strategies.
Basic Usage
View All Balances
- Asset name
- Total balance
- Value in your global token (default: USD)
- Allocated percentage (how much is currently in use)
Asset Limits
Asset limits allow you to restrict how much of each asset the bot can use for trading.View Current Limits
Set an Asset Limit
The exchange name (e.g.,
binance, kucoin)The asset symbol (e.g.,
BTC, ETH, USDT)Maximum amount the bot can use. Use a negative value to remove the limit.
Paper Trading Balances
Paper trading mode allows you to test strategies without risking real funds. You can configure virtual balances for any asset.View Paper Balances
Set Paper Balance
The asset symbol
The virtual balance amount
Understanding Balance Display
Allocated Percentage
The “Allocated” column shows what percentage of each asset is currently being used in active orders or positions. This helps you understand:- How much capital is actively trading
- How much is available for new orders
For CEX (centralized exchanges), only assets with non-zero balances are displayed. For DEX (decentralized exchanges via Gateway), all tracked tokens are shown, including zero balances.
Global Token Conversion
Balances are converted to your configured global token (default USD) using the Rate Oracle. This provides a unified view of your total portfolio value across different assets and exchanges. To change the global token, use the config command:Implementation Details
The balance command is implemented in/hummingbot/client/command/balance_command.py:25 and supports:
- Async balance fetching with configurable timeout (default 60s)
- Rate oracle integration for accurate cross-asset valuation
- Both CEX and DEX connector support
- Persistent configuration - limits and paper balances are saved to your config file
Common Use Cases
Risk Management
Set limits to prevent the bot from using too much capital:Testing Strategies
Use paper trading to test without risk:Portfolio Monitoring
Regularly check balances to monitor bot performance:Troubleshooting
Timeout Errors
If you see timeout errors when fetching balances:- Check your internet connection
- Verify the exchange is online and accessible
- Increase the timeout setting:
Incorrect Allocations
If allocation percentages seem wrong:- Ensure orders are properly tracked in the bot
- Stop and restart the bot to refresh state
- Check for any manual trades made outside the bot