Files
2026-10-18 08:32:08 +08:00

85 lines
2.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# gold_monitor
MT5 **黄金** 下单辅助中控:**网页登录 → 下载通用 exe → 首次激活绑定机器/账户 → 成交上报 → 网页复盘(四周期 K 线 + 入场形式标注)**。
**远程仓库**:[https://git.bz121.com/dekun/gold_monitor.git](https://git.bz121.com/dekun/gold_monitor.git)
复盘 UI / 深色面板风格对齐本组织项目 [crypto_monitor](https://git.bz121.com/dekun/crypto_monitor.git) 的「交易记录与复盘」体验。
---
## 部署环境(必读)
| 项 | 约定 |
|----|------|
| 系统 | **Ubuntu 22.04 / 24.04** |
| 用户 | **root** |
| 路径 | **`/opt/gold_monitor`** |
| 进程 | **PM2** |
| 端口 | **5800** |
```bash
# 新服务器(推荐)
curl -fsSL https://git.bz121.com/dekun/gold_monitor/raw/branch/main/deploy/manage.sh | bash
# 已安装后仅快速更新(非交互):
curl -fsSL https://git.bz121.com/dekun/gold_monitor/raw/branch/main/deploy/manage.sh | bash -s -- update
# 或:
bash /opt/gold_monitor/deploy/manage.sh update
# 或手动
cd /opt
git clone https://git.bz121.com/dekun/gold_monitor.git gold_monitor
cd /opt/gold_monitor
bash deploy/manage.sh
```
- 部署文档:[docs/deploy.md](./docs/deploy.md) · [docs/ubuntu-server.md](./docs/ubuntu-server.md)
- 使用文档:[docs/usage.md](./docs/usage.md)
- 技术文档:[docs/technical.md](./docs/technical.md)
---
## 功能导航
| 功能 | 说明 |
|------|------|
| **登录** | 管理员 / 普通用户(一人一账户,账户仅管理员创建) |
| **用户管理** | 管理员创建用户并绑定唯一交易账户 |
| **系统设置** | 修改当前登录密码 |
| **下载中心** | 通用辅助包;**管理员与用户均可**为自己权限内账户发激活码 |
| **账户 / 机器** | 账户仅管理员创建;机器可预登记或激活时自动创建 |
| **首次激活** | exe 调用 API 绑定指纹与 token(账户须已存在) |
| **成交上报** | 已激活客户端 POST 成交与四周期 K 线 |
| **交易复盘** | 按角色过滤;详情四周期 + 入场形式标注 |
| **desktop/** | 下单辅助:激活、上报、**打开复盘**(浏览器登录页) |
---
## 仓库目录
| 目录 | 说明 |
|------|------|
| `app/` | Flask Web + API |
| `desktop/` | 客户端说明(下单逻辑从既有 Desktop 迁移) |
| `deploy/` | 一键交互部署 / PM2 |
| `docs/` | 部署 / 使用 / 技术文档 |
| `releases/` | 放置通用 `黄金市价辅助.exe` |
| `data/` | SQLite 数据(部署后生成) |
---
## 本地开发(Windows / Linux)
```bash
cd gold_monitor
python -m venv .venv
# Windows: .venv\Scripts\activate
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python wsgi.py
```
浏览器打开 [http://127.0.0.1:5800](http://127.0.0.1:5800) 。