Commit Graph

895 Commits

Author SHA1 Message Date
Jason Lee fc76975723 docs: Agent Auth Code TTL 同步为 10 分钟并补充安全提示
后端授权码有效期已调整为 10 分钟,三语言文档同步;
Security 章节新增「请勿分享授权码」条目。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 16:05:08 +08:00
Jason Lee e18fe16847 feat: include agent-auth page in CN region build; make Connect AI the default tab
- region.config.ts: whitelist **/docs/agent-auth.md so /docs/agent-auth
  is accessible on open.longbridge.cn
- Skill page: Connect AI is now the first and default segmented tab

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 15:26:38 +08:00
Jason Lee f0adabe780 docs: Add auth-code redemption path to Skill install guide
The /connect Agent Auth Code flow lets users hand a one-time code to
their AI. Update the install guide (en/zh-CN/zh-HK) so AI agents holding
a code redeem it via `longbridge auth login --auth-code` directly,
instead of falling back to the device flow that requires a hanging
process and browser approval.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 15:22:19 +08:00
Jason Lee 23e74c889c feat(skill): add segmented tab with Connect AI install path on skill page
- Hero install area now has a segmented control: "Copy command" (default)
  and "Connect AI" tabs
- Connect AI tab shows a 3-step card (get one-time auth code on Connect
  page → send snippet to AI → AI redeems and connects, no browser hops)
  with a dark Bot-icon CTA linking to /connect
- Brighten install label text (fg-3 → fg-2, 12px → 13px) for readability
- Locale strings added for en / zh-CN / zh-HK

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 14:39:06 +08:00
Jason Lee 1a43b15ec4 docs: add Agent Auth Code guide for browser-less authorization
- New agent-auth page (en / zh-CN / zh-HK): generate a one-time auth code
  at open.longbridge.com/connect, redeem via CLI --auth-code or the MCP
  /agent endpoint's authenticate tool
- CLI install docs: document `auth login --auth-code` fallback
- MCP docs: tip for clients with incomplete OAuth or no browser
- Skill references: setup/mcp auth-code flow for headless agents
- AppNav: add "Connect AI" entry to avatar menu

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 14:23:18 +08:00
Jason Lee c4d5a03da5 docs: update MCP host to mcp.longbridge.com / mcp.longbridge.cn
Replace https://openapi.longbridge.com/mcp with https://mcp.longbridge.com
and https://openapi.longbridge.cn/mcp with https://mcp.longbridge.cn across
docs (en/zh-CN/zh-HK), homepage components, README, and skill references.
Also update the build-time MCP tools.json endpoint in config.mts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 09:44:50 +08:00
Hogan 1c103c447a chore: update skills.json (2026-06-04) (#1070)
Auto-generated by skills repo CI.

Source commit:
longbridge/skills@9977e955fd

Updates `skills.json` with the latest skill list extracted from all
`SKILL.md` frontmatter files.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-04 21:09:38 +08:00
Hogan b5dde0bf94 chore: update skills.json (2026-06-04) (#1069)
Auto-generated by skills repo CI.

Source commit:
longbridge/skills@77c945d762

Updates `skills.json` with the latest skill list extracted from all
`SKILL.md` frontmatter files.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-04 19:44:47 +08:00
Jason Lee 783c646cfc docs: Add CLI v0.22.4 release notes and ETF holdings docs (#1068)
## Summary

- Add **CLI v0.22.4** release notes: `constituent` now supports ETFs —
asset-allocation breakdown for ETF symbols, and full US ETF holdings
fetched from SEC EDGAR N-PORT filings
(longbridge/longbridge-terminal#229, longbridge/longbridge-terminal#231)
- Document the new ETF holdings behavior in the `constituent` command
page (usage examples, SEC N-PORT output sample, fallback chain,
data-timeliness notes)
- Backfill missing changelog entries for CLI v0.22.2 / v0.22.3, and add
v0.22.4
- All three locales (en / zh-CN / zh-HK) updated in sync; Chinese docs
formatted with `autocorrect --fix`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 17:15:25 +08:00
Jason Lee df68a37912 docs: 新增开发者平台免责声明与 API 许可协议,优化法律文档导航 (#1066)
## 概述

新增开发者平台两份法律文档(HK/SG),并优化「法律文件」在站内的导航与布局。

## 改动

### 新增法律文档
- 《开发者平台免责声明》《API 许可协议》各含 HK / SG 两版,en / zh-CN / zh-HK 三语言,共 12 个页面
- 内容逐字取自法务提供的源文件,去除正文 H1、改由 frontmatter `title` 提供,与既有 legal 页保持一致
- 新增 `legal/index.md` 索引首页,按 SG / HK 分组索引全部协议

### 侧边栏
- `gen.ts` 新增 `_category_.json` 的 `indexLink`
字段:配置后该分类在侧边栏渲染为指向索引页的单链接、不展开子页面(避免平铺过多);特意不复用语义不同的 `link` 字段,避免误伤
`quote/subscribe`
- 法律文档顺序统一为 **SG 在前、HK 在后**

### Footer
- AppFooter 法律区由数据授权两项收敛为单个「协议与免责声明」入口,指向 `/docs/legal`

### 布局修复
- 修复文档顶部被固定导航栏遮挡(`.VPDoc.has-sidebar` 增加顶部留白)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 21:31:24 +08:00
Jason Lee 669e7b5083 docs: Add CLI v0.22.3 release notes (#1065)
为 longbridge CLI v0.22.3 补充 Release Notes(en / zh-CN / zh-HK 三种语言)。

## 本次发布概要

v0.22.3 聚焦面向 AI 工作流的输出可读性与完整性:

- **`quote` 新增美股隔夜时段数据** — `quote <SYMBOL> --format json` 现会填充
`overnight_quote`,与 `pre_market_quote`、`post_market_quote` 并列;此前隔夜字段始终为
`null`,会影响盘后判断([#228](https://github.com/longbridge/longbridge-terminal/pull/228))
- **持仓类命令显示账户类型 banner** —
`positions`、`fund-positions`、`assets`、`portfolio` 现会在表格前打印一行账户标识(`Live
A/C (real account)` / `Demo A/C (simulated
account)`),便于直接区分数据所属账户;`--format json`
输出保持不变([#226](https://github.com/longbridge/longbridge-terminal/pull/226))

> 注:GitHub 上 v0.22.3 release 页面发布后,文档内的 tag 链接即可生效。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 17:13:59 +08:00
UncertaintyDeterminesYou4ndMe 7b503f899d docs(skill): add Go SDK reference to longbridge skill (#1061)
## What

Adds a **Go SDK** reference set to the `longbridge` AI skill, mirroring
the existing `rust-sdk` references but kept concise:

- `references/go-sdk/overview.md` — install, Config (env / OAuth),
contexts, push callbacks, error handling
- `references/go-sdk/quote-context.md` — quote methods, `Subscribe` +
`On*` handlers
- `references/go-sdk/trade-context.md` — `SubmitOrder` struct, orders,
account, positions
- `references/go-sdk/types.md` — SubType / Period / AdjustType /
CalcIndex / OrderType / OrderSide / TimeType / OutsideRTH / OrderStatus
/ Currency
- linked from `SKILL.md`

Content stays high-level (method/struct/enum coverage) with pointers to
GoDoc + source for exact signatures, consistent with the skill-authoring
guidance in CLAUDE.md.

## Verification

Verified against the real SDK **`github.com/longbridge/openapi-go`
v0.24.1**:

**1. Compile check** — a program exercising every documented method,
struct field and constant was built with `go build` / `go vet`. Caught
and fixed **6 issues**:

| Doc claim | Real SDK |
|-----------|----------|
| `QuoteContext.CalcIndexes(...)` | method is singular `CalcIndex` |
| `QuoteContext.Watchlist(...)` | list getter is `WatchedGroups` |
| `SecurityDepth.Asks / .Bids` | fields are `.Ask` / `.Bid` |
| `GetHistoryOrders.StartAt/EndAt` as time | `int64` Unix secs
(`GetHistoryExecutions` uses `time.Time` — the two differ; now noted) |
| `GetAccountBalance{Currency: "HKD"}` | `Currency` is `trade.Currency`
→ use `trade.CurrencyHKD` |
| "prices/quantities use decimal" | quantities (`SubmittedQuantity`,
`ReplaceOrder.Quantity`) are `uint64`; only price fields use
`shopspring/decimal` |

**2. Live read-only run** — against a paper-trading account, **no orders
placed**. `Quote` / `StaticInfo` / `Candlesticks` / `Depth` /
`AccountBalance` / `StockPositions` / `TodayOrders` all returned real
data with the documented field names.

**3. Independent cross-review** — a second model (kimi) and a separate
agent re-checked the docs against source; both confirmed the fixes,
including the `uint64`-vs-`decimal` correction (verified via a
deliberate compile-failure test).

## Notes

- Docs only; no code/build changes. No submodules touched.
- Users will need `go mod tidy` to pull the SDK's transitive deps —
normal Go flow, no doc change needed.

---------

Co-authored-by: 陆逊 <jiaxiong.liu@longbridge-inc.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 15:52:23 +08:00
Jason Lee 57bbb855da docs: Add CLI v0.22.2 release notes (#1060)
为 longbridge CLI v0.22.2 补充 Release Notes(en / zh-CN / zh-HK 三种语言)。

## 本次发布概要

v0.22.2 是一个聚焦 **JSON 输出一致性** 的维护版本,主要面向脚本与 AI 工具调用场景:

- **JSON 时间戳统一为 RFC 3339** — `topics`(帖子与回复时间)及账户盈亏流水记录改用 RFC 3339
日期时间,不再输出原始 Unix
时间戳([#223](https://github.com/longbridge/longbridge-terminal/pull/223)、[#225](https://github.com/longbridge/longbridge-terminal/pull/225))
- **`rank` / `screener` / `short-positions` / `top-movers` JSON 输出优化** —
内部 `counter_id` 替换为可读的 `symbol`,`rank` 分类与 `screener strategies`
输出扁平化、规范化([#221](https://github.com/longbridge/longbridge-terminal/pull/221))
- **`market-temp --history` 默认区间** — 省略 `--start` 时默认取结束日期前 30
天([#224](https://github.com/longbridge/longbridge-terminal/pull/224))

> 说明:v0.22.1(screener 迁移 AI 端点)此前未在 Release Notes 中单列,本次仅补充 v0.22.2。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 13:36:12 +08:00
mingxingmeng-ctrl deeed629ec 完善 Skill 安装指引,让 agent 自主跑通 Step 1 安装与鉴权 (#1059)
## 目的

让 AI agent 能完整、无偏差地执行 Step 1(安装 CLI → 鉴权 → 验证)。此前唯一的执行偏差在 `longbridge
auth login` 一步——agent 容易前台干等,或不知如何处理浏览器授权。

## 改动

仅 `docs/{en,zh-CN,zh-HK}/skill/install/index.md` 顶部 `<!-- AI INSTRUCTION
-->` 块,每份 3 行(正文及 Step 3/4 与 main 完全一致):

1. **前言**:要求 agent 为这些步骤建立 TodoList 并自己运行命令
2. **Step 1**:CLI 方式自己运行安装命令,再用 `longbridge --version` 确认
3. **Step 2(核心)**:在后台运行 `longbridge auth login`——它打印验证 URL + code 并轮询约 5
分钟;agent 把 URL/code 转交用户、等其在浏览器批准、待 exit 0(`Successfully
authenticated.`)后继续,并用 `longbridge auth status` 确认

## 范围

纯文档 · 3 文件 · 每份 3 行 · 不涉及 Homebrew、不改正文与 Step 3/4。

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 09:32:03 +08:00
Endless bb1efde49d 检查修复 developers 项目内 /skill 介绍页面有一段 "请按照以下指南安装 Longbridge AI toolkit:https://open.longbridge.com/skil (#1056)
🤖 Auto-generated by Endless task
[#23](https://endless.longbridge-inc.com/projects/developers/tasks/23).

Initiated by: Huacnlee Li Huashun

## 背景

`/skill` 介绍页面中有一段引导用户安装 Longbridge AI toolkit 的文案,其中包含安装指南
URL(`/skill/install.md`)以及 ZIP 下载命令中的文件地址。平台在中国大陆提供独立域名
`open.longbridge.cn`,对应的 CN 版本构建时会通过 `VITE_SITE_HOSTNAME` 环境变量注入正确的域名前缀。

然而 `Skill.vue` 中这些 URL 均为硬编码字符串 `https://open.longbridge.com/...`,未引用
`siteHostname` 工具常量。这导致即使在 `.cn` 构建下,页面上展示的安装 URL 仍为
`.com`,与用户所在的域名环境不符。

## 根因

`LOCALE` 对象中的 `installCmd` 字符串以及 catalog 弹窗的 ZIP 下载链接,均直接嵌入了
`https://open.longbridge.com` 字面量,没有引用
`docs/.vitepress/theme/utils/region.ts` 导出的 `siteHostname`
常量。`siteHostname` 在构建时从 `import.meta.env.VITE_SITE_HOSTNAME` 读取域名(CN
构建设为 `https://open.longbridge.cn`,默认为
`https://open.longbridge.com`),是该代码库中处理多域名的标准方式,但 `Skill.vue` 中遗漏了这一引用。

## 摘要

- 解决的问题:`.cn` 域名下的 `/skill` 页面,安装指南 URL 和 ZIP 下载链接仍显示为 `.com`
- 做了什么:在 `Skill.vue` 中导入 `siteHostname`,将 6 处硬编码
`https://open.longbridge.com` 替换为 `${siteHostname}` 模板表达式
- 为什么这样做:`siteHostname` 是构建时常量,SSR 和客户端水合使用同一个值,彻底消除水合不一致;与
`Breadcrumb/index.vue` 等组件的现有实现保持一致
- 如何验证:`VITE_SITE_HOSTNAME=https://open.longbridge.cn bun run
build:release`,检查构建产物中安装指南 URL 是否为 `.cn`;默认构建检查是否为 `.com`

## 修改

| 文件 | 改动内容 |
|---|---|
| `docs/.vitepress/theme/components/Skill.vue` | 导入 `siteHostname`;替换
en/zh-CN/zh-HK 三处 `installCmd` 中的域名、computed 中两处 curl 下载命令、template 中一处
ZIP href |

## 关键决策

使用构建时常量 `siteHostname` 而非运行时 `window.location.hostname` 检测:域名在运行时不会改变,且
`siteHostname` 已是本项目多域名处理的既定模式,无需引入额外的运行时判断逻辑。

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-06-01 20:43:27 +08:00
hold-baby 8d0f6fc4ae 修复大陆版构建未重写 openapi.longbridge.com 为 .cn (#1057)
## 合入判断
**[APPROVE]** — 大陆版 region 重写机制扩展,补齐遗漏的 API 域名,无显著风险
> 3 files · +32 / -10 · `docs/.vitepress` `docs/public`

---
## 变更概要
- 扩展 `regionConfig` 的 URL 重写:在 markdown 渲染、HTML 输出、install 静态脚本三处统一新增
`openapi.longbridge.com → apiBaseUrl`(cn 版即 `.cn`),与原有
`open.longbridge.com → siteHostname` 并列
- 把两处单字符串替换重构为 `[from, to][]` 数组循环,方便后续再添加其它待重写域名
- 修正 `docs/public/longbridge-terminal/install` 第 8 行硬编码 `.cn`
的残留,统一为全球默认 `.com`,由构建期 region 重写在 cn 构建时统一换回 `.cn`

---
## 风险分析
| 风险点 | 等级 | 缓解措施 |
|--------|------|---------|
| 替换顺序导致二次替换 |  | 两域名互不为子串(`open` 与 `openapi` 在第 12 字符就分叉),串行
`split/join` 安全 |
| 全球版构建受影响 |  | 全球版 `regionCfg` 为 `undefined`,新条件分支不进入;install 源文件改回
`.com` 后全球版表现一致 |
| 大陆版漏改子域名 | 🟢 | 已对 cn 构建产物全量扫描(HTML + install),零 `.longbridge.com` 残留 |
| install 源文件改 `.cn`→`.com` 影响生产 |  | 此文件由 buildEnd 在 cn 构建时再次重写为
`.cn`;全球版本就该用 `.com` |

---
## 设计决策
- **源文件统一全球默认域名,差异化交给 region 重写**:避免在源文件维护两套常量,与项目已有重写机制一致
- **三处重写点保持各自独立**:markdown 插件 / transformHtml / buildEnd install
各处的执行时机和载体不同(token / 字符串 / 文件),不抽象统一函数,避免过度耦合

---
## 代码关注点
1. **[需判断]** `apiBaseUrl` 是 origin 还是带 path
(`docs/.vitepress/md-plugins/region-filter.ts:18`)
`regionConfig.cn.apiBaseUrl = 'https://openapi.longbridge.cn'` 不带末尾
`/`,与被替换的 `https://openapi.longbridge.com` 一致,目前安全;若未来配置改成带
path/trailing slash 会导致 URL 拼接错位,reviewer 拍板是否在配置层加格式校验
2. **[信息]** dist 下的 `.md` 副本和 `llms.txt` 未走 region 过滤 (`docs/.vitepress`
外的 `copy-routes.ts` / `generate-llms.ts`)
产物里 `.md` / `llms.txt` 仍含 `.com`(独立生成链路,不经 markdown 插件),本次 scope
不处理;如需大陆版 AI 消费副本也走 `.cn`,需单独 PR 给那两个脚本加 region 化

---
## 验证状态
 本地 `bun run build:cn` 构建成功(170 行输出,1 warning,无 error) ·  dist HTML
全量扫描零 `.longbridge.com` 残留 ·  install / install.ps1 产物 5/5 处全部 `.cn` ·
📋 需 reviewer 验证:线上 `open.longbridge.cn` 实际访问 mcp / skill 页面域名展示

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-06-01 19:21:33 +08:00
Hogan 59b5081886 chore: update skills.json (2026-06-01) (#1054)
Auto-generated by skills repo CI.

Source commit:
longbridge/skills@0083b60f56

Updates `skills.json` with the latest skill list extracted from all
`SKILL.md` frontmatter files.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-01 18:01:16 +08:00
拉罐 30401a857a feat: integrate Google One Tap login via CDN bundle (#1051)
Inject the `google-one-tap.es.js` CDN bundle into every page <head> via
VitePress `head` config, so it loads in both `bun run dev` and built
output (works around `transformHtml` being build-only).

- Gated by `VITE_REGION !== 'cn'` (Google unavailable in China).
- `data-proxy` attribute driven by `process.env.PROXY`: `canary` for
`dev:canary` / `build:canary`, otherwise `production`. CI inherits via
the same npm scripts — no workflow edits required.
- No `data-region` passed: the bundle falls back to `app-id` / `region`
cookies with `sg` default, which is correct for this first-party
`.longbridge.com` site.
- On success the bundle writes session cookies on `.longbridge.com` and
reloads, so `longportInternal.isLogin()` picks it up.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 10:38:18 +08:00
Hogan 31254b9803 chore: update skills.json (2026-05-27) (#1038)
Auto-generated by skills repo CI.

Source commit:
longbridge/skills@ae37197cab

Updates `skills.json` with the latest skill list extracted from all
`SKILL.md` frontmatter files.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-27 19:21:20 +08:00
JetSquirrel ed10f89ddd docs: remove blank lines in CliCommand blocks to fix heading render (#1039)
Blank lines inside <CliCommand> blocks caused markdown parser to
interpret `# ...` comment lines as H1 headings instead of code comments.

<img width="763" height="456" alt="image"
src="https://github.com/user-attachments/assets/a0b20d2b-55ab-44ef-8d01-86b1926acd2a"
/>

Removed the blank lines:
<img width="754" height="433" alt="image"
src="https://github.com/user-attachments/assets/e67d0cfd-909c-47df-b675-6c894d7adc42"
/>

Co-authored-by: Tian Deng <tian.deng@longbridge-inc.com>
2026-05-27 17:05:39 +08:00
Jason Lee bb169b4d46 feat: add User Data Authorisation docs and footer links (#1025)
## Summary

- Add `docs/{en,zh-CN,zh-HK}/docs/legal/` directory with
`_category_.json` (position 8, collapsed)
- Add HK and SG versions of User Data Authorisation and Acknowledgement
in three languages (6 files total)
- Add links in `AppFooter.vue` Legal section pointing to the two new
pages
- Add i18n translation keys (`footer.dataAuthorisationHK` /
`footer.dataAuthorisationSG`) for all three locales
- Use `sidebar_label` for shorter sidebar display names

## Test plan

- [ ] Sidebar shows "Legal" section (collapsed) with "Data Authorisation
(HK)" and "Data Authorisation (SG)"
- [ ] Each page renders the full legal text correctly in all three
languages
- [ ] Footer Legal section shows two new links; clicking navigates to
the correct pages
- [ ] `localePath()` correctly prefixes `/zh-CN/` and `/zh-HK/` for
non-English locales

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 18:59:52 +08:00
Hogan 147b6df7b3 docs: update screener docs for AI endpoints and new filter/rank features (#1036)
## Summary

- **CLI screener** (3 locales, `cli/quant/screener.md`): replaced
quant-scripting content with new `screener` subcommand reference —
`strategies` (removed `--all`, added `--market US|HK|CN|SG`), `run <ID>`
(pagination with `--page`/`--count`, `prevchg` desc default, flat
`items[]` JSON with numeric values), new `filter` ad-hoc command, and
`indicators` (flat array JSON, `filter_` prefix stripped, `tech_values`
field)
- **rank** (3 locales, `market/status/rank_list.md`): documented that
`ib_` prefix is optional in `--key` and is stripped from listing output
- **SDK screener docs** (3 locales each): updated endpoint paths to
`/v1/quote/ai/screener/...`, added `market` parameter to
`screener_recommend_strategies` and `screener_user_strategies`, noted
path-param URL for `screener_strategy`, normalized response examples for
`screener_search` (`items[]`, numeric values) and `screener_indicators`
(flat array, no `filter_` prefix)

## Test plan

- [ ] Verify `screener strategies --market HK` example renders correctly
in all 3 locales
- [ ] Verify `screener filter` section appears as a new sub-section in
CLI docs
- [ ] Verify `screener run` JSON output example shows `items[]` with
numeric values
- [ ] Verify `rank_list` docs show `ib_` prefix note in all 3 locales
- [ ] Verify SDK endpoint paths updated in all 6 screener SDK doc files
(3 locales x 2 strategy endpoints)
- [ ] Verify `screener_indicators` response example is a flat array

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-05-23 18:45:03 +08:00
Jason Lee e94153b2e5 docs(cli): Update security-list to reflect multi-market and pagination support (#1004)
## Summary

- Remove outdated "US market only" restriction — `security-list` now
supports US, HK, CN, and SG markets
- Add pagination examples (`--page`, `--count`) introduced in
longbridge-terminal

## Test plan

- [ ] Verify EN/zh-CN/zh-HK pages render correctly in the docs site

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 14:53:54 +08:00
Hogan e982c41920 docs: add shareholders, screener, short-trades, rank, stock-events docs + CLI v0.22.0 release notes (#1013)
## Summary

SDK documentation and CLI release notes for 13 new APIs. Branch cut from
main.

Related SDK PRs: [openapi
#527](https://github.com/longbridge/openapi/pull/527), [openapi-go
#92](https://github.com/longbridge/openapi-go/pull/92)

### New SDK docs (3 locales: zh-CN, zh-HK, en)

**FundamentalContext:** `shareholder_top`, `shareholder_detail`,
`valuation_comparison`

**MarketContext:** `stock_events`, `rank_categories`, `rank_list`

**QuoteContext:** `short_positions` (updated to US+HK unified),
`short_trades` (new)

**New ScreenerContext:** `screener_recommend_strategies`,
`screener_user_strategies`, `screener_strategy`, `screener_search`,
`screener_indicators`

### CLI v0.22.0 release notes
`shareholder --top/--object-id`, `short-trades`, `compare`,
`top-movers`, `screener`, `rank`

## Test plan
- [ ] `autocorrect --lint docs/` — No issues 

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 14:53:28 +08:00
Hogan e89d4ba394 fix(docs): fix DCA SDKLinks method names and remove delete_dca page (#1033)
## Summary

Two issues fixed in the DCA documentation (all 3 locales: zh-CN, zh-HK,
en):

1. **SDKLinks method names were wrong** — the `<SDKLinks>` components
referenced non-existent method names, causing broken SDK code links
2. **`delete_dca.md` removed** — the SDK has no `delete` method; the CLI
example on that page already used `dca stop`, so the page was redundant
with `stop_dca.md`

## SDKLinks fixes

| File | Before | After |
|------|--------|-------|
| `list_dca.md` | `method="list_dca"` | `method="list"` |
| `create_dca.md` | `method="create_dca"` | `method="create"` |
| `update_dca.md` | `method="update_dca"` | `method="update"` |
| `dca_history.md` | `method="dca_history"` | `method="history"` |

Already correct (no change): `pause`, `resume`, `stop`, `stats`,
`check_support`, `calc_date`, `set_reminder`

## Removed files (3 locales)

- `docs/{locale}/docs/account/dca/delete_dca.md` — SDK has no `delete`
method; functionality is covered by `stop_dca.md`

## Test plan
- [x] `autocorrect --lint docs/` — no issues 
- [x] Local dev server verified (`npm run dev`) 

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-22 11:36:48 +08:00
Endless 5381239e14 Fix locale path for Navbar. (#1034)
🤖 Auto-generated by Endless task
[#22](https://endless.longbridge-inc.com/projects/developers/tasks/22).

Initiated by: Huacnlee Li Huashun

## 背景


开发者文档站(open.longbridge.com)支持三种语言:英文(根路径)、简体中文(`/zh-CN/...`)和繁体中文(`/zh-HK/...`)。用户切换语言后,页面
URL 会携带对应的语言前缀,但 AppNav 顶部导航栏中的链接(Docs、Pricing、CLI、MCP、Skill、品牌 Logo 等)及
FeaturesMenu
功能下拉菜单中的链接,始终指向英文根路径,而非当前语言路径。这意味着在中文页面点击导航链接会跳回英文版本,用户体验不连贯。

## 根因

`utils/i18n.ts` 中的 `localePath()` 函数通过读取 `window.location.pathname`
来判断当前语言前缀。这个读取行为不是 Vue 响应式依赖——Vue 的响应式系统无法追踪它,因此模板中调用 `localePath(href)`
的绑定不会在语言变化时自动重新求值。

更关键的是,VitePress 在静态生成阶段(SSR)渲染各语言页面时,`isServer()` 返回
`true`,`localePath()` 直接原样返回路径,不添加任何语言前缀。预生成的 zh-CN / zh-HK 页面 HTML
中,导航链接因此全部是无前缀的英文路径。客户端水合时,若没有响应式依赖触发重新渲染,这些链接便保持错误状态。

## 摘要

- **解决的问题**:zh-CN / zh-HK 页面的 AppNav 导航链接及 FeaturesMenu
功能菜单链接不携带语言前缀,导致点击后跳转回英文根路径。
- **做了什么**:
- `utils/i18n.ts`:新增 `useLocalePath()` composable,内部使用 VitePress
`useData().localeIndex`(响应式 ref)计算语言前缀,取代直接读取 `window.location.pathname`
- `AppNav.vue`:将 `localePath` 的静态导入替换为 `useLocalePath` composable,在
`setup` 中调用获得响应式路径函数
  - `FeaturesMenu.vue`:同上,替换为 `useLocalePath` composable
- **为什么这样做**:
- `localeIndex` 是 VitePress 内置的响应式 ref,SSR 阶段也能正确返回当前语言键(`'root'` /
`'zh-CN'` / `'zh-HK'`),从根本上消除 SSR 预生成时的无前缀问题
- composable 返回的是普通函数而非 computed ref,在模板绑定中调用时,Vue 渲染 effect 会自动追踪
`localeIndex.value` 作为依赖,无需额外包裹
  - 保留原有 `localePath` 导出不变,其他调用方(如 `NewHomePage/index.vue`)无需修改
- **如何验证**:`bun run dev` 后访问 `/zh-CN/docs`,检查 AppNav 所有链接 href 是否包含
`/zh-CN/` 前缀;访问 `/zh-HK/docs` 重复检查;开发者工具控制台无 Vue hydration 警告

## 修改

| 文件 | 改动内容 |
|---|---|
| `docs/.vitepress/theme/utils/i18n.ts` | 新增 `useLocalePath()`
composable,使用 `useData().localeIndex` 响应式计算语言前缀 |
| `docs/.vitepress/theme/components/AppNav.vue` | 将 `localePath` 静态导入替换为
`useLocalePath`,在 setup 中调用 |
| `docs/.vitepress/theme/components/FeaturesMenu.vue` | 将 `localePath`
静态导入替换为 `useLocalePath`,在 setup 中调用 |

## 关键决策

使用 `localeIndex`(值为 `'root'` / `'zh-CN'` / `'zh-HK'`)而非 `lang`(值为
`'en-US'` / `'zh-CN'` / `'zh-HK'`)计算 URL 前缀,因为 `localeIndex` 的值与
VitePress locales 配置键完全对应,英文根路径用 `'root'` 表示而非
`'en'`,映射逻辑更直接,不需要额外的字符串转换。

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-05-22 11:36:35 +08:00
Hogan 5b6d50077e chore: update skills.json (2026-05-21) (#1032)
Auto-generated by skills repo CI.

Source commit:
longbridge/skills@4ce7a1998a

Updates `skills.json` with the latest skill list extracted from all
`SKILL.md` frontmatter files.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-21 21:33:32 +08:00
Endless e26619f4b3 Update skills (#1029)
## Summary

- 在 Skill 目录列表中,将 `longbridge`(总览 Skill)标记为 Popular(`tagType: 'hot'`)
- 同步更新三个语言版本(en / zh-CN / zh-HK)的 skill-catalog 配置
- 同步更新 `Skill.vue` 中硬编码的 `SKILLS` 数组

## Test plan

- [ ] 访问 Skill 页面,确认 Longbridge Overview 卡片显示 Popular 标签
- [ ] 切换三种语言,确认标签均正常显示

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2026-05-21 21:16:28 +08:00
Endless ba970ec583 Add progress bar to page loading. (#1030)
🤖 Auto-generated by Endless task
[#21](https://endless.longbridge-inc.com/projects/developers/tasks/21).

Initiated by: Huacnlee Li Huashun

## 背景

VitePress
站点采用客户端单页导航(SPA),用户点击内部链接后,页面内容需要通过网络请求加载。在网速较慢的情况下,点击链接后会有一段时间页面没有任何视觉反馈,用户无法判断是否点击成功、是否正在加载。

这一问题在海外用户访问时尤为明显,因为服务器位于香港,部分地区的延迟可能达到数百毫秒到几秒。缺少加载指示会导致用户重复点击或误以为网站出现故障。

## 摘要

- 解决的问题:VitePress 单页导航期间无加载反馈,网速较慢时用户体验差
- 做了什么:
- 新增 `useProgressBar.ts` 组合式模块,封装进度条的响应式状态和
`startProgress`/`finishProgress` 控制函数
- 新增 `ProgressBar.vue` 组件,以 `position: fixed` 固定在视口顶部,使用主题品牌色渲染 2px
高度进度条
- 修改 `theme/index.ts`,在 VitePress 路由 `onBeforeRouteChange` 触发
`startProgress()`,在 `onAfterRouteChange` 触发 `finishProgress()` 并保留原有
`saveInviteCodeFromUrl` 逻辑
  - 修改 `LayoutInner.vue`,在布局顶部引入并渲染 `<ProgressBar />`
- 为什么这样做:
  - 未引入新的 npm 依赖(nprogress 等),避免增加 bundle 体积和版本维护成本;自定义实现仅约 25 行
- 使用模块级响应式状态,组件直接订阅,无需 `provide/inject`,且 SSR 阶段 `visible` 初始为
`false`,不会影响静态构建
- 几何缓动算法(`current + (85 - current) * 0.1`)使进度条在快速和慢速网络下均表现自然,与
GitHub、YouTube 等主流实现一致
- 如何验证:
  1. 在 `code/developers/` 目录运行 `bun run dev`
  2. 通过侧边栏在不同文档页面间导航,顶部应出现品牌色细进度条并在加载完成后消失
  3. 切换 dark mode,验证进度条颜色跟随 `--vp-c-brand-1`/`--vp-c-brand-2` CSS 变量
  4. 在系统/浏览器无障碍设置中开启「减少动态效果」,验证进度条仍可见但无过渡动画

## 修改

| 文件 | 改动内容 |
|---|---|
| `docs/.vitepress/theme/composables/useProgressBar.ts` |
新增:模块级响应式状态和进度控制函数 |
| `docs/.vitepress/theme/components/ProgressBar.vue` | 新增:固定定位进度条组件,支持
CSS Transition 淡出和 prefers-reduced-motion |
| `docs/.vitepress/theme/index.ts` | 新增 `useProgressBar`
导入,将路由钩子替换为链式调用(进度条 + 原有 invite-code 逻辑) |
| `docs/.vitepress/theme/layouts/LayoutInner.vue` | 引入并在 `layout-top`
slot 后渲染 `<ProgressBar />` |

## 关键决策

不引入 nprogress 等第三方库——其核心逻辑与本实现等价,但需额外的 npm
依赖、类型声明和样式覆盖。自定义实现代码量极小,且可直接使用 VitePress 主题的 CSS 变量保持视觉一致性。

---------

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2026-05-21 20:53:10 +08:00
hold-baby 8ac520654c cn 版放出 MCP 页面并修复翻页指向不可访问页面 (#1028)
## 变更概要
- `region.config.ts`: cn region includePages 白名单添加 MCP 页面
- `AppNav.vue`: 从 CN_HIDDEN_KEYS 中移除 mcp,cn 版顶部导航栏显示 MCP 入口
- 三语言 mcp.md: 添加 prev/next: false frontmatter,禁用底部翻页导航

## 风险分析
无显著风险(纯配置变更 + frontmatter)

## 验证状态
- 本地 VITE_REGION=cn dev server 验证:导航显示 MCP、翻页已消除
- 线上海外版确认同样存在翻页问题(Next Page -> Overview),此修复一并解决

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-05-21 18:10:09 +08:00
hold-baby 640368c3a2 在大陆版本站点放出 MCP 页面 (#1027)
## 合入判断
**[APPROVE]** — 在 cn region 白名单中添加 MCP 页面,使大陆站点可访问 MCP 文档
> 1 file · +3 / -0 · `region.config.ts`

---
## 变更概要
- 在 `region.config.ts` 的 cn region `includePages` 白名单中添加
`**/docs/mcp.md` glob 模式
- Nav 入口已存在(各语言 nav.ts 已有 MCP 链接),且不在 `excludeNavLinks` 中,无需额外改动

---
## 风险分析
无显著风险

---
## 代码关注点
无

---
## 验证状态
 配置项语法正确 · 📋 需验证:cn region 构建后 MCP 页面可访问

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-05-21 17:46:52 +08:00
Endless 2f793134fa https://open.longbridge.com/zh-CN/skill/install/
https://open.longbridge.com/zh-CN/docs/mcp

这两个页面顶部 (#1022)

🤖 Auto-generated by Endless task
[#17](https://endless.longbridge-inc.com/projects/developers/tasks/17).

Initiated by: Huacnlee Li Huashun

## 背景

Longbridge Developers 网站(open.longbridge.com)使用自定义的 `AppNav` 组件替代
VitePress 默认导航栏。`AppNav` 被设计为 `position: fixed`,固定在页面顶部,高度 60px。

VitePress 默认会在 `VPContent` 上添加 `padding-top: var(--vp-nav-height)`
来补偿固定导航栏的高度,确保页面内容从导航栏下方开始显示。然而,`index.css` 中存在一条全量覆写规则,将所有 `.VPContent`
的 `padding-top` 强制设为 0,注释中错误地描述 AppNav 为 sticky(文档流内),因此"不需要 VitePress
的补偿"。

实际上 AppNav 是 `position: fixed`,不在文档流内,页面内容需要显式的 `padding-top`
才能从导航栏下方开始渲染。

## 根因

`docs/.vitepress/theme/style/index.css` 中存在如下规则:

```css
@media (min-width: 960px) {
  .VPContent {
    padding-top: 0 !important;
  }
}
```

该规则对所有 `.VPContent` 生效,完全抹除了 VitePress 为固定导航栏所添加的 60px `padding-top` 补偿。

对于有侧边栏的页面(`.VPContent.has-sidebar`),侧边栏布局会另行处理内容偏移,因此该 bug 不可见。但对于使用默认
doc 布局且 `sidebar: false` 的页面——即 `/skill/install` 和
`/docs/mcp`——内容会从视口顶部开始渲染,直接被固定导航栏遮挡。

## 摘要

- 解决的问题:`/skill/install` 和 `/docs/mcp` 页面(含 en / zh-CN / zh-HK
三语言版本)顶部内容被 AppNav 遮挡
- 做了什么:将 `index.css` 中覆写 `padding-top` 的选择器从 `.VPContent` 收窄为
`.VPContent.has-sidebar`,仅对有侧边栏的页面保持 `padding-top: 0`;无侧边栏页面则恢复
VitePress 默认的 `padding-top: var(--vp-nav-height)`(60px)
- 为什么这样做:修改量最小,仅影响一处选择器;避免修改 AppNav 的 `position` 属性(会牵连更多依赖固定定位的布局),也避免在
6 个 Markdown 文件中逐一添加 `padding-top`
- 如何验证:`bun run dev`,访问 `/zh-CN/skill/install/` 和
`/zh-CN/docs/mcp`,确认标题不再被导航栏遮挡;访问任意带侧边栏的文档页确认布局无变化

## 修改

| 文件 | 改动内容 |
|---|---|
| `docs/.vitepress/theme/style/index.css` | 将 `@media (min-width:
960px)` 块中的 `.VPContent` 选择器改为 `.VPContent.has-sidebar` |

## 关键决策

将选择器从 `.VPContent` 收窄为 `.VPContent.has-sidebar`,而不是删除该规则或修改 AppNav
的定位方式:有侧边栏的页面依赖 `padding-top: 0` 来避免额外偏移,改动最小化、影响面最小,且对所有未来新增的无侧边栏 doc
页面同样生效,无需逐页维护。

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-05-21 13:31:55 +08:00
Endless 6299f499a4 将首页的:“专为 AI 而生” 改为 “让你的 AI 直连真实市场”,但帮我优化一下语句 (#1023) 2026-05-21 12:58:16 +08:00
Endless 62d152c446 developers 项目的 Footer 下的 Products 里面去掉 Docs link, 它不是一个独立的产品。 (#1021)
🤖 Auto-generated by Endless task
[#16](https://endless.longbridge-inc.com/projects/developers/tasks/16).

Initiated by: Huacnlee Li Huashun

## 背景

Longbridge Developers 网站 Footer 的 Products 栏目中包含一个 "Docs" 链接,指向
`/docs`(文档首页)。Products 栏目的定位是列出平台提供的独立产品,如 AI Skill、CLI、MCP、LLMs
等。文档(Docs)是网站的通用入口,本身不是一个独立的产品形态,放在 Products 栏目中会造成概念混淆。

去掉该链接可以让 Products 栏目的内容更加准确,突出平台真正对外提供的产品。文档入口仍然保留在 Resources 栏目(以
"Documentation" 标题链接到 `/docs`),用户依然可以通过该入口访问文档。

## 摘要

- 解决的问题:Footer Products 栏目中 "Docs" 链接与产品定义不符,文档是通用入口而非独立产品。
- 做了什么:从 `AppFooter.vue` 的 Products `<ul>` 列表中删除 `<li><a
:href="localePath('/docs')">Docs</a></li>` 这一行。
- 为什么这样做:Products 栏目应只列出平台产品(AI Skill、CLI、MCP、LLMs),文档入口已在 Resources
栏目中以 "Documentation" 存在,不需要重复出现在 Products 中。
- 如何验证:本地运行 `bun run dev`,打开任意页面,检查 Footer > Products 栏目,确认只剩 AI Skill /
CLI / MCP / LLMs 四项,不再出现 Docs 链接;同时确认 Resources 栏目的 Documentation
链接仍然存在。

## 修改

| 文件 | 改动内容 |
|---|---|
| `docs/.vitepress/theme/components/AppFooter.vue` | 从 Products 列表中删除指向
`/docs` 的 Docs 链接 |

## 关键决策

无。改动范围极小(删除单行),不涉及任何逻辑变更,也不影响其他语言版本(`AppFooter.vue` 是唯一的 Footer
组件,`localePath` 会自动处理多语言路径)。

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-05-21 11:24:41 +08:00
Jason Lee 79ed227ba7 chore: Fix sdk install commands. 2026-05-21 11:00:47 +08:00
Jason Lee da67ec3587 chore: Fix home links (#1019) 2026-05-21 10:56:45 +08:00
Jason Lee cea1675f2f Fix logo link and click range. 2026-05-20 22:52:44 +08:00
Jason Lee 367633925c Fix build error 2026-05-20 22:34:11 +08:00
Jason Lee 83eccefb2d Fix longbridge.cn page links. (#1018) 2026-05-20 22:33:13 +08:00
Jason Lee 3e81bc6ca4 fix(nav): use fixed paths for /dashboard and /log-out (#1016)
## Summary

- `/dashboard` 和 `/log-out` 属于另一个应用的路由,不应加语言前缀
- 将 `localePath('/dashboard')` 和 `localePath('/log-out')` 替换为固定路径
`/dashboard` 和 `/log-out`
- 涉及文件:`AppNav.vue`、`UserAvatar/index.vue`、`HeroSection.vue`

## Test plan

- [ ] 登录后点击导航栏 Dashboard 按钮,确认跳转到 `/dashboard`
- [ ] 点击头像下拉菜单中的 Dashboard / Log out,确认路径正确无语言前缀
- [ ] 在 `/zh-CN/` 页面下验证以上链接同样正确

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 22:00:50 +08:00
Jason Lee 20d75dbad1 fix(nav): use createLoginRedirectPath for login button, fix footer legal links (#1015)
## Summary

- **AppNav**: Replace `localePath('/login')` with
`createLoginRedirectPath()` + `target="_self"` on the Get Started button
— bypasses VitePress SPA router interception so the browser navigates to
the server-side `/login` route with proper `redirect_to` params
- **AppFooter**: Replace placeholder `href="#"` on Terms / Privacy /
Risk Disclosure links with real Longbridge URLs, using locale-aware
`sgBaseUrl`

## Test plan

- [ ] Click "Get Started" in navbar → should navigate to login page (not
VitePress 404)
- [ ] After login, should redirect back to the originating page
- [ ] Footer legal links open correct Longbridge support pages in new
tab
- [ ] Locale switching (zh-CN / zh-HK) uses correct sgBaseUrl prefix for
footer links

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 21:43:58 +08:00
Jason Lee 6369059aa4 Fix dashboard path. 2026-05-20 21:26:06 +08:00
Jason Lee 14779cce28 feat(design): unify nav, redesign homepage/pricing/skill pages (#1011)
## Summary

- Remove 1127 lines of dead CSS from `app-styles.css` — SKILL PAGE and
PRICING PAGE sections were fully overridden by scoped styles in
`Skill.vue` / `Pricing.vue`
- Delete 7 unused `HomePage/` components and `DashboardNavLink.vue` /
`vp-code.css` (no active references)
- Remove View Transition circle animation on light/dark mode toggle
- Center pricing matrix check icons (`display: block; margin: 0 auto`)
- Reduce dark mode card background contrast: `--lb-card` `#13182A` →
`#0E1222` (closer to page bg `#0A0E19`), strengthen card border to
compensate

## Test plan

- [ ] Home page — product cards visible, dark mode cards harmonize with
background
- [ ] Pricing page — matrix check icons centered, billing cycle toggle
works
- [ ] Skill page — styles unchanged (scoped styles still apply
correctly)
- [ ] Light/dark toggle — instant switch, no circle animation
- [ ] No build errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 21:13:15 +08:00
Hogan 6109102994 docs(fundamental): add business-segments, institution-rating-views, industry-rank, industry-peers, financial-report-snapshot (#999)
## Summary

Adds documentation for 6 new fundamental SDK APIs ported from
[longbridge-terminal PR
#202](https://github.com/longbridge/longbridge-terminal/pull/202).

**18 files created** across `zh-CN`, `zh-HK`, and `en`:

| API | SDK Method | Endpoint |
|-----|-----------|----------|
| Business Segments | `business_segments` | `GET
/v1/quote/fundamentals/business-segments` |
| Business Segments History | `business_segments_history` | `GET
/v1/quote/fundamentals/business-segments/history` |
| Institutional Rating Views | `institution_rating_views` | `GET
/v1/quote/ratings/institutional` |
| Industry Ranking | `industry_rank` | `GET /v1/quote/industry/rank` |
| Industry Peer Hierarchy | `industry_peers` | `GET
/v1/quote/industries/peers` |
| Financial Report Snapshot | `financial_report_snapshot` | `GET
/v1/quote/financials/earnings-snapshot` |

## Related PRs

- SDK (Rust): https://github.com/longbridge/openapi/pull/526
- SDK (Go): https://github.com/longbridge/openapi-go/pull/91

## Test plan

- [ ] Preview renders correctly for all 3 locales
- [ ] `<SDKLinks>` components resolve to correct methods
- [ ] `<CliCommand>` blocks display expected CLI invocations
- [ ] Response JSON examples and schema tables are accurate

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-05-20 16:21:26 +08:00
Jason Lee bb7ecc63d7 cli: Clarify US/HK short selling setup and note HK IRD fee (#1008)
## Summary

- Clarifies that US stocks can be shorted directly with no additional
setup
- Clarifies that HK short selling requires activation via the mobile
app: place first HK short sell order → triggers SBL agreement signing →
wait for approval
- Notes that HK short selling is subject to a fee levied by the Hong
Kong Inland Revenue Department, with details in the in-app agreement
- Documents API error `602301` returned before the HK SBL agreement is
signed
- Updates `docs/{en,zh-CN,zh-HK}/docs/cli/orders/order.md` and
`skills/longbridge/references/cli/overview.md`

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 16:34:51 +08:00
Jason Lee 2b0d6b1543 cli: Document short selling activation flow for order sell (#1007)
## Summary

- Adds short selling documentation to
`docs/{en,zh-CN,zh-HK}/docs/cli/orders/order.md` and
`skills/longbridge/references/cli/overview.md`
- Documents that US and HK markets must each be activated separately via
the mobile app before short selling is available via CLI/API/MCP
- Activation flow: place first short sell order in the mobile app →
triggers SBL agreement signing → wait for review approval
- Notes API error `602301` returned before the SBL agreement is signed
- Notes A-share (SH/SZ) short selling is not supported

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 16:04:56 +08:00
Jason Lee 68443a212b feat(nav): update FeaturesMenu links to point to feature docs instead of CLI (#1006)
## Summary

- Updated all 9 feature links in `FeaturesMenu.vue` (en/zh-CN/zh-HK) to
point to the corresponding feature documentation pages instead of CLI
command pages
- Fixed `option-quote.md` title from generic "Quotes" to "Option Quotes"
(三语言同步)

## Link mapping

| Feature | Old (CLI) | New (Docs) |
|---------|-----------|------------|
| Live Market Quotes | `/docs/cli/market-data/quote` |
`/docs/quote/pull/quote` |
| Price History | `/docs/cli/market-data/kline` |
`/docs/quote/pull/history-candlestick` |
| Financial Statements | `/docs/cli/fundamentals/financial-report` |
`/docs/fundamental/fundamental/financial-report` |
| Analyst Estimates | `/docs/cli/fundamentals/consensus` |
`/docs/fundamental/fundamental/consensus` |
| Company News | `/docs/cli/content/news` | `/docs/content/news/news` |
| SEC Filings | `/docs/cli/content/filing` | `/docs/quote/pull/filings`
|
| Institutional | `/docs/cli/research/investors` |
`/docs/fundamental/fundamental/fund-holdings` |
| Options & Warrants | `/docs/cli/derivatives/option` |
`/docs/quote/pull/option-quote` |
| Order Execution | `/docs/cli/orders/order` |
`/docs/trade/trade-overview` |

## Test plan

- [ ] 点击导航栏 Features 下拉菜单中的每个功能链接,确认跳转到对应文档页面
- [ ] 验证三语言版本链接均正确

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 14:43:25 +08:00
Jason Lee 6624dd25c5 docs(quote): clarify SG market real-time quote availability (#1005)
## Summary

Ref #1003

- Replace the SG market code entry with a blockquote note explaining
that Singapore real-time quotes are currently unavailable via Longbridge
Developers (API / CLI / MCP)
- Direct users to the Longbridge client (app or desktop) for SG market
quotes
- Remove SG from the Basic quote permission level description in all
three language versions (en / zh-CN / zh-HK)

## Test plan

- [ ] Verify the note renders correctly as a blockquote in all three
locale pages
- [ ] Confirm the quote permission table looks correct without SG in the
Basic row

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 14:21:19 +08:00
Jason Lee 0f90b0efbe docs(qa): update paper account to support US options trading (#1002)
## Summary

- 模拟账户现已支持美股期权交易,更新 QA 文档中的品种说明
- 从「不支持」列表移除期权,加入支持品种列表
- 三语言同步更新(en / zh-CN / zh-HK)

## Files Changed

- `docs/en/docs/qa/general.md` — Q4 trading section
- `docs/en/docs/qa/trade.md` — Q4 trading rules
- `docs/zh-CN/docs/qa/general.md`
- `docs/zh-CN/docs/qa/trade.md`
- `docs/zh-HK/docs/qa/general.md`
- `docs/zh-HK/docs/qa/trade.md`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 14:27:45 +08:00
Jason Lee fb32a9f35b refactor(docs): reorganize quote/trade/market sidebar structure (#1001)
## Summary

- **Quote restructure**: Split flat `pull/` (25 items) into semantic
groups — `stocks/`, `options/`, `warrants/`, `analytics/`
- **Subscribe**: Merged `push/` into `subscribe/` (renamed to
"Subscribe"); added Overview page explaining WebSocket subscription
model and pull API reference links
- **Market**: Extracted `quote/market/` to standalone top-level
`market/` section (position 3.2) to accommodate future additions like
rankings, screeners, IPO
- **Trade ordering**: Fixed `execution/` (History→Today) and `order/`
(Submit→Today→History→Details→Replace→Cancel→Estimate) sidebar ordering
- **Titles**: Optimized all Quote section titles with proper securities
industry terminology; renamed "Withdraw Order" → "Cancel Order"; "Update
Watchlist Group" → "Manage Group Securities"
- **Watchlist**: Renamed group label and sorted items; `update_group`
title now reflects its actual function (add/remove securities in group)
- **Appendix**: Moved `security_list` to socket appendix as "Overnight
Eligible Securities" with accurate description

## Test plan

- [ ] Build and verify sidebar structure renders correctly
- [ ] Verify existing URLs still resolve (absolute slugs preserved for
moved files)
- [ ] Verify new `/market/*` URLs work
- [ ] Check Subscribe Overview links resolve correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 19:15:58 +08:00