文档修改
This commit is contained in:
@@ -22,9 +22,9 @@ chmod +x manual_trading_hub/scripts/stop_hub_screen.sh
|
||||
./manual_trading_hub/scripts/stop_agents_3screen.sh
|
||||
```
|
||||
|
||||
脚本默认认为:`manual_trading_hub` 的**上一级目录**里并列放着三个 `crypto_monitor_*`。若你把 hub 单独放在 `/opt/crypto_monitor/manual_trading_hub`,而策略项目在例如 `/opt/crypto_monitor/` 下的其他位置,请先执行
|
||||
`export MANUAL_TRADING_REPO_ROOT=/opt/crypto_monitor` 再运行 `start_agents_3screen.sh`。
|
||||
启动后若 `screen -ls` 里没有 `mt-agent-*`,看日志:`tail -80 /opt/crypto_monitor/manual_trading_hub/logs/mt-agent-bn.log`。
|
||||
脚本默认认为:`manual_trading_hub` 的**上一级目录**里并列放着三个 `crypto_monitor_*`。若你把 hub 单独放在 `/opt/crypto_monitor_user/manual_trading_hub`,而策略项目在例如 `/opt/crypto_monitor_user/` 下的其他位置,请先执行
|
||||
`export MANUAL_TRADING_REPO_ROOT=/opt/crypto_monitor_user` 再运行 `start_agents_3screen.sh`。
|
||||
启动后若 `screen -ls` 里没有 `mt-agent-*`,看日志:`tail -80 /opt/crypto_monitor_user/manual_trading_hub/logs/mt-agent-bn.log`。
|
||||
|
||||
### 局域网内其他电脑访问中控
|
||||
|
||||
@@ -39,14 +39,14 @@ chmod +x manual_trading_hub/scripts/stop_hub_screen.sh
|
||||
```bash
|
||||
# 新建会话,在里面照常启动 agent 或 hub,然后按键 Ctrl+B 再按 D 脱离
|
||||
tmux new -s hub
|
||||
cd /opt/crypto_monitor/manual_trading_hub && source .venv/bin/activate && python hub.py
|
||||
cd /opt/crypto_monitor_user/manual_trading_hub && source .venv/bin/activate && python hub.py
|
||||
# Ctrl+B, D
|
||||
|
||||
tmux new -s agent-bn
|
||||
cd /opt/crypto_monitor/crypto_monitor_binance && set -a && source .env && set +a
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_binance && set -a && source .env && set +a
|
||||
export EXCHANGE=binance PORT=15200 HOST=127.0.0.1
|
||||
source /opt/crypto_monitor/manual_trading_hub/.venv/bin/activate
|
||||
python /opt/crypto_monitor/manual_trading_hub/agent.py
|
||||
source /opt/crypto_monitor_user/manual_trading_hub/.venv/bin/activate
|
||||
python /opt/crypto_monitor_user/manual_trading_hub/agent.py
|
||||
# Ctrl+B, D
|
||||
```
|
||||
|
||||
@@ -57,7 +57,7 @@ python /opt/crypto_monitor/manual_trading_hub/agent.py
|
||||
## 二、nohup(快速、无守护重启)
|
||||
|
||||
```bash
|
||||
cd /opt/crypto_monitor/manual_trading_hub
|
||||
cd /opt/crypto_monitor_user/manual_trading_hub
|
||||
source .venv/bin/activate
|
||||
nohup python hub.py > /tmp/manual-hub.log 2>&1 &
|
||||
```
|
||||
@@ -70,7 +70,7 @@ nohup python hub.py > /tmp/manual-hub.log 2>&1 &
|
||||
|
||||
## 三、systemd(推荐:开机自启、崩溃自动拉起)
|
||||
|
||||
1. 把下面两个示例里的 **`YOUR_REPO`** 改成 **`/opt/crypto_monitor`**(或你本机实际仓库根目录),`YOUR_USER` 改成 Linux 用户名。
|
||||
1. 把下面两个示例里的 **`YOUR_REPO`** 改成 **`/opt/crypto_monitor_user`**(或你本机实际仓库根目录),`YOUR_USER` 改成 Linux 用户名。
|
||||
2. 复制到 `/etc/systemd/system/`(需 sudo),文件名例如 `manual-hub.service`、`manual-agent-binance.service`。
|
||||
3. 执行:
|
||||
|
||||
@@ -150,7 +150,7 @@ ExecStart=/bin/bash -lc 'set -a; source YOUR_REPO/crypto_monitor_binance/.env; s
|
||||
## 四、常见问题(子代理 / screen / 依赖)
|
||||
|
||||
1. **`curl http://127.0.0.1:15202/status`(或其它端口)返回 `ok:false`,错误里提到 pysocks / SOCKS**
|
||||
策略目录 `.env` 里配置了 `GATE_SOCKS_PROXY`(或 `BINANCE_SOCKS_PROXY`、`OKX_SOCKS_PROXY`)时,ccxt 需要 **PySocks**。在 **`/opt/crypto_monitor/manual_trading_hub/.venv`**(或你本机的 `manual_trading_hub/.venv`)中执行:
|
||||
策略目录 `.env` 里配置了 `GATE_SOCKS_PROXY`(或 `BINANCE_SOCKS_PROXY`、`OKX_SOCKS_PROXY`)时,ccxt 需要 **PySocks**。在 **`/opt/crypto_monitor_user/manual_trading_hub/.venv`**(或你本机的 `manual_trading_hub/.venv`)中执行:
|
||||
`pip install PySocks` 或 `pip install -r requirements.txt`。
|
||||
|
||||
2. **已经 `pip install PySocks`,错误文案完全不变**
|
||||
|
||||
Reference in New Issue
Block a user