v2026-07-21: 实战教训汇总 (push 11 文件)

新增 8 reference:
  - dividend-stability-score: A 股 5 维评分 (派息年数/CAGR/波动/最近/连续) → 0-100 分 + 5 星
  - dividend-yield-rate-sort: 按股息率% 倒序 (用户偏好 2026-07-13)
  - longport-http-module: longport_http.py 公共模块 (替代 SDK WSS)
  - leverage-pass-through-bug: process_signal.py 丢失 leverage 字段 (5x 实际 10x)
  - follow-trading-iron-laws: 跟单铁律 (用户原话 5+ 次 2026-07-21)
  - forced-skill-entry-okx-trade: okx_trade.sh 强制入口 (替代 ccxt 裸调)
  - mihomo-clash-node-supplier-dns: Clash 节点供应商 DNS 失败处理
  - mihomo-ssl-reconnect-pattern: mihomo 反复 SSL/Timeout 模式
  - v4.5.44-mu-add-to-75pct-cap: MU 加仓 75% 单币种 cap 标准流程

改 2 SKILL.md:
  - dividend-investing: 加 5 维评分 + 长桥 http 模块
  - longbridge-cli: 标注 '不要写 openapi.QuoteContext' + 迁移说明
This commit is contained in:
2026-07-22 13:22:45 +08:00
parent e23f8d38c0
commit b660debd06
11 changed files with 907 additions and 244 deletions
@@ -28,6 +28,14 @@
- 强平价: 1136.92 (信号 2x 应该 ~940+(940/2)*0.01 = 944.70,实际 10x 推到 1137)
- 浮亏: -$0.28
### Case 4: 熬鹰 BTC long 20x (2026-07-21)
- 信号: 49.958 BTC long @20x @65547.73
- 实际 execute: 0.01 张 BTC long @10x @65407.6 (用 OKX 私有 API setLeverage 强制设 20x, 仍被覆盖成 10x)
- 浮亏: -0.01 USDT (立刻平了)
- **教训**: setLeverage 私有 API 不生效, 下单时仍用 10x (process_signal 内部写死)
- **新加 bug**: OKX 最小下单单位 min_sz 触发 → 我传 0.014 张, 实际成交 0.01 张 (0.01 是 min_sz)
- 双重 bug: leverage 5→10 + min_sz 截断。**两个都没在 process_signal 修过**
## 规律
- 信号 5x → 实际 10x (2 倍)
@@ -115,4 +123,24 @@ cmd = ['python3', 'okx_position_advisor.py', '--symbol', symbol,
## 相关 SKILL.md 章节
- "v4.5.2 process_signal 杠杆丢失 bug" - 主入口
- "v4.5.0 平仓信号自动跟单" - 检测时需查 lever 字段
- "v4.5.0 平仓信号自动跟单" - 检测时需查 lever 字段
## Agent 行为铁律 (2026-07-17 用户原话)
### 1. 跟单不许反问
- **信号来了立刻 advisor → 下单**
- 不问 yes/no/几张
- 用户说"按信号来"=立即执行,不讨论
- (累计 3 次用户指出 2026-07-17 违反此规则)
### 2. 下单后立即验证 (不要把 advisor 推荐当事实)
- 下单后**立刻** `fetch_positions()` 查**真实**:lever, margin, notional, entryPrice
- advisor 推荐值 ≠ 实际成交值
- 实战教训(2026-07-17): 用户说"5x 杠杆", advisor 算 5x, 实际下单 10x (process_signal.py bug)
- 实际占 $26.92, 报告时错说 $53,**用户立即指出"又是猜的"**
- 教训:**下单后必须 fetch_positions 验证 3 件事**
- actual_leverage == requested
- actual_margin == expected
- actual_side == expected
## references index 更新
此 reference 是 OKX advisor 杠杆 + 下单事实校验的权威来源。任何新错误 / 修复补这里, MEMORY 只存指针。