Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/en/docs/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ sidebar_position: 7
sidebar_icon: newspaper
---

## 2026-09-28

### CLI v0.29.0

- **[Mutual funds come to the terminal](/docs/cli/fund/market)** — the new `longbridge fund` command group covers the whole channel: browse the catalog and a fund's detail, analysis, trend, returns, performance, NAV and holdings; review your fund positions; and validate, submit and cancel fund orders. Funds are addressed by `counter_id` (e.g. `UT/FD/HK0000384492`); `submit-order` / `cancel-order` prompt for confirmation unless `--yes`

### MCP

- **28 fund-channel tools** — Longbridge MCP gains the Hong Kong mutual-fund channel in sync: catalog & market data, your positions, order lookup, and fund order validate / submit / cancel (writes require two-step confirmation)

## 2026-08-19

### CLI v0.28.0
Expand Down
4 changes: 2 additions & 2 deletions docs/en/docs/cli/account/fund-positions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ longbridge fund-positions
```

```
| Symbol | Name | Net Asset Value | Cost Net Asset Value | Currency | Holding Units |
| Counter ID | Name | Net Asset Value | Cost Net Asset Value | Currency | Holding Units |
|--------|------|-----------------|----------------------|----------|---------------|
```

Expand All @@ -28,7 +28,7 @@ longbridge fund-positions
longbridge fund-positions --format json
```

Displays all fund and ETF positions in your account, including symbol, quantity, and cost information.
Displays all fund and ETF positions in your account, including counter_id, quantity, and cost information.

## Requirements

Expand Down
1 change: 1 addition & 0 deletions docs/en/docs/cli/fund/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "label": "Funds", "icon": "coins", "position": 11, "collapsed": true }
101 changes: 101 additions & 0 deletions docs/en/docs/cli/fund/market.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: 'market data'
sidebar_label: 'market data'
sidebar_position: 1
---

# longbridge fund (market data)

Browse the mutual-fund catalog and a fund's market data from the terminal — the hot list, the filterable fund list, and per-fund detail, analysis, trend, returns, performance, net value (NAV) and holdings.

Every fund is identified by its **`counter_id`** (e.g. `UT/FD/HK0000384492`), not a stock symbol. Get one from `longbridge fund hot` or `longbridge fund list`, then pass it as the positional argument to the other commands.

## Basic Usage

```bash
# Hot-selling funds — a good source of counter_ids
longbridge fund hot
```

```
| Counter ID | Name | Currency | Earning Rate | Risk Level |
|---------------------|-------------------------------|----------|--------------|------------|
| UT/FD/HK0000384492 | Allianz Income and Growth | USD | 12.34% | Medium |
| UT/FD/KYG3861F1019 | JPMorgan Global Bond | USD | 4.21% | Low |
```

## Examples

### Discover funds

```bash
# Hot-selling fund list
longbridge fund hot
# Full fund list, optionally narrowed by quick-filter ids and earning-rate intervals
longbridge fund list
longbridge fund list --quick-id 1 --quick-id 2 --time-interval 1m --time-interval 1y
# The filter options you can pass to `list`
longbridge fund filters
```

### Fund detail & analysis

```bash
# Fund profile: name, ISIN, risk level, manager, fees…
longbridge fund detail UT/FD/HK0000384492
# Analysis (level 1) and the deeper level-2 breakdown; --period selects the window
longbridge fund analysis UT/FD/HK0000384492
longbridge fund analysis-detail UT/FD/HK0000384492 --period 3
# Trend chart data
longbridge fund trend UT/FD/HK0000384492
```

### Returns & performance

```bash
# Annual / quarterly returns (paged)
longbridge fund annual-returns UT/FD/HK0000384492 --page 1 --size 20
longbridge fund quarterly-returns UT/FD/HK0000384492
# Performance figures, and a peer comparison
longbridge fund performance UT/FD/HK0000384492
longbridge fund performance-comparison UT/FD/HK0000384492 --period 3
```

### Net value (NAV)

```bash
# Latest NAV
longbridge fund nav UT/FD/HK0000384492
# Historical NAV — paged, or by a relative time range
longbridge fund nav-history UT/FD/HK0000384492 --page 1 --size 30
longbridge fund nav-range UT/FD/HK0000384492 --month-before 6
longbridge fund nav-range UT/FD/HK0000384492 --year-before 1
```

### Holdings

```bash
# A fund's top-10 holdings (--scene selects the breakdown)
longbridge fund holdings UT/FD/HK0000384492
# Reverse lookup: which funds hold a given stock
longbridge fund stock-holdings UT/FD/HK0000384492 --limit 20
```

Add `--format json` to any command for machine-readable output.

## Options

| Option | Commands | Description | Default |
| ------ | -------- | ----------- | ------- |
| `--quick-id` | `list` | Quick-filter id (repeatable) | — |
| `--time-interval` | `list` | Earning-rate interval, e.g. `1m` `3m` `1y` (repeatable) | — |
| `--period` | `analysis`, `analysis-detail`, `trend`, `performance-comparison` | Analysis / comparison period selector | — |
| `--page` / `--size` | `annual-returns`, `quarterly-returns`, `nav-history` | Page number and page size | — |
| `--month-before` / `--year-before` | `nav-range` | Relative NAV window before now | — |
| `--scene` | `holdings` | Holdings breakdown scene | — |
| `--limit` | `stock-holdings` | Max number of stocks to return | — |
| `--format` | all | Output format: `table` \| `json` | `table` |

## Requirements

These are market-data commands and need no account permission. Funds are addressed by `counter_id`, which you obtain from `fund hot` / `fund list`. For your holdings and orders, see [my positions](/docs/cli/fund/positions) and [orders & trading](/docs/cli/fund/orders).
96 changes: 96 additions & 0 deletions docs/en/docs/cli/fund/orders.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
title: 'orders & trading'
sidebar_label: 'orders & trading'
sidebar_position: 3
---

# longbridge fund (orders & trading)

Manage mutual-fund orders from the terminal — list your orders and transactions, inspect one order, validate an order before sending it, and submit or cancel an order.

Funds are identified by their **`counter_id`** (e.g. `UT/FD/HK0000384492`). These commands act on your account, so they require login; `submit-order` and `cancel-order` move real money and prompt for confirmation unless you pass `--yes`.

## Basic Usage

```bash
# Your fund orders (also the trade / execution record)
longbridge fund orders
```

```
| Order ID | Counter ID | Action | Amount | Units | Status | Currency | Created At |
|--------------------|---------------------|--------|--------|---------|-----------|----------|----------------------|
| 776181234567890123 | UT/FD/HK0000384492 | Buy | 100.00 | — | Filled | USD | 2026-09-20 10:03:11 |
```

## Examples

### Inspect orders & transactions

```bash
# All fund orders, or filtered
longbridge fund orders
longbridge fund orders --counter-id UT/FD/HK0000384492 --action buy --state filled \
--currency USD --start 2026-01-01 --end 2026-09-30 --page 1 --size 20
# One order's detail
longbridge fund order 776181234567890123
# Cash-flow transaction records
longbridge fund transactions --currencies USD,HKD --start 2026-01-01 --end 2026-09-30
```

### Validate before you buy

```bash
# Dry-run validation — places NO order, returns fees / estimated units / limits
longbridge fund validate-order UT/FD/KYG3861F1019 --action buy --currency USD --amount 100
```

### Submit an order

```bash
# Buy by cash amount (prompts for confirmation)
longbridge fund submit-order UT/FD/KYG3861F1019 --action buy --currency USD --amount 100
# Sell by units, skipping the prompt
longbridge fund submit-order UT/FD/KYG3861F1019 --action sell --currency USD --units 50 --yes
# Sell the entire holding
longbridge fund submit-order UT/FD/KYG3861F1019 --action sell --currency USD --sell-all --yes
```

### Cancel an order

```bash
# Withdraw an unfilled order (prompts for confirmation)
longbridge fund cancel-order 776181234567890123
longbridge fund cancel-order 776181234567890123 --yes
```

Add `--format json` to any command for machine-readable output.

## Options

| Option | Commands | Description | Default |
| ------ | -------- | ----------- | ------- |
| `--counter-id` | `orders` | Filter by fund counter id (repeatable) | — |
| `--action` | `orders`, `validate-order`, `submit-order` | `orders`: filter (`buy,sell`); order commands: `buy` \| `sell` | — |
| `--state` | `orders` | Filter by state(s), comma-separated | — |
| `--currency` | `orders`, `validate-order`, `submit-order` | Currency (e.g. `USD`, `HKD`) | — |
| `--business-type` / `--category` / `--currencies` | `transactions` | Transaction filters | — |
| `--start` / `--end` | `orders`, `transactions` | Date range (`YYYY-MM-DD` or RFC 3339) | — |
| `--page` / `--size` | `orders`, `transactions` | Page number and page size | — |
| `--amount` | `validate-order`, `submit-order` | Cash amount (amount-based order) | — |
| `--units` | `validate-order`, `submit-order` | Unit count (unit-based order) | — |
| `--dividend-option` | `validate-order`, `submit-order` | Dividend option | — |
| `--fund-source` | `validate-order` | Fund source | — |
| `--fee` | `submit-order` | Fee | — |
| `--sell-all` | `submit-order` | Sell the entire holding | false |
| `--remark` | `submit-order` | Order remark / note | — |
| `--yes` | `submit-order`, `cancel-order` | Skip the interactive confirmation | false |
| `--format` | all | Output format: `table` \| `json` | `table` |

## Requirements

OAuth trade permission is required — run `longbridge auth login` first. Always `validate-order` (or run `submit-order` without `--yes` to see the confirmation) before committing real capital. Funds are addressed by `counter_id` (from [`fund hot` / `fund list`](/docs/cli/fund/market)).

## Notes

`submit-order` and `cancel-order` affect live capital and prompt for confirmation before running; pass `--yes` only in trusted, non-interactive contexts.
74 changes: 74 additions & 0 deletions docs/en/docs/cli/fund/positions.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
title: 'positions'
sidebar_label: 'positions'
sidebar_position: 2
---

# longbridge fund (positions)

Review your mutual-fund holdings — the positions overview, a single holding's detail, and its performance, cumulative profit, net-value history and dividends.

Funds are identified by their **`counter_id`** (e.g. `UT/FD/HK0000384492`). These commands read your account, so they require login.

## Basic Usage

```bash
# Overview of every fund you hold
longbridge fund positions
```

```
| Counter ID | Name | Currency | Holding Units | Cost NAV | Current NAV | Holding Profit |
|---------------------|-----------------------------|----------|---------------|----------|-------------|----------------|
| UT/FD/HK0000384492 | Allianz Income and Growth | USD | 1250.00 | 9.812 | 10.431 | +773.75 |
```

## Examples

### Positions overview

```bash
longbridge fund positions
# Scope to a specific sub-account
longbridge fund positions --account-channel lb --aaid 123456
```

### A single holding

```bash
# Detail of one held fund, optionally over a date range
longbridge fund position UT/FD/HK0000384492
longbridge fund position UT/FD/HK0000384492 --start 2026-01-01 --end 2026-06-30
```

### Performance, profit, NAV & dividends of a held fund

```bash
# Performance figures for a fund you hold
longbridge fund position-performance UT/FD/HK0000384492
# Cumulative-profit series (paged, date range)
longbridge fund position-profits UT/FD/HK0000384492 --start 2026-01-01 --end 2026-06-30 --page 1 --size 30
# Net-value history over a relative window
longbridge fund position-nav UT/FD/HK0000384492 --month-before 6
longbridge fund position-nav UT/FD/HK0000384492 --year-before 1
# Dividend records
longbridge fund position-dividends UT/FD/HK0000384492 --currency USD --page 1 --size 20
```

Add `--format json` to any command for machine-readable output.

## Options

| Option | Commands | Description | Default |
| ------ | -------- | ----------- | ------- |
| `--account-channel` | `positions`, `position` | Account channel | — |
| `--aaid` | `positions`, `position` | Sub-account id | — |
| `--start` / `--end` | `position`, `position-profits`, `position-dividends` | Date range (`YYYY-MM-DD` or RFC 3339) | — |
| `--month-before` / `--year-before` | `position-nav` | Relative NAV window before now | — |
| `--currency` | `position-dividends` | Currency filter (e.g. `HKD`, `USD`) | — |
| `--page` / `--size` | `position-profits`, `position-dividends` | Page number and page size | — |
| `--format` | all | Output format: `table` \| `json` | `table` |

## Requirements

OAuth account permission is required — run `longbridge auth login` first. Funds are addressed by `counter_id` (from [`fund hot` / `fund list`](/docs/cli/fund/market)). To place or cancel fund orders, see [orders & trading](/docs/cli/fund/orders).
4 changes: 4 additions & 0 deletions docs/en/docs/cli/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ sidebar_icon: newspaper

# Release Notes

### [v0.29.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.29.0)

- **New `fund` command group — Hong Kong mutual funds** — `longbridge fund` brings the mutual-fund channel to the terminal: browse the catalog (`hot`, `list`, `filters`), read a fund's `detail`, `analysis` / `analysis-detail`, `trend`, `annual-returns` / `quarterly-returns`, `performance` / `performance-comparison`, latest and historical NAV (`nav`, `nav-history`, `nav-range`) and `holdings` / `stock-holdings`; review your holdings (`positions`, `position`, `position-performance`, `position-profits`, `position-nav`, `position-dividends`); and manage orders (`orders`, `order`, `transactions`, `validate-order`, `submit-order`, `cancel-order`). Funds are addressed by `counter_id` (e.g. `UT/FD/HK0000384492`), not a stock symbol — get one from `fund hot` / `fund list`. `submit-order` and `cancel-order` prompt for confirmation unless `--yes`. See the [Funds](/docs/cli/fund/market) docs

### [v0.28.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.28.0)

- **[Chat with LongbridgeAI in the terminal](/docs/cli/ai)** — the new `longbridge ai` command opens a full-screen chat: answers stream in as Markdown with terminal-drawn charts, box-drawn tables, syntax-highlighted code and live quote cards. A title-bar ticker follows every security the conversation mentions (click one for a full quote card), slash commands cover `/new` `/retry` `/copy` `/export` `/quote` `/resume` `/settings` `/agent` `/login`, and conversations are stored on your account — a chat started in the terminal continues wherever else you use LongbridgeAI
Expand Down
4 changes: 2 additions & 2 deletions docs/en/docs/trade/asset/fund.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func main() {
"account_channel": "lb",
"fund_info": [
{
"symbol": "HK0000447943",
"counter_id": "UT/FD/HK0000447943",
"symbol_name": "GAOTENG EMERGING MARKETS PLUS LONG/SHORT FIXED INCOME ALPHA FUND",
"currency": "USD",
"holding_units": "5.000",
Expand Down Expand Up @@ -268,7 +268,7 @@ func main() {
| list | object[] | false | stock holding information |
| ∟ account_channel | string | true | account type |
| ∟ fund_info | object[] | false | Fund Details |
| ∟∟ symbol | string | true | Fund ISIN code |
| ∟∟ counter_id | string | true | Fund counter id (last /-segment is the ISIN) |
| ∟∟ current_net_asset_value | string | true | current Equity |
| ∟∟ net_asset_value_day | string | true | current Equity time |
| ∟∟ symbol_name | string | true | Fund name |
Expand Down
10 changes: 10 additions & 0 deletions docs/zh-CN/docs/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ sidebar_position: 7
sidebar_icon: newspaper
---

## 2026-09-28

### CLI v0.29.0

- **[基金登陆终端](/zh-CN/docs/cli/fund/market)** — 新增 `longbridge fund` 命令组,覆盖整个基金渠道:浏览目录及单只基金的详情、分析、走势、收益、业绩、净值与持仓;查看你的基金持仓;并校验、提交与撤销基金订单。基金以 `counter_id`(如 `UT/FD/HK0000384492`) 寻址;`submit-order` / `cancel-order` 除非传 `--yes` 否则会要求确认

### MCP

- **新增 28 个基金渠道工具** — Longbridge MCP 同步支持香港互惠基金:目录与行情、我的持仓、订单查询,以及基金下单校验 / 提交 / 撤销(写操作需两步确认)

## 2026-08-19

### CLI v0.28.0
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/docs/cli/account/fund-positions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ longbridge fund-positions
```

```
| Symbol | Name | Net Asset Value | Cost Net Asset Value | Currency | Holding Units |
| Counter ID | Name | Net Asset Value | Cost Net Asset Value | Currency | Holding Units |
|--------|------|-----------------|----------------------|----------|---------------|
```

Expand Down
1 change: 1 addition & 0 deletions docs/zh-CN/docs/cli/fund/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "label": "基金", "icon": "coins", "position": 11, "collapsed": true }
Loading
Loading