This quickstart uses paper trading (simulated trading) so you can learn without risking real funds. You’ll create a bot that places buy and sell orders around the mid-price of a trading pair.
Prerequisites
Step 1: Start Hummingbot
If Hummingbot isn’t already running:Step 2: Create a Script Strategy
We’ll use the Simple PMM script strategy, which places symmetric buy and sell orders around the mid-price.Select Simple PMM
When prompted for a script file, enter:
The
simple_pmm.py script is included with Hummingbot in the scripts/ directory. You can view all available scripts with the ls scripts/ command from your shell.Configure Parameters
The wizard will ask for configuration parameters. Use these recommended values for paper trading:
Example configuration session:
| Parameter | Value | Description |
|---|---|---|
| exchange | binance_paper_trade | Paper trading exchange (no real funds) |
| trading_pair | ETH-USDT | Trading pair to use |
| order_amount | 0.01 | Amount of ETH per order |
| bid_spread | 0.001 | 0.1% below mid-price for buy orders |
| ask_spread | 0.001 | 0.1% above mid-price for sell orders |
| order_refresh_time | 15 | Refresh orders every 15 seconds |
| price_type | mid | Use mid-price as reference |
Step 3: Start the Strategy
Now launch your bot:Step 4: Monitor Your Bot
While the strategy is running, you can use these commands to monitor performance:status - View current orders and balances
status - View current orders and balances
- Active buy/sell orders
- Current balances
- Market prices
- Spread information
history - View completed trades
history - View completed trades
- Trade side (buy/sell)
- Amount
- Price
- Timestamp
pnl - Check profit and loss
pnl - Check profit and loss
- Realized PnL from closed trades
- Unrealized PnL from open positions
- Total PnL
config - View current configuration
config - View current configuration
Step 5: Modify and Restart
To adjust your strategy parameters:Understanding the Simple PMM Code
The Simple PMM strategy demonstrates core Hummingbot concepts. Here’s the key logic fromscripts/simple_pmm.py:
The Simple PMM strategy is defined in
hummingbot/scripts/simple_pmm.py:31-95. It extends StrategyV2Base and implements the core methods: on_tick(), create_proposal(), and did_fill_order().Moving to Real Trading
Once you’re comfortable with paper trading, you can move to real exchanges:Connect to Real Exchange
Add API keys for a real exchange:Follow the prompts to enter your API key and secret. See Exchange Setup for details.
Create New Configuration
simple_pmm.py script but configure:- Real exchange (e.g.,
binance) - Appropriate order amounts for your balance
- Suitable spreads for the market
Next Steps
Explore Strategies
Learn about other built-in strategies like XEMM, VWAP, and DCA
Architecture Deep Dive
Understand Controllers, Executors, and the V2 framework
Create Custom Strategy
Build your own strategy from scratch
Configure Exchanges
Set up API keys for different exchanges
Common Issues
Orders not filling
Orders not filling
- Too wide spreads: Your bid/ask spreads might be too large. Try reducing them.
- Low volume pair: Choose a more liquid trading pair.
- Check order book: Use
>>> orderbookto see current market depth.
Insufficient balance errors
Insufficient balance errors
- Increase balance: In paper trading, you can add more test funds.
- Reduce order_amount: Make orders smaller to fit your available balance.
- Check budget: The
adjust_proposal_to_budget()method may be rejecting orders.
Strategy keeps canceling orders
Strategy keeps canceling orders
- order_refresh_time too short: Increase to 30-60 seconds to reduce API calls.
- Price volatility: In volatile markets, orders may need frequent updates.
Script not found
Script not found
Ensure the script exists:If missing, pull the latest code: