Expand description
futucli Tier M (mobile-driven extension) commands — v1.4.94 M1 + v1.4.95 U2-A/D/B
11 subcommand 镜像 REST + MCP:
| subcommand | proto_id | mobile cmd | 用途 |
|---|---|---|---|
cash-log | 22701 | 3000 | 资金明细查询 (M1) |
cash-detail | 22702 | 3001 | 单条资金详情 (M1) |
biz-group | 22703 | 3002 | 业务分类元数据 (M1) |
margin-info | 22704 | 3101/02/07 | per-account margin (U2-D) |
account-flag | 22705 | 5281 | 账户合规标志 (U2-A) |
bond-total-asset | 22706 | 9373 | 债券账户总持仓 (U2-B) |
bond-single-asset | 22707 | 9374 | 单只债券持仓 (U2-B) |
bond-position-list | 22708 | 9375 | 债券持仓列表 (U2-B) |
bond-answer-state | 22709 | 10043 | 是否需答题 (U2-B) |
bond-trade-reminder | 22710 | 10057 | 交易提醒 (U2-B) |
§架构
直接 connect_gateway + client.request(proto_id, body), decode Daemon
FTAPI wrapper, JSON pretty print. 不走 futu-trd 高层 helper (Tier M
handler proto 在 futu-backend::proto_internal 直接定义, 没必要再 wrap 一层).
§输出格式
默认 JSON pretty (OutputFormat::Json 或 OutputFormat::Table).
11 endpoint 字段较多 + 嵌套结构 (notice_list / margin_info), table view
不易表达, 统一用 JSON. Table format 也 fallback 到 JSON.
Structs§
- Cash
LogCommand futucli cash-log— 资金明细查询 (mobile-driven, 比 acc-cash-flow 字段更全)
Functions§
- dispatch 🔒
- 共用 helper: 调 daemon + decode generic
- parse_
env_ 🔒int - 共用 helper: env 字符串 → trd_env int (0=sim / 1=real).
- print_
json_ 🔒pretty - 共用 helper: JSON pretty print (table format fallback to JSON for nested data)
- run_
account_ flag futucli account-flag— 账户合规标志查询- run_
biz_ group futucli biz-group— 业务分类元数据- run_
bond_ answer_ state futucli bond-answer-state— 是否需答题- run_
bond_ position_ list futucli bond-position-list— 债券持仓列表- run_
bond_ single_ asset futucli bond-single-asset— 单只债券持仓- run_
bond_ total_ asset futucli bond-total-asset— 账户债券总持仓- run_
bond_ trade_ reminder futucli bond-trade-reminder— 交易提醒- run_
cash_ detail futucli cash-detail— 单条资金流水详情- run_
cash_ log - run_
margin_ info futucli margin-info— per-account margin info (HK/US/CN_AH)- validate_
bond_ 🔒market - 共用 helper: parse market (HK/US/SG only)