Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f3a1c1d
docs(fundamental): add macroeconomic-indicators SDK doc (EN)
hogan-yuan Jun 11, 2026
87d44d8
docs(fundamental): add macroeconomic SDK doc (EN)
hogan-yuan Jun 11, 2026
561a309
docs(cli): add macroeconomic command doc (EN)
hogan-yuan Jun 11, 2026
26b09f5
docs(fundamental): add macroeconomic SDK docs (zh-CN)
hogan-yuan Jun 11, 2026
6472eff
docs(fundamental): add macroeconomic SDK docs (zh-HK)
hogan-yuan Jun 11, 2026
e702db6
docs(cli): add macroeconomic command doc (zh-CN + zh-HK)
hogan-yuan Jun 11, 2026
5e3d5c3
docs: update changelog for SDK v4.3.1 + macroeconomic CLI command
hogan-yuan Jun 12, 2026
7affc09
docs(cli): add release notes for macroeconomic command
hogan-yuan Jun 12, 2026
71b01a5
docs: replace vX.Y.Z placeholder with v0.24.0
hogan-yuan Jun 12, 2026
d541007
docs: rename CLI command macroeconomic → macrodata
hogan-yuan Jun 12, 2026
1a9c673
docs: sync macrodata/macroeconomic docs with SDK/CLI/MCP PRs
hogan-yuan Jun 12, 2026
7d1e2c3
docs: update macrodata indicator count 600+ → 400+
hogan-yuan Jun 12, 2026
d9d1939
docs(cli): add --keyword flag to macrodata command (3 langs)
hogan-yuan Jun 12, 2026
c51b9b8
docs(cli): replace macroeconomic → macrodata in all CLI docs
hogan-yuan Jun 12, 2026
8ea3f5a
fix: use full-width colon in zh-CN/zh-HK SDK code examples
hogan-yuan Jun 13, 2026
d338d62
docs: add SDK v4.3.2 changelog entry (macroeconomic v2 methods)
hogan-yuan Jun 13, 2026
ac8867d
docs(fundamental): update macroeconomic - clean response example, rem…
hogan-yuan Jun 13, 2026
1509eb6
docs(fundamental): update macroeconomic-indicators - add keyword para…
hogan-yuan Jun 13, 2026
4269cab
docs(fundamental): remove unmapped v2 fields from MacroeconomicIndica…
hogan-yuan Jun 13, 2026
8234c12
docs: remove v2 references from changelog, keep only user-facing keyw…
hogan-yuan Jun 15, 2026
2661745
docs: merge SDK v4.3.1 into v4.3.2 changelog entry
hogan-yuan Jun 15, 2026
d0e3250
Merge origin/main into docs/macroeconomic
hogan-yuan Jun 26, 2026
81f878d
docs(cli): add JSON response structure to macrodata command (page/lim…
hogan-yuan Jun 26, 2026
9720229
docs: update CLI version v0.24.0 → v0.23.4 (from PR #239)
hogan-yuan Jun 26, 2026
dc6e9bc
docs: update SDK version v4.3.2 → v4.3.3
hogan-yuan Jun 26, 2026
9b9f577
docs: update changelog dates to 2026-06-15, merge SDK+CLI entries
hogan-yuan Jun 26, 2026
f98abe7
docs: fix changelog date 2026-06-15 → 2026-06-25
hogan-yuan Jun 26, 2026
d746d1a
docs: fix versions CLI v0.24.0, MCP v0.7.0
hogan-yuan Jun 26, 2026
8163a93
docs: add MCP v0.7.0 entry under 2026-06-25 changelog (EN)
hogan-yuan Jun 26, 2026
44f7ae1
docs: add MCP v0.7.0 entry under 2026-06-25 changelog (zh-CN + zh-HK)
hogan-yuan Jun 26, 2026
6a2e3d5
docs: add MCP v0.7.0 sync note under CLI v0.24.0 in changelog (3 langs)
hogan-yuan Jun 26, 2026
f63732b
docs: remove MCP version number from changelog entries
hogan-yuan Jun 26, 2026
431eff7
Merge remote-tracking branch 'origin/main' into docs/macroeconomic
hogan-yuan Jun 26, 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
16 changes: 10 additions & 6 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,16 @@ export default defineConfig(
{
name: 'fetch-mcp-tools',
async buildStart() {
const res = await fetch(MCP_TOOLS_URL)
if (!res.ok) throw new Error(`fetch mcp tools failed: HTTP ${res.status}`)
const json = await res.json()
mkdirSync(dirname(MCP_TOOLS_DATA_PATH), { recursive: true })
writeFileSync(MCP_TOOLS_DATA_PATH, JSON.stringify(json, null, 2))
console.log('✓ mcp-tools.json fetched')
try {
const res = await fetch(MCP_TOOLS_URL)
if (!res.ok) throw new Error(`fetch mcp tools failed: HTTP ${res.status}`)
const json = await res.json()
mkdirSync(dirname(MCP_TOOLS_DATA_PATH), { recursive: true })
writeFileSync(MCP_TOOLS_DATA_PATH, JSON.stringify(json, null, 2))
console.log('✓ mcp-tools.json fetched')
} catch (e) {
console.warn('⚠ mcp-tools.json fetch failed, using cached data:', (e as Error).message)
}
},
},
groupIconVitePlugin(),
Expand Down
12 changes: 12 additions & 0 deletions docs/en/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ sidebar_position: 7
sidebar_icon: newspaper
---

## 2026-06-25

### SDK v4.3.3

- **Macroeconomic indicators** — Two new `FundamentalContext` methods: `macroeconomic_indicators` lists all indicators (filter by country, keyword search), `macroeconomic` returns historical release data (actual / forecast / previous values) for a given indicator code


### CLI v0.24.0

- **New `macrodata` command** — Browse 400+ macro indicators across US/HK/CN/EU/JP/SG and query historical release data with actual, forecast, previous, and revised values; supports `--country`, `--keyword`, `--lang`, `--start`, `--end`, `--limit`, `--page`, `--format json`
- MCP server updated in sync — `macrodata_indicators` and `macrodata` tools now available to AI agents via the Longbridge MCP server

## 2026-06-16

### CLI v0.23.2
Expand Down
6 changes: 3 additions & 3 deletions docs/en/docs/cli/fundamentals/finance-calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 6

# longbridge finance-calendar

Browse upcoming financial events — earnings reports, dividend payments, stock splits, IPOs, and macroeconomic releases — filtered by symbol, watchlist, market, or event type.
Browse upcoming financial events — earnings reports, dividend payments, stock splits, IPOs, and macrodata releases — filtered by symbol, watchlist, market, or event type.

## Subcommands

Expand All @@ -16,7 +16,7 @@ Browse upcoming financial events — earnings reports, dividend payments, stock
| `dividend` | Dividend announcements |
| `split` | Stock splits and merges |
| `ipo` | IPO listings |
| `macrodata` | Macroeconomic data releases |
| `macrodata` | Macrodata releases |
| `closed` | Market closure days |

## Examples
Expand Down Expand Up @@ -59,7 +59,7 @@ Shows both split and merge events for Hong Kong-listed stocks.
longbridge finance-calendar macrodata --star 3
```

Filters macroeconomic events to only show high-importance releases (3-star). Covers data like CPI, NFP, Fed rate decisions, and similar market-moving events.
Filters macrodata events to only show high-importance releases (3-star). Covers data like CPI, NFP, Fed rate decisions, and similar market-moving events.

### IPO calendar

Expand Down
150 changes: 150 additions & 0 deletions docs/en/docs/cli/fundamentals/macrodata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
---
title: 'macrodata'
sidebar_label: 'macrodata'
sidebar_position: 20
---

# longbridge macrodata

Browse macrodata indicators and their historical release data — covering US, HK, CN, EU, JP, and SG markets.

## Modes

| Mode | Usage | Description |
| ---- | ----- | ----------- |
| List | `longbridge macrodata` | List all available indicators |
| History | `longbridge macrodata <CODE>` | Historical releases for one indicator |

## Examples

### List all indicators

```bash
longbridge macrodata
```

```
Total: 619
Code Name Category Country Frequency Source
62267 Non-Farm Payroll Employment US Monthly Bureau of Labor Statistics
...
```

### Filter by country

```bash
longbridge macrodata --country US
longbridge macrodata --country HK
longbridge macrodata --country CN
```

Supported country codes: `HK`, `CN`, `US`, `EU`, `JP`, `SG`.

### Search by keyword

```bash
longbridge macrodata --keyword CPI
longbridge macrodata --keyword CPI --country US
```

### Paginate the list

```bash
longbridge macrodata --country US --limit 50 --page 2
```

### Historical releases for a specific indicator

```bash
longbridge macrodata 62267
```

```
Non-Farm Payroll [Employment | Bureau of Labor Statistics · Monthly]

Period Actual Forecast Previous Revised Unit
2026-05-01 272000 250000 265000 263500 Thousand
2026-04-01 228000 137000 228000 228000 Thousand
...
```

### Filter history by date range

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

### JSON output for AI / scripting

```bash
# List as JSON
longbridge macrodata --format json

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

**List JSON structure:**

```json
{
"count": 619,
"page": 1,
"limit": 20,
"has_more": true,
"list": [
{
"indicator_code": "62267",
"country": "US",
"name": "Non-Farm Payroll",
"periodicity": "Monthly",
"importance": 3
}
]
}
```

**History JSON structure:**

```json
{
"count": 24,
"page": 1,
"limit": 20,
"has_more": true,
"info": {
"indicator_code": "62267",
"country": "US",
"name": "Non-Farm Payroll",
"periodicity": "Monthly",
"importance": 3
},
"data": [
{
"period": "2026-05-01",
"release_at": 1781094600,
"actual_value": "272000",
"previous_value": "265000",
"forecast_value": "250000",
"unit": "Thousand"
}
]
}
```

:::tip
`actual_value` is empty when the data has not yet been released (only `forecast_value` is available). `has_more: true` means additional pages exist — use `--page` to paginate.
:::

## Options

| Option | Description | Default |
| ------ | ----------- | ------- |
| `--country` | Filter list: `HK` \| `CN` \| `US` \| `EU` \| `JP` \| `SG` | All |
| `--keyword` | Filter list by indicator name (fuzzy, list mode only) | — |
| `--start` | History start date `YYYY-MM-DD` | — |
| `--end` | History end date `YYYY-MM-DD` | — |
| `--lang` | Language for names/descriptions: `zh-CN` \| `zh-HK` \| `en` | — |
| `--limit` | Max records per page (list: max 1000, history: max 100) | 20 |
| `--page` | Page number, 1-based | 1 |
| `--format` | `table` or `json` | `table` |
4 changes: 4 additions & 0 deletions docs/en/docs/cli/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ sidebar_icon: newspaper

# Release Notes

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

- **New `macrodata` command** — Browse 400+ macrodata indicators across US/HK/CN/EU/JP/SG; list mode with optional `--country` filter, history mode for a specific indicator code with `--start`/`--end` date range; `--format json` for AI/scripting workflows

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

- **Local-time date parsing for CLI arguments** — date-only and legacy minute-resolution datetime inputs are interpreted in the user's local timezone before API calls; RFC 3339 datetime inputs are also supported
Expand Down
Loading
Loading