Commit Graph

16 Commits

Author SHA1 Message Date
Jason Lee 1a637e7d0b docs: Align the signals reference with the RPC contract
Checked the reference against the `QuerySignals` / `Signal` RPC definitions
and against production responses:

- `status` documents its lifecycle values (0 pending … 5 analysis submit
  failed) instead of being left unexplained.
- `total` is `int32`, matching `QuerySignalsResponse`.
- `risk_level` and `display_control` are dropped from the field tables and
  examples — neither is in the `Signal` message, and production returns
  neither.
- `catalyst_name` says what it matches: the triggering factor's name
  (`EARNINGS_RELEASED`, `macd_12_26_9`), not the prose `key_catalyst` a signal
  displays. Filtering by the value shown in `key_catalyst` returns nothing, so
  both fields now spell out which is which.
- `start_time` / `end_time` also accept a Unix timestamp (≥ 10¹² read as
  milliseconds), per the field definitions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 20:19:31 +08:00
Jason Lee 174add6380 docs: Document the security-facts response from live data
`GET /v1/facts/security_facts` served an empty `facts` array when the
reference was written, so the item shape was described as "type-specific" and
the example was an empty envelope. The endpoint now serves data, so both are
replaced with the real thing:

- Full field table: fact id / type / direction / occurrence time, the
  securities it is about, the factors behind it (groups, direction, trigger
  condition, anomaly test), the data sources, and `nl_info`.
- `direction` takes `long`, `short` or `neutral`; `fact_type` takes `News`,
  `Fundamental` or `Technical`.
- `nl_info.summary`, `invest_anal` and `eli_explain` each carry a JSON array
  of `{tag, value}` inside a string — called out so readers parse it.

Also drops the `ticker.region` phrasing from the two pre-existing grid
endpoints, matching the wording used everywhere else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 20:01:23 +08:00
Jason Lee 78a6916267 docs: Add the Signals & Catalysts API reference
Documents the three signal endpoints across `openapi.yaml` and the
en / zh-CN / zh-HK reference pages:

- `GET /v1/signals` — query signals with symbol / strategy / catalyst /
  time-range filters and limit/offset paging
- `GET /v1/signals/{signal_id}` — one signal, with the full strategy analysis
  in `json_data`
- `GET /v1/facts/security_facts` — a security's fact (catalyst) events

Field tables come from the live response: `symbol` (not `counter_id`),
millisecond `created_at` / `updated_at`, and the five `outlook` values.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 19:12:07 +08:00
Hogan 8e4eb3dd85 docs: add grid trading documentation (CLI, API, SDK, MCP) (#1204)
## Summary

Complete grid trading documentation for the Longbridge Developers site —
the new grid strategy orders documented across CLI, HTTP API, SDKs, and
MCP, in English / Simplified Chinese / Traditional Chinese.

## What's included

- **Grid Trading API reference** (`docs/trade/grid/`) — an overview page
plus 11 endpoint pages: submit, replace, list, list-by-IDs, detail,
trigger history, cancel, suspend, restart, questionnaire, and symbol
info. Each endpoint page carries a `<CliCommand>` example, Python /
Node.js / Java / Rust / C++ SDK tabs, request/response tables, and a `##
Schemas` section — matching the existing `trade/order` pages.
- **CLI usage page** (`cli/orders/grid.md`) — the `longbridge grid`
command group under "Orders & Trading".
- **WebSocket push** — the `GridOrderChanged` (`gridtrading_order`)
event documented in `trade-push.md`.
- **FAQ** — `qa/trade.md` updated: grid orders are now supported.
- **Changelog & CLI release notes** — a 2026-08-14 changelog entry (SDK
v4.5.0 / CLI v0.27.0 / MCP: 11 grid tools) and a CLI v0.27.0 release
note.
- **`openapi.yaml`** — the `/v1/gridtrading/*`,
`/v1/record/questionnaire`, and `/v1/orders/info` paths plus the
`GridTradeRule` schema, under a new `Grid Trading` tag.
- **`SDKLinks` component** — now supports the `grid` module and a
`hideGo` flag (the Go SDK has no grid bindings yet).

All pages are mirrored across `en` / `zh-CN` / `zh-HK`.

## Notes

- Field names, enums, and HTTP paths come from the source PRs
(longbridge/openapi#563, longbridge/longbridge-terminal#281).
- The v0.27.0 / v4.5.0 release tags go live with the 2026-08-14 release;
the release-note links resolve then.
- CI (Build Test + autocorrect) is green.

Refs: longbridge/openapi#563, longbridge/longbridge-terminal#281

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2026-08-21 13:42:14 +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
Endless a2a11361f0 fix: correct API reference example URLs in openapi.yaml (#963)
## Summary

Fixes incorrect API endpoint URLs in the API Reference documentation
examples.

## Problem

Many API Reference examples were using incorrect URLs with the wrong
domain, e.g.:

```
curl --request GET \
  --url 'https://openapi.longbridge.com/watchlist/
```

## Changes

- Updated 21 incorrect API endpoint URLs in `openapi.yaml` to use the
correct domain/base URL
- Ensures all curl examples in the API Reference reflect the accurate
endpoint addresses

## Files Changed

- `openapi.yaml`: 21 URL corrections (42 lines changed)

🤖 Auto-generated by Endless.

Co-authored-by: 老袁 Yuan Zhanghong <zhanghong.yuan@longbridge-inc.com>
2026-05-08 17:37:56 +08:00
Endless 8becc115ca feat(quote-permission): add quote permission notices to CLI docs, API docs, and API Reference (#939)
🤖 Auto-generated by Endless.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2026-05-05 18:37:25 +08:00
老袁 bd01784432 fix(docs): correct broken /socket/* and /mcp links (#924)
## Summary

- "Socket Feed" / "相关文档" links in the REST API overview no longer 404 —
paths corrected to `/docs/socket/xxx`
- Restored the inline "see the Socket Feed documentation" reference in
the Real-Time Market Data note
- FAQ's "Longbridge MCP service" link now works (`/mcp` → `/docs/mcp`)
- Readers on zh-CN / zh-HK sites stay in their own locale when clicking
into `/docs/*` targets inside OpenAPI content

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 14:38:21 +08:00
Jason Lee 7d0022c8d9 docs: Fix CLI pages in cn region. (#883)
## Summary

- Rename `installation.md` → `install.md` in all three locales (en,
zh-CN, zh-HK)
- Update all internal links pointing to `/docs/cli/installation`
- Update sidebar `includes('installation')` matcher
- Add `/docs/cli/index.md` and `/docs/cli/install.md` to cn region
whitelist (`open.longbridge.cn`)

## Test plan

- [ ] Verify `/docs/cli/install` loads correctly
- [ ] Verify `/zh-CN/docs/cli/install` and `/zh-HK/docs/cli/install`
load correctly
- [ ] Verify sidebar Installation link works in all locales
- [ ] Verify `bun run dev:cn` shows `/docs/cli` and `/docs/cli/install`

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 15:52:46 +08:00
Cooooooker 56be71dfc8 docs: Add is_pinned field to watchlist and limit hashtags to 1 (#413)
- Add `is_pinned` boolean field to watchlist groups API response
- Update create_topic hashtags maximum from 5 to 1

Co-authored-by: chengzhipeng <zhipeng.cheng@longbridge-inc.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 18:45:49 +08:00
Jason Lee cf021667ff cli: Refactor domain-grouped command names (#397)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 11:32:36 +08:00
geomantic_omen 137ffc9329 docs: Add statement API documentation. (#393)
feat(statement): add account statement CLI commands and API
documentation

- Add statement list and export CLI command examples to docs (en, zh-CN,
zh-HK)
- Document daily and monthly statement listing with filtering options
- Document statement export with section selection and output format
options (Markdown, CSV)
- Add Statement tag and endpoints to OpenAPI spec (/v1/statement/list,
/v1/statement/download)
- Add statement reference documentation to CLI skill guide
- Create comprehensive statement.md reference guide for CLI usage and
examples

---------

Co-authored-by: geomantic <lei.zhong@longbridge-inc.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 14:59:03 +08:00
Jason Lee 36734e7e02 feat: add topic detail, replies, and create reply APIs with docs (#389)
## Summary

- **openapi.yaml**: add 3 new endpoints (`GET /content/topics/{id}`,
`GET /POST /content/topics/{topic_id}/comments`) with rich Markdown
descriptions, rate-limit tables, and tickers abuse warnings; rename
`list_topic_comments` → `list_topic_replies` and `create_topic_comment`
→ `create_topic_reply` throughout
- **docs (en / zh-CN / zh-HK)**: new pages for `topic_detail`,
`topic_replies`, `create_reply`; update `create_topic` schema to full
`OwnedTopic` response; sync permission copy, rate-limit wording, and
`TipContainer` highlights across all locales
- **ApiReference.vue**: minor formatting cleanup

## Test plan

- [ ] Run `bun run dev` and verify the 3 new pages render correctly in
all 3 locales
- [ ] Confirm `create_topic` response schema now shows the full
OwnedTopic fields
- [ ] Confirm TipContainer warning appears on create_topic and
create_reply pages
- [ ] Verify API reference page shows the renamed operationIds

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 20:14:49 +08:00
Jason Lee b74f40145c docs: add Community content API docs (my-topics, create-topic) (#384)
## Summary

- Add `my_topics` and `create_topic` API reference pages in all 3
locales (en/zh-CN/zh-HK), using `<SDKLinks>` + `<Tabs>` pattern with
CLI, Python, Python async, Node.js, Java, Rust, C++, Go examples
- Rename Content sidebar category → **Community** across all locales
- Rename `security_topics` page title → "Get Community Topics by Symbol"
- Add Community content section to `cli.md` (all locales)
- Update `openapi.yaml`: add `x-codeSamples` for `list_my_topics` and
`create_topic`, fix `create_topic` schema (`title` not required at
schema level), move all community endpoints to `Community` tag
- Update CLI skill overview with `longbridge update` command details

## Key design notes

- `create_topic` page includes an article/post comparison table
explaining title requirement and body format differences
- SDK method signatures verified from source code
(`/Users/jason/work/openapi/`)

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:52 +08:00
Jason Lee 9476486b64 feat: integrate API appendix into API Reference, remove redundant docs (#383)
## Summary

- 将 HTTP API 认证/错误码文档通过 `x-pages` 扩展嵌入 `openapi.yaml`,在 `/docs/api/`
侧边栏展示为独立信息页
- 更新 `ApiReference.vue`:解析 `x-pages`、侧边栏展示、URL 状态管理、中英文切换
- 将 Socket 文档从 `api-reference/socket/` 移至独立类目 `socket/`(三语言,URL 不变)
- 删除已合并的冗余文档(12 个文件:3 语言 × 4 文件)

## Test Plan

- [ ] 访问 `/docs/api/`,侧边栏顶部显示 Authentication 和 Error Codes
- [ ] 点击 Authentication,展示合并后的 OAuth 2.0 认证内容
- [ ] 点击 Error Codes,展示错误码表格
- [ ] URL 状态:`?page=authentication` / `?page=error-codes`
正确写入,浏览器前进/后退正常
- [ ] 中文路由 `/zh-CN/docs/api` 侧边栏显示 认证 / 错误码
- [ ] Socket 页面(如 `/socket/hosts`)仍可正常访问
- [ ] 侧边栏 API 附录 类目已消失

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 22:13:20 +08:00
Jason Lee 6a4b543645 docs: Add openapi.yaml (#382)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 21:37:42 +08:00