chore: add script to sync position sizing env across four exchanges

sync_four_exchange_position_sizing_env.py appends missing POSITION_SIZING_MODE and FULL_MARGIN_BUFFER_RATIO, optional --set-mode/--set-buffer; docs updated.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-04 08:30:44 +08:00
parent f7bac11694
commit 0456d5fa2c
3 changed files with 193 additions and 1 deletions
+12
View File
@@ -95,6 +95,18 @@ python scripts/sync_four_exchange_transfer_env.py
pm2 restart crypto-monitor-binance crypto-monitor-okx crypto-monitor-gate crypto-monitor-gate-bot
```
## 四所 `.env` 计仓模式项(已有 .env 时)
`POSITION_SIZING_MODE` / `FULL_MARGIN_BUFFER_RATIO` 仅能通过 env 切换;切换模式前须**无持仓**:
```bash
python scripts/sync_four_exchange_position_sizing_env.py
# 无仓后切全仓:python scripts/sync_four_exchange_position_sizing_env.py --set-mode full_margin
pm2 restart crypto-monitor-binance crypto-monitor-okx crypto-monitor-gate crypto-monitor-gate-bot
```
详见 [docs/position-sizing-mode.md](../docs/position-sizing-mode.md)。
## 依赖说明
- 四个监控子项目共用仓库根目录 **[requirements.txt](../requirements.txt)**。