@hummingbot/skills 1.0.0 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -14
- package/package.json +5 -1
- package/skills/candles-feed/SKILL.md +2 -1
- package/skills/candles-feed/scripts/calculate_indicator.sh +2 -0
- package/skills/candles-feed/scripts/get_candles.sh +2 -0
- package/skills/candles-feed/scripts/get_funding_rate.sh +2 -0
- package/skills/candles-feed/scripts/get_price.sh +2 -0
- package/skills/candles-feed/scripts/list_candle_connectors.sh +2 -0
- package/skills/executor-creator/SKILL.md +48 -6
- package/skills/executor-creator/scripts/clear_position.sh +2 -0
- package/skills/executor-creator/scripts/create_executor.sh +11 -2
- package/skills/executor-creator/scripts/get_executor.sh +2 -0
- package/skills/executor-creator/scripts/get_executor_schema.sh +2 -0
- package/skills/executor-creator/scripts/get_executors_summary.sh +2 -0
- package/skills/executor-creator/scripts/get_position.sh +2 -0
- package/skills/executor-creator/scripts/get_positions.sh +2 -0
- package/skills/executor-creator/scripts/list_executor_types.sh +2 -0
- package/skills/executor-creator/scripts/list_executors.sh +2 -0
- package/skills/executor-creator/scripts/setup_executor.sh +23 -7
- package/skills/executor-creator/scripts/stop_executor.sh +2 -0
- package/skills/hummingbot-api-setup/SKILL.md +50 -258
- package/skills/hummingbot-api-setup/scripts/health_check.sh +2 -0
- package/skills/hummingbot-api-setup/{references/original_setup.sh → scripts/setup.sh} +76 -54
- package/skills/keys-manager/SKILL.md +2 -1
- package/skills/keys-manager/scripts/add_credentials.sh +2 -0
- package/skills/keys-manager/scripts/get_connector_config.sh +2 -0
- package/skills/keys-manager/scripts/list_account_credentials.sh +2 -0
- package/skills/keys-manager/scripts/list_connectors.sh +2 -0
- package/skills/keys-manager/scripts/remove_credentials.sh +2 -0
- package/skills/keys-manager/scripts/setup_connector.sh +2 -0
- package/skills/portfolio/SKILL.md +181 -0
- package/skills/portfolio/scripts/get_distribution.sh +52 -0
- package/skills/portfolio/scripts/get_history.sh +75 -0
- package/skills/portfolio/scripts/get_overview.sh +96 -0
- package/skills/portfolio/scripts/get_state.sh +96 -0
- package/skills.json +26 -6
- package/skills/hummingbot-api-setup/scripts/check_prerequisites.sh +0 -92
- package/skills/hummingbot-api-setup/scripts/deploy_full_stack.sh +0 -151
- package/skills/hummingbot-api-setup/scripts/step1_detect_system.sh +0 -88
- package/skills/hummingbot-api-setup/scripts/step2_check_dependencies.sh +0 -81
package/README.md
CHANGED
|
@@ -32,32 +32,33 @@ After installing, ask your AI agent:
|
|
|
32
32
|
| [keys-manager](./skills/keys-manager/) | Manage exchange API credentials |
|
|
33
33
|
| [executor-creator](./skills/executor-creator/) | Create trading executors (position, grid, DCA, TWAP) |
|
|
34
34
|
| [candles-feed](./skills/candles-feed/) | Fetch market data and technical indicators |
|
|
35
|
+
| [portfolio](./skills/portfolio/) | View balances and positions across exchanges |
|
|
35
36
|
|
|
36
37
|
## Prerequisites
|
|
37
38
|
|
|
38
|
-
Skills interact with the Hummingbot API server
|
|
39
|
-
- **URL**: `http://localhost:8000`
|
|
40
|
-
- **Credentials**: `admin:admin`
|
|
41
|
-
- **Docs**: `http://localhost:8000/docs`
|
|
39
|
+
Skills interact with the Hummingbot API server. Use the `hummingbot-api-setup` skill to deploy it.
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
Configure credentials via `.env` file (see `.env.example`):
|
|
42
|
+
```bash
|
|
43
|
+
API_URL=http://localhost:8000
|
|
44
|
+
API_USER=admin
|
|
45
|
+
API_PASS=admin
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
API docs available at `http://localhost:8000/docs`.
|
|
44
49
|
|
|
45
50
|
## Repository Structure
|
|
46
51
|
|
|
47
52
|
```
|
|
48
53
|
hummingbot/skills/
|
|
49
|
-
├── skills/ # Skill definitions
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
│ ├── keys-manager/ # API credentials
|
|
54
|
-
│ ├── executor-creator/ # Trading executors
|
|
55
|
-
│ └── candles-feed/ # Market data
|
|
56
|
-
└── skills.json # Skill metadata (for webapp)
|
|
54
|
+
├── skills/ # Skill definitions (SKILL.md + scripts/)
|
|
55
|
+
├── app/ # Next.js webapp (skills.hummingbot.org)
|
|
56
|
+
├── skills.json # Skill metadata
|
|
57
|
+
└── .env.example # API configuration template
|
|
57
58
|
```
|
|
58
59
|
|
|
59
60
|
## Links
|
|
60
61
|
|
|
62
|
+
- [Skills Webapp](https://skills.hummingbot.org)
|
|
61
63
|
- [Hummingbot](https://hummingbot.org)
|
|
62
|
-
- [skills.sh](https://skills.sh)
|
|
63
64
|
- [Agent Skills Spec](https://agentskills.io)
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hummingbot/skills",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "AI agent skills for Hummingbot algorithmic trading infrastructure",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "cd app && npm run build",
|
|
7
|
+
"vercel-build": "cd app && npm run build"
|
|
8
|
+
},
|
|
5
9
|
"keywords": [
|
|
6
10
|
"hummingbot",
|
|
7
11
|
"trading",
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
name: candles-feed
|
|
3
3
|
description: Fetch market data (OHLCV candles) and calculate technical indicators (RSI, EMA, MACD, Bollinger Bands) from exchanges via Hummingbot API. Use this skill when the user needs price data, candlestick charts, or technical analysis.
|
|
4
4
|
license: Apache-2.0
|
|
5
|
+
creator-github-handle: fengtality
|
|
5
6
|
---
|
|
6
7
|
|
|
7
|
-
#
|
|
8
|
+
# candles-feed
|
|
8
9
|
|
|
9
10
|
This skill fetches candlestick (OHLCV) data from exchanges and calculates technical indicators. It provides the data foundation for strategy development and market analysis.
|
|
10
11
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
name: executor-creator
|
|
3
3
|
description: Create and manage Hummingbot trading executors (position, grid, DCA, TWAP) directly via API. Use this skill when the user wants to create trading positions, set up grid trading, dollar-cost averaging, or any automated trading execution.
|
|
4
4
|
license: Apache-2.0
|
|
5
|
+
creator-github-handle: cardosofede
|
|
5
6
|
---
|
|
6
7
|
|
|
7
|
-
#
|
|
8
|
+
# executor-creator
|
|
8
9
|
|
|
9
10
|
This skill manages **executors** - lightweight trading components that run directly via the Hummingbot API. Executors are the recommended starting point for new users.
|
|
10
11
|
|
|
@@ -75,14 +76,29 @@ Automated grid trading with multiple buy/sell levels:
|
|
|
75
76
|
./scripts/setup_executor.sh --type grid_executor --config '{
|
|
76
77
|
"connector_name": "hyperliquid_perpetual",
|
|
77
78
|
"trading_pair": "BTC-USD",
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
79
|
+
"side": "BUY",
|
|
80
|
+
"start_price": "81645",
|
|
81
|
+
"end_price": "84944",
|
|
82
|
+
"limit_price": "78347",
|
|
83
|
+
"total_amount_quote": "100",
|
|
84
|
+
"leverage": 10,
|
|
85
|
+
"max_open_orders": 5,
|
|
86
|
+
"triple_barrier_config": {
|
|
87
|
+
"stop_loss": 0.05,
|
|
88
|
+
"take_profit": 0.03,
|
|
89
|
+
"time_limit": 86400
|
|
90
|
+
}
|
|
83
91
|
}'
|
|
84
92
|
```
|
|
85
93
|
|
|
94
|
+
Grid executor parameters:
|
|
95
|
+
- `start_price`: Price where grid begins (e.g., -1% below current)
|
|
96
|
+
- `end_price`: Price where grid ends / take profit level (e.g., +3% above current)
|
|
97
|
+
- `limit_price`: Stop loss price level (e.g., -5% below current)
|
|
98
|
+
- `total_amount_quote`: Total capital in quote currency (USDT)
|
|
99
|
+
- `leverage`: Position leverage (default: 20)
|
|
100
|
+
- `max_open_orders`: Maximum concurrent orders (default: 5)
|
|
101
|
+
|
|
86
102
|
### 3. DCA Executor
|
|
87
103
|
|
|
88
104
|
Dollar-cost averaging with multiple entry points:
|
|
@@ -202,6 +218,30 @@ The position exits when ANY barrier is hit first.
|
|
|
202
218
|
| `/executors/{id}/stop` | POST | Stop executor |
|
|
203
219
|
| `/executors/positions/summary` | GET | Get held positions |
|
|
204
220
|
|
|
221
|
+
## API Quirks
|
|
222
|
+
|
|
223
|
+
The scripts handle these API requirements automatically:
|
|
224
|
+
|
|
225
|
+
| Issue | Detail | Script Handling |
|
|
226
|
+
|-------|--------|-----------------|
|
|
227
|
+
| **Trailing slash** | POST `/executors/` requires trailing slash | Scripts add it automatically |
|
|
228
|
+
| **Side as numeric** | API requires `1` for BUY, `2` for SELL | Scripts convert "BUY"/"SELL" strings |
|
|
229
|
+
| **executor_config wrapper** | Config must be wrapped in `executor_config` field | Scripts wrap automatically |
|
|
230
|
+
|
|
231
|
+
If calling the API directly:
|
|
232
|
+
```bash
|
|
233
|
+
curl -X POST -u admin:admin \
|
|
234
|
+
-H "Content-Type: application/json" \
|
|
235
|
+
"http://localhost:8000/executors/" \
|
|
236
|
+
-d '{
|
|
237
|
+
"executor_config": {
|
|
238
|
+
"type": "grid_executor",
|
|
239
|
+
"side": 1,
|
|
240
|
+
...
|
|
241
|
+
}
|
|
242
|
+
}'
|
|
243
|
+
```
|
|
244
|
+
|
|
205
245
|
## Error Handling
|
|
206
246
|
|
|
207
247
|
| Error | Cause | Solution |
|
|
@@ -210,3 +250,5 @@ The position exits when ANY barrier is hit first.
|
|
|
210
250
|
| "Insufficient balance" | Not enough funds | Reduce amount or add funds |
|
|
211
251
|
| "Invalid trading pair" | Pair not on exchange | Check exchange for valid pairs |
|
|
212
252
|
| "Connector not configured" | Missing API keys | Use keys skill to add credentials |
|
|
253
|
+
| "Input should be 1, 2 or 3" | Side must be numeric | Use 1 for BUY, 2 for SELL (scripts handle this) |
|
|
254
|
+
| "307 Temporary Redirect" | Missing trailing slash | Add `/` to endpoint URL |
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -62,18 +64,25 @@ else
|
|
|
62
64
|
CONFIG=$(echo "$CONFIG" | jq --arg type "$EXECUTOR_TYPE" '. + {type: $type}')
|
|
63
65
|
fi
|
|
64
66
|
|
|
67
|
+
# Convert side from string to numeric (API requires: 1=BUY, 2=SELL)
|
|
68
|
+
CONFIG=$(echo "$CONFIG" | jq '
|
|
69
|
+
if .side == "BUY" or .side == "buy" then .side = 1
|
|
70
|
+
elif .side == "SELL" or .side == "sell" then .side = 2
|
|
71
|
+
else . end
|
|
72
|
+
')
|
|
73
|
+
|
|
65
74
|
# Build request
|
|
66
75
|
REQUEST=$(jq -n \
|
|
67
76
|
--argjson config "$CONFIG" \
|
|
68
77
|
--arg account "$ACCOUNT" \
|
|
69
78
|
'{executor_config: $config, account_name: $account}')
|
|
70
79
|
|
|
71
|
-
# Create executor
|
|
80
|
+
# Create executor (note: trailing slash required)
|
|
72
81
|
RESPONSE=$(curl -s -X POST \
|
|
73
82
|
-u "$API_USER:$API_PASS" \
|
|
74
83
|
-H "Content-Type: application/json" \
|
|
75
84
|
-d "$REQUEST" \
|
|
76
|
-
"$API_URL/executors")
|
|
85
|
+
"$API_URL/executors/")
|
|
77
86
|
|
|
78
87
|
# Check for error
|
|
79
88
|
if echo "$RESPONSE" | jq -e '.detail' > /dev/null 2>&1; then
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
set -e
|
|
15
15
|
|
|
16
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
17
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
16
18
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
17
19
|
API_USER="${API_USER:-admin}"
|
|
18
20
|
API_PASS="${API_PASS:-admin}"
|
|
@@ -117,11 +119,18 @@ EOF
|
|
|
117
119
|
"type": "grid_executor",
|
|
118
120
|
"connector_name": "hyperliquid_perpetual",
|
|
119
121
|
"trading_pair": "BTC-USD",
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
122
|
+
"side": "BUY",
|
|
123
|
+
"start_price": "81645",
|
|
124
|
+
"end_price": "84944",
|
|
125
|
+
"limit_price": "78347",
|
|
126
|
+
"total_amount_quote": "100",
|
|
127
|
+
"leverage": 10,
|
|
128
|
+
"max_open_orders": 5,
|
|
129
|
+
"triple_barrier_config": {
|
|
130
|
+
"stop_loss": 0.05,
|
|
131
|
+
"take_profit": 0.03,
|
|
132
|
+
"time_limit": 86400
|
|
133
|
+
}
|
|
125
134
|
}'
|
|
126
135
|
elif [ "$EXECUTOR_TYPE" = "dca_executor" ]; then
|
|
127
136
|
EXAMPLE_CONFIG='{
|
|
@@ -156,18 +165,25 @@ EOF
|
|
|
156
165
|
# Ensure type is in the config
|
|
157
166
|
CONFIG_WITH_TYPE=$(echo "$CONFIG" | jq --arg type "$EXECUTOR_TYPE" '. + {type: $type}')
|
|
158
167
|
|
|
168
|
+
# Convert side from string to numeric (API requires: 1=BUY, 2=SELL)
|
|
169
|
+
CONFIG_WITH_TYPE=$(echo "$CONFIG_WITH_TYPE" | jq '
|
|
170
|
+
if .side == "BUY" or .side == "buy" then .side = 1
|
|
171
|
+
elif .side == "SELL" or .side == "sell" then .side = 2
|
|
172
|
+
else . end
|
|
173
|
+
')
|
|
174
|
+
|
|
159
175
|
# Build request
|
|
160
176
|
REQUEST=$(jq -n \
|
|
161
177
|
--argjson config "$CONFIG_WITH_TYPE" \
|
|
162
178
|
--arg account "$ACCOUNT" \
|
|
163
179
|
'{executor_config: $config, account_name: $account}')
|
|
164
180
|
|
|
165
|
-
# Create executor
|
|
181
|
+
# Create executor (note: trailing slash required)
|
|
166
182
|
RESPONSE=$(curl -s -X POST \
|
|
167
183
|
-u "$API_USER:$API_PASS" \
|
|
168
184
|
-H "Content-Type: application/json" \
|
|
169
185
|
-d "$REQUEST" \
|
|
170
|
-
"$API_URL/executors")
|
|
186
|
+
"$API_URL/executors/")
|
|
171
187
|
|
|
172
188
|
if echo "$RESPONSE" | jq -e '.detail' > /dev/null 2>&1; then
|
|
173
189
|
echo "{\"error\": \"Failed to create executor\", \"detail\": $RESPONSE}"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
+
# Load .env if present (check current dir, ~/.hummingbot/, ~/)
|
|
8
|
+
for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
|
|
7
9
|
API_URL="${API_URL:-http://localhost:8000}"
|
|
8
10
|
API_USER="${API_USER:-admin}"
|
|
9
11
|
API_PASS="${API_PASS:-admin}"
|