skillbase/hummingbot-bot-lifecycle
SkillHummingbot bot operations: deployment checklists, monitoring runbooks, incident response via MCP. Uses manage_bots, manage_executors, get_portfolio_overview. Use when deploying bots, diagnosing failures, reading logs, handling incidents, or performing any operational bot management task.
SKILL.md
40
## Deployment Checklist
41
42
Execute in order. If any step fails, stop — do not deploy with unverified conditions.
43
44
### 1. Verify infrastructure
45
```
46
configure_server() → confirm connected
47
```
48
49
### 2. Verify exchange connectivity
50
```
51
setup_connector(action="setup") → list connected exchanges
52
get_portfolio_overview(include_balances=True) → confirm balances visible
53
```
54
55
### 3. Verify the config exists and looks correct
56
```
57
manage_controllers(action="describe", config_name="my_config")
58
```
59
Cross-check: spread > 2x fee? Order amount < 5% of book depth? Inventory skew enabled?
60
61
### 4. Check for conflicts
62
```
63
manage_bots(action="status") → any bot already trading this pair?
64
get_portfolio_overview(include_active_orders=True) → any orphan orders on this pair?
65
```
66
67
### 5. Deploy
68
```
69
manage_bots(
70
action="deploy",
71
bot_name="descriptive-name",
72
controllers_config=["my_config"],
73
account_name="master_account",
74
max_global_drawdown_quote=500, # always set this
75
max_controller_drawdown_quote=200 # always set this
76
)
77
```
78
79
### 6. Post-deploy verification (within 60 seconds)
80
```
81
manage_bots(action="status", bot_name="descriptive-name") → status = running
82
get_portfolio_overview(include_active_orders=True) → orders visible for the pair
83
```
84
85
If orders don't appear within 60 seconds:
86
```
87
manage_bots(action="logs", bot_name="descriptive-name", log_type="error", limit=20)
88
```
89
90
## Monitoring Runbook
91
92
### Routine checks
93
94
| What | How | Healthy signal |
95
|------|-----|---------------|
96
| Bot running | `manage_bots(action="status")` | All bots show "running" |
97
| Orders active | `get_portfolio_overview(include_active_orders=True)` | Orders exist for each active pair |
98
| Fills happening | `manage_executors(action="search", status="completed", limit=10)` | Recent fills within last hour |
99
| Inventory balanced | `get_portfolio_overview(include_balances=True)` | Not >70% skewed to one side |
100
| No errors | `manage_bots(action="logs", bot_name="...", log_type="error", limit=5)` | Empty or only stale errors |
101
| P&L positive | `get_portfolio_overview()` + `search_history(data_type="orders")` | Spread P&L > inventory drift |
102
103
### Warning signs and responses
104
105
**No fills for >1 hour** (on a pair with >$50K daily volume)
106
→ Orders are mispriced or exchange has issues
107
→ Check: `get_market_data(data_type="order_book", ...)` — is our spread competitive?
108
→ Check: `manage_bots(action="logs", ..., log_type="error")` — order rejections?
109
110
**Inventory skewing >70% one side**
111
→ Market is trending against us
112
→ Check: `get_market_data(data_type="candles", ..., interval="1h", days=1)` — trend visible?
113
→ Action: if strong trend, stop controller: `manage_bots(action="stop_controllers", bot_name="...", controller_names=["the_config"])`
114
115
**Bot in error state**
116
→ Check: `manage_bots(action="logs", bot_name="...", log_type="error", limit=50)`
117
→ Common causes: exchange connectivity loss, insufficient balance, rate limit exceeded
118
→ If transient (connectivity): bot usually auto-recovers. Monitor.
119
→ If persistent: `manage_bots(action="stop_bot", bot_name="...")`, fix cause, redeploy.
120
121
**Executor count growing but no fills**
122
→ Executors being created but never matching — likely config issue
123
→ Check: `manage_executors(action="search", status="active", limit=20)` — what state are they in?
124
→ Action: stop bot, review config parameters (spread too wide? order amount too small?)
125
126
## Incident Response
127
128
### Emergency stop procedure
129
130
**When to trigger:**
131
- Drawdown limit hit (manage_bots auto-stops, but verify)
132
- Exchange announces unexpected maintenance
133
- Flash crash or market anomaly
134
- Bot placing orders at obviously wrong prices
135
136
**Procedure:**
137
```
138
# 1. Stop bot
139
manage_bots(action="stop_bot", bot_name="the-bot")
140
141
# 2. Verify no active orders remain
142
get_portfolio_overview(include_active_orders=True)
143
144
# 3. If orphan orders exist, stop executors
145
manage_executors(action="stop", executor_id="...")
146
147
# 4. Snapshot state for analysis
148
get_portfolio_overview()
149
search_history(data_type="orders", limit=50)
150
```
151
152
**Do NOT restart until:**
153
- Root cause is identified from logs
154
- Market conditions are reviewed
155
- Parameters are adjusted if needed
156
157
### Post-incident analysis
158
```
159
# What happened — timeline from logs
160
manage_bots(action="logs", bot_name="...", log_type="all", limit=100)
161
162
# What was the financial impact
163
search_history(data_type="orders", start_time=incident_start, end_time=incident_end)
164
get_portfolio_overview()
165
166
# Was it a strategy issue or operational issue?
167
# Strategy: bad params (spread too tight, no kill condition) → redesign
168
# Operational: exchange downtime, connectivity → no action needed, resume when clear
169
```
170
171
## Operational Rules
172
173
- **Always set drawdown limits** on deploy — `max_global_drawdown_quote` is the last line of defense
174
- **One pair per bot** — avoid running multiple bots on the same pair/exchange
175
- **Verify after every stop** — check `get_portfolio_overview(include_active_orders=True)` for orphan orders
176
- **Selective control** — use `stop_controllers`/`start_controllers` to toggle individual strategies within a bot without killing the whole bot
177
- **Runtime config changes** — use `manage_bots(action="update_config")` for running bots, not `manage_controllers(action="upsert")` which is design-time only
183
- Complete the deployment checklist every time — skipping steps causes preventable incidents
184
- When in doubt, stop the bot — missed trades cost less than bad trades
185
- Check logs (log_type="error") as the first diagnostic step for any bot issue
186
- Always set both drawdown limits on deploy — they are the automated circuit breakers
187
- After stopping a bot, verify no orphan orders remain — they fill unexpectedly
188
- Use stop_controllers to pause a specific strategy without killing the entire bot