Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
10e2ac6
docs(cli): add etf-docs command (US only)
hogan-yuan Jul 7, 2026
3691e93
docs(cli): update order command with US flags (--status, --action, --…
hogan-yuan Jul 7, 2026
db9a68e
docs(cli): add US routing and key-metrics subcommand to financial-report
hogan-yuan Jul 7, 2026
496686f
docs(cli): add realized subcommand to profit-analysis (US only)
hogan-yuan Jul 7, 2026
77f21f3
docs(cli): add US account routing notes to company/valuation/consensu…
hogan-yuan Jul 7, 2026
702b1a7
docs(fundamental): add US market SDK docs EN (9 FundamentalContext me…
hogan-yuan Jul 7, 2026
dd53542
docs: add CLI v0.25.0 + SDK v4.4.0 changelog and release-notes entries
hogan-yuan Jul 7, 2026
b9b86ff
docs(fundamental): add US market SDK docs zh-CN + zh-HK (9 Fundamenta…
hogan-yuan Jul 7, 2026
cd9831e
docs(trade/quote): add US market SDK docs (4 TradeContext + 1 QuoteCo…
hogan-yuan Jul 7, 2026
17558bf
fix(docs): rename parameter counter_id → symbol in all US SDK docs
hogan-yuan Jul 7, 2026
432b4c7
fix(docs): fix slug format, localize YES/NO in zh-CN/zh-HK, add missi…
hogan-yuan Jul 7, 2026
9e9e379
chore: remove stray embedded repo directories
hogan-yuan Jul 7, 2026
e6ca248
fix(docs): correct us_query_orders method name, fix action param, rem…
hogan-yuan Jul 7, 2026
5989436
docs: add AP-only (HK/SG) warning to operating, brokers, broker-holdi…
hogan-yuan Jul 7, 2026
630d6d7
docs: clarify AP-only warning — account restriction, not symbol restr…
hogan-yuan Jul 7, 2026
3b4b91c
chore: remove stray embedded repo directories
hogan-yuan Jul 7, 2026
85983a8
docs: rename 'US Only' warning → 'US Data-Center Accounts Only' for c…
hogan-yuan Jul 7, 2026
c60a8b3
chore: remove stray embedded repo directories
hogan-yuan Jul 7, 2026
71baed9
docs: use 'Longbridge US Accounts / Longbridge US 账户' as warning title
hogan-yuan Jul 7, 2026
68fcf76
chore: remove stray embedded repo directories
hogan-yuan Jul 7, 2026
cbf776f
chore: ignore stray submodule directories
hogan-yuan Jul 7, 2026
ea41509
docs(trade): add Response sections to US Trade SDK docs (EN)
hogan-yuan Jul 7, 2026
df4fb09
docs(fundamental): add Response sections to US SDK docs (EN)
hogan-yuan Jul 7, 2026
43865a8
docs(trade): add CliCommand block to us_order_detail SDK doc (3 langs)
hogan-yuan Jul 7, 2026
5a0bdce
docs: add CliCommand blocks to all 14 US SDK docs (3 langs)
hogan-yuan Jul 7, 2026
aae5077
docs: add Python async/Node.js/Java/Rust tabs to all US SDK docs (42 …
hogan-yuan Jul 7, 2026
51cfaa3
docs: add Response sections to zh-CN + zh-HK US SDK docs (26 files)
hogan-yuan Jul 7, 2026
5af89fd
fix(autocorrect): replace mixed-language response descriptions with p…
hogan-yuan Jul 7, 2026
3c121c0
fix(docs): correct Node.js and Java parameter syntax in US SDK docs (…
hogan-yuan Jul 7, 2026
9fde337
docs: complete Response sections for 8 US SDK docs with nested type d…
hogan-yuan Jul 7, 2026
96d2942
docs(fundamental): add complete Response sections to US SDK docs EN (…
hogan-yuan Jul 7, 2026
8890309
docs(trade/quote): add complete Response sections to US SDK docs EN (…
hogan-yuan Jul 7, 2026
23c1dd3
docs: port complete Response sections to zh-CN + zh-HK (28 files) wit…
hogan-yuan Jul 7, 2026
79b938a
fix(docs): distinguish AP-only warning title from US-only — 'Longbrid…
hogan-yuan Jul 7, 2026
f8ddb93
docs: add AP-only warning to DCA SDK docs and broker subscribe doc (3…
hogan-yuan Jul 7, 2026
1fb9f01
docs: add AP-only warning to remaining DCA SDK docs (calc_date, check…
hogan-yuan Jul 7, 2026
4cf2a96
fix(docs): standardize zh-HK US warning title + fix Rust positional a…
hogan-yuan Jul 7, 2026
305685e
fix(docs): localize zh-CN/zh-HK Response headings, Schemas descriptio…
hogan-yuan Jul 7, 2026
e0850eb
fix(docs): align US SDK docs with existing doc structure — Parameters…
hogan-yuan Jul 7, 2026
3799080
fix(docs): revert zh-CN/zh-HK section headings to English (Parameters…
hogan-yuan Jul 7, 2026
65c8c50
fix(docs): complete Go example in us_query_orders.md with full packag…
hogan-yuan Jul 7, 2026
a421858
fix(docs): complete Go examples with package/imports/main in all US S…
hogan-yuan Jul 7, 2026
5ae3cf2
fix(docs): add missing USStockEntry schema to us_asset_overview (3 la…
hogan-yuan Jul 7, 2026
c3bb850
docs: add typed Response + Schemas for us_financial_overview/key_fina…
hogan-yuan Jul 8, 2026
0b2b2ce
fix(docs): add missing Parameters caption to us_asset_overview.md (3 …
hogan-yuan Jul 8, 2026
d55d7f3
fix(docs): add missing Parameters caption to zh-CN/zh-HK us_asset_ove…
hogan-yuan Jul 8, 2026
218d746
fix(docs): rename us_financial_statement_v3 → us_financial_statement …
hogan-yuan Jul 9, 2026
4a3a6a1
fix(docs): correct financial-statement CLI routing — separate command…
hogan-yuan Jul 9, 2026
ec5dd24
fix(docs): remove non-existent --status flag from order command (CLI …
hogan-yuan Jul 9, 2026
9df13b3
fix(docs): update macrodata indicator code 62267 → 61744 (matches CLI…
hogan-yuan Jul 9, 2026
82388fc
fix(docs): correct Response/Schema for 7 US SDK docs based on PR #555…
hogan-yuan Jul 9, 2026
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@ docs/superpowers
# generated at build time by fetch-mcp-tools plugin
docs/.vitepress/data/mcp-tools.json
docs/.vitepress/.temp/

# Stray submodule directories
longbridge-terminal/
openapi/
openapi-go/
4 changes: 4 additions & 0 deletions docs/en/docs/account/dca/calc_date.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ highlight_theme: ''
headingLevel: 2
---

:::warning Not for Longbridge US Accounts
This method requires an AP data-center account (HK / Singapore). US data-center accounts will receive a region restriction error. AP accounts can call this method with any supported symbol, including US stocks.
:::

Calculate the next projected trade date for given DCA plan parameters.

<CliCommand>
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/account/dca/check_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ highlight_theme: ''
headingLevel: 2
---

:::warning Not for Longbridge US Accounts
This method requires an AP data-center account (HK / Singapore). US data-center accounts will receive a region restriction error. AP accounts can call this method with any supported symbol, including US stocks.
:::

Check whether the given securities support DCA recurring investment.

<CliCommand>
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/account/dca/create_dca.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ highlight_theme: ''
headingLevel: 2
---

:::warning Not for Longbridge US Accounts
This method requires an AP data-center account (HK / Singapore). US data-center accounts will receive a region restriction error. AP accounts can call this method with any supported symbol, including US stocks.
:::

Create a new recurring investment plan for a security.

<CliCommand>
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/account/dca/dca_history.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ highlight_theme: ''
headingLevel: 2
---

:::warning Not for Longbridge US Accounts
This method requires an AP data-center account (HK / Singapore). US data-center accounts will receive a region restriction error. AP accounts can call this method with any supported symbol, including US stocks.
:::

Get the execution history for a specific DCA plan including trade dates, amounts, and prices.

<CliCommand>
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/account/dca/dca_stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ highlight_theme: ''
headingLevel: 2
---

:::warning Not for Longbridge US Accounts
This method requires an AP data-center account (HK / Singapore). US data-center accounts will receive a region restriction error. AP accounts can call this method with any supported symbol, including US stocks.
:::

Get DCA statistics summary including total invested amount and profit/loss.

<CliCommand>
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/account/dca/list_dca.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ highlight_theme: ''
headingLevel: 2
---

:::warning Not for Longbridge US Accounts
This method requires an AP data-center account (HK / Singapore). US data-center accounts will receive a region restriction error. AP accounts can call this method with any supported symbol, including US stocks.
:::

Get all recurring investment (DCA) plans for the current user.

<CliCommand>
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/account/dca/pause_dca.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ highlight_theme: ''
headingLevel: 2
---

:::warning Not for Longbridge US Accounts
This method requires an AP data-center account (HK / Singapore). US data-center accounts will receive a region restriction error. AP accounts can call this method with any supported symbol, including US stocks.
:::

Temporarily pause a DCA plan. The plan can be resumed later.

<CliCommand>
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/account/dca/resume_dca.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ highlight_theme: ''
headingLevel: 2
---

:::warning Not for Longbridge US Accounts
This method requires an AP data-center account (HK / Singapore). US data-center accounts will receive a region restriction error. AP accounts can call this method with any supported symbol, including US stocks.
:::

Resume a previously paused DCA plan.

<CliCommand>
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/account/dca/set_reminder.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ highlight_theme: ''
headingLevel: 2
---

:::warning Not for Longbridge US Accounts
This method requires an AP data-center account (HK / Singapore). US data-center accounts will receive a region restriction error. AP accounts can call this method with any supported symbol, including US stocks.
:::

Set the advance reminder time for DCA plans. Supported values: `1`, `6`, or `12` hours.

<CliCommand>
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/account/dca/stop_dca.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ highlight_theme: ''
headingLevel: 2
---

:::warning Not for Longbridge US Accounts
This method requires an AP data-center account (HK / Singapore). US data-center accounts will receive a region restriction error. AP accounts can call this method with any supported symbol, including US stocks.
:::

Permanently stop a DCA plan. This action cannot be undone.

<CliCommand>
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/account/dca/update_dca.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ highlight_theme: ''
headingLevel: 2
---

:::warning Not for Longbridge US Accounts
This method requires an AP data-center account (HK / Singapore). US data-center accounts will receive a region restriction error. AP accounts can call this method with any supported symbol, including US stocks.
:::

Pause or resume an existing recurring investment plan.

<CliCommand>
Expand Down
15 changes: 15 additions & 0 deletions docs/en/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ sidebar_position: 7
sidebar_icon: newspaper
---

## 2026-07-07

### SDK v4.4.0

- **US market APIs** — 14 new methods across `FundamentalContext` (9), `QuoteContext` (1), `TradeContext` (4); all US data-center only

### CLI v0.25.0

- **US market routing** — `company`, `valuation`, `financial-report`, `consensus`, `dividend`, `order`, `positions` now route to US APIs automatically for US data-center accounts
- **New `etf-docs` command** — list regulatory documents (prospectus, fact sheets) for US ETFs
- **New `financial-report key-metrics` subcommand** — key financial metrics for US stocks (annual/quarterly)
- **New `profit-analysis realized` subcommand** — realized P&L breakdown by asset category for US accounts (stock/option/crypto)
- **New `order --status` / `--action` flags** — filter US order history by status and side
- **New `order detail --attached` flag** — show attached child order for US accounts

## 2026-06-25

### SDK v4.3.3
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/cli/account/dca.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ sidebar_label: 'dca'
sidebar_position: 10
---

:::warning Not for Longbridge US Accounts
This command requires an AP data-center account (HK / Singapore). US data-center accounts are not supported. AP accounts can use this command with any supported symbol, including US stocks.
:::

# longbridge dca

Recurring investment — automatically invest a fixed amount at regular intervals. Create and manage plans that execute stock purchases on a daily, weekly, fortnightly, or monthly schedule. Track trade history, monitor cumulative profit, and check upcoming trade dates.
Expand Down
21 changes: 21 additions & 0 deletions docs/en/docs/cli/account/profit-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,24 @@ Shows stock P&L filtered by market with pagination support.
## Requirements

OAuth account permission required. See the [account permission setup](/docs/trade/) guide.

## Subcommands

### `realized` — Realized P&L (US accounts)

```bash
longbridge profit-analysis realized
longbridge profit-analysis realized --category stock
longbridge profit-analysis realized --category option --currency USD
```

Returns realized profit and loss breakdown by asset category for US accounts.

:::warning Longbridge US Accounts
`profit-analysis realized` is only available for US data-center accounts.
:::

| Option | Description | Default |
| ------ | ----------- | ------- |
| `--category` | Asset category: `all` \| `stock` \| `option` \| `crypto` | all |
| `--currency` | Settlement currency | USD |
4 changes: 4 additions & 0 deletions docs/en/docs/cli/fundamentals/company.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ Shows key company information including founding date, number of employees, IPO
```bash
longbridge company TSLA.US --format json
```

:::info US Accounts
For `.US` symbols on US data-center accounts, `company` routes to the US company overview API automatically.
:::
4 changes: 4 additions & 0 deletions docs/en/docs/cli/fundamentals/consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ longbridge consensus TSLA.US --format json
```

Each `details` entry includes the metric key, the consensus estimate value, and whether the actual result has already been released. `current_index` in the full response indicates which period in the list is the current one.

:::info US Accounts
For `.US` symbols on US data-center accounts, `consensus` routes to the US analyst consensus API automatically.
:::
4 changes: 4 additions & 0 deletions docs/en/docs/cli/fundamentals/dividend.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,7 @@ longbridge dividend AAPL.US --format json
```

Returns structured JSON with `ex_date`, `payment_date`, `record_date`, and a `desc` field containing the dividend amount description (e.g., `"Dividend: USD 0.26/share"`) — suitable for piping into scripts or tracking tools.

:::info US Accounts
For US data-center accounts: `.US` ETF symbols route to the US ETF dividend API; `.US` stock symbols route to the US company dividends API.
:::
49 changes: 49 additions & 0 deletions docs/en/docs/cli/fundamentals/etf-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: 'etf-docs'
sidebar_label: 'etf-docs'
sidebar_position: 21
---

# longbridge etf-docs

List regulatory documents for a US ETF — prospectus, fact sheets, and other filings.

:::warning Longbridge US Accounts
This command is only available for US data-center accounts.
:::

## Basic Usage

```bash
longbridge etf-docs IVV.US
```

```
Name
----
iShares Core S&P 500 ETF Prospectus
iShares Core S&P 500 ETF Statement of Additional Information
iShares Core S&P 500 ETF Annual Report
...
```

## Examples

### List ETF documents

<CliCommand>
longbridge etf-docs IVV.US
longbridge etf-docs SPY.US
</CliCommand>

### Limit number of results

```bash
longbridge etf-docs IVV.US --limit 5
```

## Options

| Option | Description | Default |
| ------ | ----------- | ------- |
| `--limit` | Maximum number of documents to return | 10 |
23 changes: 23 additions & 0 deletions docs/en/docs/cli/fundamentals/financial-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,26 @@ longbridge financial-report snapshot TSLA.US --report qf --year 2025 --period 4
```

Use `--report qf --year <YEAR> --period <1-4>` to retrieve a specific quarter.

### Key financial metrics (US accounts)

```bash
longbridge financial-report key-metrics AAPL.US
longbridge financial-report key-metrics AAPL.US --report quarterly
```

Returns key financial indicators for US stocks: revenue, net income, EPS, margins, and growth rates.

:::warning Longbridge US Accounts
`financial-report key-metrics` is only available for US data-center accounts.
:::

| Option | Description | Default |
| ------ | ----------- | ------- |
| `--report` | Reporting period: `annual` \| `quarterly` | annual |

:::info US Accounts
For `.US` symbols on US data-center accounts, omitting `--kind` returns a financial overview via the US API.

To get detailed income statement / balance sheet / cash flow for US stocks, use the [`financial-statement`](/docs/cli/fundamentals/financial-statement) command instead.
:::
4 changes: 4 additions & 0 deletions docs/en/docs/cli/fundamentals/financial-statement.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ sidebar_position: 3

Fetch a fully detailed, line-item financial statement — income statement, balance sheet, or cash flow — for any public company.


:::info US Accounts
For `.US` symbols on US data-center accounts, `financial-statement` calls `us_financial_statement()` — the US-specific detailed statement API.
:::
## Basic Usage

```bash
Expand Down
12 changes: 6 additions & 6 deletions docs/en/docs/cli/fundamentals/macrodata.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ longbridge macrodata
```
Total: 619
Code Name Category Country Frequency Source
62267 Non-Farm Payroll Employment US Monthly Bureau of Labor Statistics
61744 Non-Farm Payroll Employment US Monthly Bureau of Labor Statistics
...
```

Expand Down Expand Up @@ -56,7 +56,7 @@ longbridge macrodata --country US --limit 50 --page 2
### Historical releases for a specific indicator

```bash
longbridge macrodata 62267
longbridge macrodata 61744
```

```
Expand All @@ -71,7 +71,7 @@ Period Actual Forecast Previous Revised Unit
### Filter history by date range

```bash
longbridge macrodata 62267 --start 2024-01-01 --end 2024-12-31
longbridge macrodata 61744 --start 2024-01-01 --end 2024-12-31
```

### JSON output for AI / scripting
Expand All @@ -81,7 +81,7 @@ longbridge macrodata 62267 --start 2024-01-01 --end 2024-12-31
longbridge macrodata --format json

# History as JSON
longbridge macrodata 62267 --format json
longbridge macrodata 61744 --format json
```

**List JSON structure:**
Expand All @@ -94,7 +94,7 @@ longbridge macrodata 62267 --format json
"has_more": true,
"list": [
{
"indicator_code": "62267",
"indicator_code": "61744",
"country": "US",
"name": "Non-Farm Payroll",
"periodicity": "Monthly",
Expand All @@ -113,7 +113,7 @@ longbridge macrodata 62267 --format json
"limit": 20,
"has_more": true,
"info": {
"indicator_code": "62267",
"indicator_code": "61744",
"country": "US",
"name": "Non-Farm Payroll",
"periodicity": "Monthly",
Expand Down
4 changes: 4 additions & 0 deletions docs/en/docs/cli/fundamentals/valuation.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ longbridge valuation TSLA.US --history --indicator pb --format json
```

The `desc` field provides a human-readable summary of how the current valuation compares to historical range and industry peers. The `list` array contains the time series data points.

:::info US Accounts
For `.US` symbols on US data-center accounts, `valuation` routes to the US valuation overview API automatically.
:::
4 changes: 4 additions & 0 deletions docs/en/docs/cli/market-data/broker-holding.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ sidebar_label: 'broker-holding'
sidebar_position: 15
---

:::warning Not for Longbridge US Accounts
This command requires an AP data-center account (HK / Singapore). US data-center accounts are not supported. AP accounts can use this command with any supported symbol, including US stocks.
:::

# longbridge broker-holding

View broker holding positions for HK-listed stocks — top buyers/sellers, full detail list, and daily history per broker.
Expand Down
Loading
Loading