Repository navigation
docs(cli): add fund (mutual-fund) channel docs + CLI v0.29.0 release notes - #1269
hogan-yuan wants to merge 7 commits into
Conversation
Add CLI documentation for the new `longbridge fund` command group under
docs/{en,zh-CN,zh-HK}/docs/cli/fund/ — a Funds category with three pages
(market data, positions, orders & trading) covering all 28 fund subcommands.
Funds are addressed by counter_id (not a stock symbol); submit/cancel prompt
for confirmation unless --yes.
Also add the CLI v0.29.0 entry to the CLI release notes and the shared
changelog in all three locales.
The 28 fund endpoints are intentionally NOT documented in the SDK (/docs) or
API (/docs/api) reference, since the channel is counter_id-only.
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
rdjson
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
developers/docs/zh-HK/docs/changelog.mdx
Line 13 in 7fe4a00
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
developers/docs/zh-HK/docs/changelog.mdx
Line 13 in 7fe4a00
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
Add an MCP subsection to the 2026-09-28 entry (fund channel ships on MCP in sync with the CLI), and reword the fund heading to '基金登陆终端' / 'Mutual funds come to the terminal'.
- Register a 'coins' glyph in the sidebar icon set so the Funds category (_category_.json icon: coins) actually renders an icon. - Add the unreleased CLI change since v0.28.7 (terminal #319: requests now send the user-facing symbol directly, dropping client-side symbol<->counter_id conversion) to the v0.29.0 release notes and changelog.
| ### CLI v0.29.0 | ||
|
|
||
| - **[基金登陆终端](/zh-CN/docs/cli/fund/market)** — 新增 `longbridge fund` 命令组,覆盖整个基金渠道:浏览目录及单只基金的详情、分析、走势、收益、业绩、净值与持仓;查看你的基金持仓;并校验、提交与撤销基金订单。基金以 `counter_id`(如 `UT/FD/HK0000384492`) 寻址;`submit-order` / `cancel-order` 除非传 `--yes` 否则会要求确认 | ||
| - **请求直接发送用户可见的 symbol** — CLI 移除客户端的 `symbol` ↔ `counter_id` 转换(及内置的 ETF / 指数对照表),与 SDK 对齐:每个命令直接把 `AAPL.US` / `HSI.HK` 这样的 symbol 发往网关,并从响应的 `symbol` 字段读回 |
There was a problem hiding this comment.
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
| - **请求直接发送用户可见的 symbol** — CLI 移除客户端的 `symbol` ↔ `counter_id` 转换(及内置的 ETF / 指数对照表),与 SDK 对齐:每个命令直接把 `AAPL.US` / `HSI.HK` 这样的 symbol 发往网关,并从响应的 `symbol` 字段读回 | |
| - **请求直接发送用户可见的 symbol** — CLI 移除转换(及内置的 ETF / 指数对照表),与 SDK 对齐:每个命令直接把,与 SDK 对齐:每个命令直接把 `AAPL.US` / `HSI.HK` 这样的 symbol 发往网关,并从响应的 `symbol` 字段读回 |
| ### [v0.29.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.29.0) | ||
|
|
||
| - **新增 `fund` 命令组 —— 香港互惠基金** — `longbridge fund` 把基金渠道带入终端:浏览目录 (`hot`、`list`、`filters`),查看单只基金的 `detail`、`analysis` / `analysis-detail`、`trend`、`annual-returns` / `quarterly-returns`、`performance` / `performance-comparison`、最新与历史净值 (`nav`、`nav-history`、`nav-range`) 以及 `holdings` / `stock-holdings`;查看你的持仓 (`positions`、`position`、`position-performance`、`position-profits`、`position-nav`、`position-dividends`);并管理订单 (`orders`、`order`、`transactions`、`validate-order`、`submit-order`、`cancel-order`)。基金以 `counter_id`(如 `UT/FD/HK0000384492`) 寻址,而非股票 symbol —— 可从 `fund hot` / `fund list` 获取。`submit-order` 与 `cancel-order` 除非传 `--yes` 否则会要求确认。详见 [基金](/zh-CN/docs/cli/fund/market) 文档 | ||
| - **请求直接发送用户可见的 symbol** — CLI 移除客户端的 `symbol` ↔ `counter_id` 转换(及内置的 ETF / 指数对照表),与 SDK 对齐:`quote`、`fundamental`、`ipo`、`dca`、`trade`、`sharelist`、`screener` 等命令直接把 `AAPL.US` / `HSI.HK` 这样的 symbol 发往网关,并从响应的 `symbol` 字段读回;`is_etf` 改为经网关判定,不再依赖本地对照表 |
There was a problem hiding this comment.
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
| - **请求直接发送用户可见的 symbol** — CLI 移除客户端的 `symbol` ↔ `counter_id` 转换(及内置的 ETF / 指数对照表),与 SDK 对齐:`quote`、`fundamental`、`ipo`、`dca`、`trade`、`sharelist`、`screener` 等命令直接把 `AAPL.US` / `HSI.HK` 这样的 symbol 发往网关,并从响应的 `symbol` 字段读回;`is_etf` 改为经网关判定,不再依赖本地对照表 | |
| - **请求直接发送用户可见的 symbol** — CLI 移除客户端的 `symbol` ↔ `counter_id` 转换(及内置的 ETF / 指数对照表),与 SDK 对齐:`quote`、`fundamental`、`ipo`、`dca`、`trade`、`sharelist`改为经网关判定,不再依赖本地对照表.HK` 这样的 symbol 发往网关,并从响应的 `symbol` 字段读回;`is_etf` 改为经网关判定,不再依赖本地对照表 |
| ### CLI v0.29.0 | ||
|
|
||
| - **[基金登陸終端](/zh-HK/docs/cli/fund/market)** — 新增 `longbridge fund` 命令組,覆蓋整個基金渠道:瀏覽目錄及單隻基金的詳情、分析、走勢、收益、業績、淨值與持倉;查看你的基金持倉;並校驗、提交與撤銷基金訂單。基金以 `counter_id`(如 `UT/FD/HK0000384492`) 尋址;`submit-order` / `cancel-order` 除非傳 `--yes` 否則會要求確認 | ||
| - **請求直接發送用戶可見的 symbol** — CLI 移除客戶端的 `symbol` ↔ `counter_id` 轉換(及內置的 ETF / 指數對照表),與 SDK 對齊:每個命令直接把 `AAPL.US` / `HSI.HK` 這樣的 symbol 發往網關,並從響應的 `symbol` 欄位讀回 |
There was a problem hiding this comment.
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
| - **請求直接發送用戶可見的 symbol** — CLI 移除客戶端的 `symbol` ↔ `counter_id` 轉換(及內置的 ETF / 指數對照表),與 SDK 對齊:每個命令直接把 `AAPL.US` / `HSI.HK` 這樣的 symbol 發往網關,並從響應的 `symbol` 欄位讀回 | |
| - **請求直接發送用戶可見的 symbol** — CLI 移除轉換(及內置的 ETF / 指數對照表),與 SDK 對齊:每個命令直接把,與 SDK 對齊:每個命令直接把 `AAPL.US` / `HSI.HK` 這樣的 symbol 發往網關,並從響應的 `symbol` 欄位讀回 |
| ### [v0.29.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.29.0) | ||
|
|
||
| - **新增 `fund` 命令組 —— 香港互惠基金** — `longbridge fund` 把基金渠道帶入終端:瀏覽目錄 (`hot`、`list`、`filters`),查看單隻基金的 `detail`、`analysis` / `analysis-detail`、`trend`、`annual-returns` / `quarterly-returns`、`performance` / `performance-comparison`、最新與歷史淨值 (`nav`、`nav-history`、`nav-range`) 以及 `holdings` / `stock-holdings`;查看你的持倉 (`positions`、`position`、`position-performance`、`position-profits`、`position-nav`、`position-dividends`);並管理訂單 (`orders`、`order`、`transactions`、`validate-order`、`submit-order`、`cancel-order`)。基金以 `counter_id`(如 `UT/FD/HK0000384492`) 尋址,而非股票 symbol —— 可從 `fund hot` / `fund list` 獲取。`submit-order` 與 `cancel-order` 除非傳 `--yes` 否則會要求確認。詳見 [基金](/zh-HK/docs/cli/fund/market) 文檔 | ||
| - **請求直接發送用戶可見的 symbol** — CLI 移除客戶端的 `symbol` ↔ `counter_id` 轉換(及內置的 ETF / 指數對照表),與 SDK 對齊:`quote`、`fundamental`、`ipo`、`dca`、`trade`、`sharelist`、`screener` 等命令直接把 `AAPL.US` / `HSI.HK` 這樣的 symbol 發往網關,並從響應的 `symbol` 欄位讀回;`is_etf` 改為經網關判定,不再依賴本地對照表 |
There was a problem hiding this comment.
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
| - **請求直接發送用戶可見的 symbol** — CLI 移除客戶端的 `symbol` ↔ `counter_id` 轉換(及內置的 ETF / 指數對照表),與 SDK 對齊:`quote`、`fundamental`、`ipo`、`dca`、`trade`、`sharelist`、`screener` 等命令直接把 `AAPL.US` / `HSI.HK` 這樣的 symbol 發往網關,並從響應的 `symbol` 欄位讀回;`is_etf` 改為經網關判定,不再依賴本地對照表 | |
| - **請求直接發送用戶可見的 symbol** — CLI 移除客戶端的 `symbol` ↔ `counter_id` 轉換(及內置的 ETF / 指數對照表),與 SDK 對齊:`quote`、`fundamental`、`ipo`、`dca`、`trade`、`sharelist`改為經網關判定,不再依賴本地對照表.HK` 這樣的 symbol 發往網關,並從響應的 `symbol` 欄位讀回;`is_etf` 改為經網關判定,不再依賴本地對照表 |
Remove the #319 'requests send symbol directly' bullet from the v0.29.0 release notes and changelog (all locales) — out of scope for the fund docs, and it also tripped the autocorrect check. The Funds icon, MCP subsection and reworded heading remain.
The trade fund-positions holding identifier is now counter_id (was the ISIN). Update the CLI fund-positions table header + prose and the /v1/asset/fund API reference response field across all locales.
The response schema row was renamed symbol -> counter_id; update the JSON response sample to match (UT/FD/HK0000447943).
…598) ## Summary New `FundContext` for the Hong Kong mutual-fund channel — **28 endpoints** (catalog & market data, user positions, orders & trading) — across all six SDK layers: Rust core (async + blocking), C, C++, Java, Node.js, Python. ## Design notes - **`counter_id`-only, request and response** (e.g. `UT/FD/HK0000384492`); no `symbol` field. It contains `/`, so it's passed as a `counter_id` query param (fixed sub-paths like `/v1/fund/funds/detail`), never a path segment. Batch endpoints (`nav`, `performance`, `position_performance`) use a one-element `counter_ids` JSON array. - **Nullable nested objects** (`asset_allocation`, `contrast_performances`, `detail_values`, `order`) are optional/nullable in every layer; **int64** fields accept a JSON number or a quoted string. - Node.js / Python expose the position type as **`FundHoldingPosition`** to avoid a clash with the trade channel's `FundPosition`; C uses the `lb_*_t` naming convention like every other channel. ## Related Go: longbridge/openapi-go#124 · CLI: longbridge/longbridge-terminal#327 · MCP: longbridge/longbridge-mcp#161 · Docs (CLI only; excluded from SDK/API reference by the counter_id policy): longbridge/developers#1269
## Summary Adds a pure-Go `fund` package with `FundContext` (**28 methods**) for the mutual-fund channel, mirroring the Rust core field-for-field. Method groups: catalog & market data, user fund positions, and orders/trading. ## Design notes - **`counter_id`-only, request and response** — funds are identified by `counter_id` (e.g. `UT/FD/HK0000384492`), the deliberate exception to the release-wide symbol migration. Single-fund endpoints pass `counter_id` as a query param (fixed sub-paths like `/v1/fund/funds/detail`); the order filter carries repeated `counter_id`. No `symbol` anywhere in the fund package. - **Batch endpoints** (`Performance`, `Nav`, `PositionPerformance`) send a one-element JSON array in a `counter_ids` query param (`withCounterIDs`). - **`jsontypes.Int64`** — a string-tolerant int64 type is applied to the 27 int64 wire fields; the backend may send them as a number or a quoted string (empty/null → 0). - **Nullable nested objects** (`FundDetail.AssetAllocation`, `FundTrend.ContrastPerformances`, `FundPositionDetail.DetailValues`, `FundOrderDetail.Order`) are pointers so `null` deserializes cleanly. - Server-defined "any" JSON fields → `json.RawMessage`. ## Verification `go build ./...`, `go vet ./fund/...`, and `gofmt -l fund/` all clean. ## Related Core + C/C++/Java/Node.js/Python: longbridge/openapi#598 · CLI: longbridge/longbridge-terminal#327 · MCP: longbridge/longbridge-mcp#161 · Docs: longbridge/developers#1269
Adds the fund (mutual-fund) channel to the MCP server — **28 `fund_*` tools** wrapping the openapi fund SDK: - **25 read tools** — catalog / market data, the user's positions, and orders / order / transactions. The positions-overview tool is `fund_position_overview` to avoid colliding with the trade `fund_positions`. - **3 order tools** — `fund_validate_order` (pre-trade check, places nothing), and `fund_submit_order` / `fund_cancel_order` (writes, gated by the two-step dry-run + `confirmation_code` flow; the confirmation binds every order-shaping field). Funds are addressed by **`counter_id`** (`fund_orders` filters by `counter_ids`). Reads + `fund_validate_order` are exposed on `/mcp` and the read-only `/v2`; the two writes are `/mcp`-only and excluded from `/v2`. zh-CN / zh-HK locales added for all 28 tools, and all 28 are declared in the OAuth consent scope taxonomy (`data/scopes.json`). Pins the openapi SDK to the fund branch (`rev = 47e7572eb`). **Swap to the release version once openapi#598 merges and ships.** ## Testing All read tools + the write dry-run/confirm flow verified live end-to-end against staging (local `--canary` server + OAuth); the submit → cancel path is verified via the identical fund SDK in the CLI. `cargo test` (315 tests: classification / locale-coverage / gated-tool / v2-allowlist invariants) + `clippy` clean. ## Related SDK: longbridge/openapi#598 · CLI: longbridge/longbridge-terminal#327 · Docs: longbridge/developers#1269
What
Documents the new
longbridge fundcommand group (the Hong Kong mutual-fund channel shipping in CLI v0.29.0) on the developer site, in all three locales (en / zh-CN / zh-HK).CLI docs — new
Fundscategory under/docs/cli/fund/hot,list,filters,detail,analysis,analysis-detail,trend,annual-returns,quarterly-returns,performance,performance-comparison,nav,nav-history,nav-range,holdings,stock-holdingspositions,position,position-performance,position-profits,position-nav,position-dividendsorders,order,transactions,validate-order,submit-order,cancel-orderEach page follows the existing
gridcommand-group template (description, basic usage, grouped examples, options table, requirements/notes).Release notes & changelog
/docs/cli/release-notes.mdx(×3 locales)changelog.mdx(×3 locales)Notes
counter_id(e.g.UT/FD/HK0000384492), not a stock symbol.submit-order/cancel-orderprompt for confirmation unless--yes./docs) or API (/docs/api) reference, since the channel iscounter_id-only.limitandonline#327.