Expand description
mcp/handlers/trade/helpers — parse_* + build_header_* (跨 trade sub-mod 共用) (v1.4.110 CC Batch O: 拆自 trade.rs L26-110)
Functions§
- build_
header - build_
header_ strict_ no_ fund - v1.4.102 codex 35 F4: build_header for active/calculation MCP tools. view-only read tools (positions/funds/cash-log/history) 用普通 build_header 接受 fund market.
- parse_
trd_ env - parse_
trd_ env_ int - v1.4.102 codex 38 F4 / 41 F2 / 41 F3 / 42 F3 (P2): 严格 env → i32 共享 helper, 替换 cash_flow / margin_info / account_flag / bond 4 处 旧“non-real => 0 silent“模式. typo (e.g. “reel” / “prod”) 现在 reject at MCP boundary (BUG-005 反 silent wrong-env).
- parse_
trd_ market - parse_
trd_ market_ strict_ no_ fund - v1.4.102 codex 33 F5 / 34 F4 / 35 F4 (P2): 拒 fund market 在 calculation / active trade-read path. 用于 max_trd_qtys / margin_ratio / order_fee / orders / deals 等 active backend call (区别于 view-only positions/funds/ cash-log/history 真机 verified).