首次上传

This commit is contained in:
dekun
2026-05-16 22:25:48 +08:00
commit 2b8f902548
88 changed files with 16386 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
# 交易系统部署说明(Gate USDT 永续)
## 1. 系统概要
本系统是基于 Python 的监控服务,使用 **Gate.io** 公共 APIUSDT 永续)。
- 监控市场:Gate USDT 线性永续(如 `BTC_USDT`
- 周期:固定 5m 扫描
- 信号分级:WATCH / TRIGGER
## 2. config.yaml(节选)
```yaml
gate:
api_base: https://api.gateio.ws/api/v4
settle: usdt
quote_currency: USDT
monitor:
universe: all_swaps
min_24h_quote_volume_usdt: 10000000
watch_symbols: []
```
完整示例见 `config.example.yaml`。若仍使用旧字段 **`okx:`**,请改为 **`gate:`**,否则服务无法启动。
## 3. 安装(Linux 示例)
```bash
apt update && apt install -y python3 python3-pip python3-venv
cd /root/onchain_scout_gate
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txt
cp -n config.example.yaml config.yaml
nano config.yaml
```
## 4. 生产部署:PM2(推荐)
```bash
npm install -g pm2
cd /root/onchain_scout_gate
pm2 start deploy/ecosystem.config.cjs
pm2 logs onchain-scout
```
开机自启:`pm2 save``pm2 startup`(按 CLI 提示执行)。
## 5. 前台调试
```bash
cd /root/onchain_scout_gate && source .venv/bin/activate && python -m app.main
```
## 6. 常见问题
- 配置报错:确认已使用 `gate:` 配置块。
- 依赖缺失:在 venv 内重装 `requirements.txt`
- 网络:需要能访问 `api.gateio.ws`(或通过 `proxy`)。
## 7. 运维
- 备份 `runtime/alerts.db`
- 改配置后:`pm2 restart onchain-scout`