Files
gold_monitor/desktop/README.md
T

32 lines
944 B
Markdown
Raw 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.
# desktop · MT5 黄金辅助客户端
## 定位
- **通用包**:所有机器下载同一个 exe(由网页「下载中心」分发)。
- **首次激活**:启动后输入网页生成的激活码,调用 `POST /api/v1/activate`,本地保存 `token`。
- **运行期**:本机连接已登录的 MT5;成交/快照 `POST /api/v1/trades`;可选上报 K 线 `POST /api/v1/bars`。
## 与现有代码
当前可从 `E:\仓库\MT5黄金方案\Desktop\gold_order_app.py` 迁移下单逻辑。
本目录后续接入:
1. 激活窗 / 本地 `device.json`(token、account_id、machine_id、server)
2. 配置服务器地址(默认 `http://<ubuntu>:5800`)
3. 成交与四周期 bars 上报
## 激活 API 示例
```http
POST /api/v1/activate
Content-Type: application/json
{
"code": "激活码",
"fingerprint": "机器唯一指纹",
"machine_name": "书房PC"
}
```
成功后请求头携带:`X-Device-Token: <token>`