From f3a1c1d6d9f73e94e2ef9045de72e32c87d668fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Thu, 11 Jun 2026 17:38:57 +0800 Subject: [PATCH 01/21] docs(fundamental): add macroeconomic-indicators SDK doc (EN) --- .../fundamental/macroeconomic-indicators.md | 217 ++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md diff --git a/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md new file mode 100644 index 00000000..534c82c4 --- /dev/null +++ b/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -0,0 +1,217 @@ +--- +slug: macroeconomic-indicators +title: Macroeconomic Indicators +sidebar_position: 20 +language_tabs: false +toc_footers: [] +includes: [] +search: true +highlight_theme: '' +headingLevel: 2 +--- + +List macroeconomic indicators available through Longbridge, optionally filtered by country. + + +# List all indicators +longbridge macroeconomic +# Filter by US indicators +longbridge macroeconomic --country US + + + + +## Parameters + +> **SDK method parameters.** + +| Name | Type | Required | Description | +| ---- | ---- | -------- | ----------- | +| country | MacroeconomicCountry | NO | Filter by country. Omit for all countries. | +| offset | int | NO | Pagination offset. Default: 0 | +| limit | int | NO | Max records per page. Default: 100, max: 1000 | + +### MacroeconomicCountry + +| Value | Country | +| ----- | ------- | +| HongKong | Hong Kong SAR | +| China | China (Mainland) | +| UnitedStates | United States | +| EuroZone | Euro Zone | +| Japan | Japan | +| Singapore | Singapore | + +## Request Example + + + + +```python +from longbridge.openapi import FundamentalContext, Config, OAuthBuilder, MacroeconomicCountry + +oauth = OAuthBuilder("your-client-id").build(lambda url: print("Visit:", url)) +config = Config.from_oauth(oauth) +ctx = FundamentalContext(config) + +# All indicators +resp = ctx.macroeconomic_indicators() +print(resp) + +# US only +resp = ctx.macroeconomic_indicators(country=MacroeconomicCountry.UnitedStates, limit=50) +print(resp) +``` + + + + +```python +import asyncio +from longbridge.openapi import AsyncFundamentalContext, Config, OAuthBuilder, MacroeconomicCountry + +async def main() -> None: + oauth = await OAuthBuilder("your-client-id").build_async(lambda url: print("Visit:", url)) + config = Config.from_oauth(oauth) + ctx = AsyncFundamentalContext.create(config) + resp = await ctx.macroeconomic_indicators(country=MacroeconomicCountry.UnitedStates) + print(resp) + +if __name__ == "__main__": + asyncio.run(main()) +``` + + + + +```javascript +const { Config, FundamentalContext, OAuth, MacroeconomicCountry } = require('longbridge') + +async function main() { + const oauth = await OAuth.build('your-client-id', (_, url) => { + console.log('Open this URL to authorize: ' + url) + }) + const config = Config.fromOAuth(oauth) + const ctx = FundamentalContext.new(config) + const resp = await ctx.macroeconomicIndicators({ country: MacroeconomicCountry.UnitedStates }) + console.log(resp) +} +main().catch(console.error) +``` + + + + +```java +import com.longbridge.*; +import com.longbridge.fundamental.*; + +class Main { + public static void main(String[] args) throws Exception { + try (OAuth oauth = new OAuthBuilder("your-client-id").build(url -> System.out.println("Open to authorize: " + url)).get(); + Config config = Config.fromOAuth(oauth); + FundamentalContext ctx = FundamentalContext.create(config)) { + var resp = ctx.getMacroeconomicIndicators(null, null, null).get(); + System.out.println(resp); + } + } +} +``` + + + + +```rust +use std::sync::Arc; +use longbridge::{oauth::OAuthBuilder, fundamental::FundamentalContext, Config}; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("Open: {url}")).await?; + let config = Arc::new(Config::from_oauth(oauth)); + let ctx = FundamentalContext::new(config); + let resp = ctx.macroeconomic_indicators(None, None, None).await?; + println!("{:?}", resp); + Ok(()) +} +``` + + + + +## Response + +### Response Example + +```json +{ + "count": 619, + "list": [ + { + "indicator_code": "US00175", + "source_org": "Bureau of Labor Statistics", + "country": "United States", + "name": { + "english": "Non-Farm Payroll", + "simplified_chinese": "非农就业人数", + "traditional_chinese": "非農就業人數" + }, + "adjustment_factor": "", + "periodicity": "Monthly", + "category": "Employment", + "describe": { + "english": "Employment situation report...", + "simplified_chinese": "", + "traditional_chinese": "" + }, + "importance": 3, + "start_date": 1356998400 + } + ] +} +``` + +### Response Status + +| Status | Description | Schema | +| ------ | ----------- | ------ | +| 200 | Success | [MacroeconomicIndicatorListResponse](#MacroeconomicIndicatorListResponse) | +| 400 | Bad request | None | + +## Schemas + +### MacroeconomicIndicatorListResponse + + + +| Name | Type | Required | Description | +| ---- | ---- | -------- | ----------- | +| list | MacroeconomicIndicator[] | true | Indicator list | +| count | int | true | Total number of matching indicators | + +### MacroeconomicIndicator + + + +| Name | Type | Required | Description | +| ---- | ---- | -------- | ----------- | +| indicator_code | string | true | Indicator code (use as input to `macroeconomic`) | +| source_org | string | true | Publishing organisation | +| country | string | true | Country name | +| name | MultiLanguageText | true | Indicator name | +| adjustment_factor | string | false | Adjustment factor | +| periodicity | string | true | Release periodicity (e.g. `Monthly`, `Quarterly`) | +| category | string | true | Indicator category (e.g. `Employment`, `Inflation`) | +| describe | MultiLanguageText | true | Indicator description | +| importance | int | true | Importance level (1 = Low, 2 = Medium, 3 = High) | +| start_date | int | false | Unix timestamp of data coverage start date | + +### MultiLanguageText + + + +| Name | Type | Description | +| ---- | ---- | ----------- | +| english | string | English text | +| simplified_chinese | string | Simplified Chinese text | +| traditional_chinese | string | Traditional Chinese text | From 87d44d8239d24d76202ee91d7075c41d8d77ca2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Thu, 11 Jun 2026 17:40:27 +0800 Subject: [PATCH 02/21] docs(fundamental): add macroeconomic SDK doc (EN) --- .../fundamental/fundamental/macroeconomic.md | 197 ++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 docs/en/docs/fundamental/fundamental/macroeconomic.md diff --git a/docs/en/docs/fundamental/fundamental/macroeconomic.md b/docs/en/docs/fundamental/fundamental/macroeconomic.md new file mode 100644 index 00000000..2298f299 --- /dev/null +++ b/docs/en/docs/fundamental/fundamental/macroeconomic.md @@ -0,0 +1,197 @@ +--- +slug: macroeconomic +title: Macroeconomic Historical Data +sidebar_position: 21 +language_tabs: false +toc_footers: [] +includes: [] +search: true +highlight_theme: '' +headingLevel: 2 +--- + +Get historical releases for a specific macroeconomic indicator — actual values, forecasts, previous values, and next release dates. + + +# Historical data for Non-Farm Payroll +longbridge macroeconomic US00175 +# Date range filter +longbridge macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 + + + + +## Parameters + +> **SDK method parameters.** + +| Name | Type | Required | Description | +| ---- | ---- | -------- | ----------- | +| indicator_code | string | YES | Indicator code from `macroeconomic_indicators` | +| start_date | string | NO | Start date in `YYYY-MM-DD` format | +| end_date | string | NO | End date in `YYYY-MM-DD` format | +| offset | int | NO | Pagination offset. Default: 0 | +| limit | int | NO | Max records. Default: 100, max: 100 | + +## Request Example + + + + +```python +from longbridge.openapi import FundamentalContext, Config, OAuthBuilder + +oauth = OAuthBuilder("your-client-id").build(lambda url: print("Visit:", url)) +config = Config.from_oauth(oauth) +ctx = FundamentalContext(config) + +resp = ctx.macroeconomic("US00175", start_date="2024-01-01", end_date="2024-12-31") +print(resp) +``` + + + + +```python +import asyncio +from longbridge.openapi import AsyncFundamentalContext, Config, OAuthBuilder + +async def main() -> None: + oauth = await OAuthBuilder("your-client-id").build_async(lambda url: print("Visit:", url)) + config = Config.from_oauth(oauth) + ctx = AsyncFundamentalContext.create(config) + resp = await ctx.macroeconomic("US00175", start_date="2024-01-01", end_date="2024-12-31") + print(resp) + +if __name__ == "__main__": + asyncio.run(main()) +``` + + + + +```javascript +const { Config, FundamentalContext, OAuth } = require('longbridge') + +async function main() { + const oauth = await OAuth.build('your-client-id', (_, url) => { + console.log('Open this URL to authorize: ' + url) + }) + const config = Config.fromOAuth(oauth) + const ctx = FundamentalContext.new(config) + const resp = await ctx.macroeconomic('US00175', { startDate: '2024-01-01', endDate: '2024-12-31' }) + console.log(resp) +} +main().catch(console.error) +``` + + + + +```java +import com.longbridge.*; +import com.longbridge.fundamental.*; + +class Main { + public static void main(String[] args) throws Exception { + try (OAuth oauth = new OAuthBuilder("your-client-id").build(url -> System.out.println("Open to authorize: " + url)).get(); + Config config = Config.fromOAuth(oauth); + FundamentalContext ctx = FundamentalContext.create(config)) { + var resp = ctx.getMacroeconomic("US00175", "2024-01-01", "2024-12-31", null, null).get(); + System.out.println(resp); + } + } +} +``` + + + + +```rust +use std::sync::Arc; +use longbridge::{oauth::OAuthBuilder, fundamental::FundamentalContext, Config}; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("Open: {url}")).await?; + let config = Arc::new(Config::from_oauth(oauth)); + let ctx = FundamentalContext::new(config); + let resp = ctx.macroeconomic("US00175", Some("2024-01-01"), Some("2024-12-31"), None, None).await?; + println!("{:?}", resp); + Ok(()) +} +``` + + + + +## Response + +### Response Example + +```json +{ + "count": 24, + "info": { + "indicator_code": "US00175", + "source_org": "Bureau of Labor Statistics", + "country": "United States", + "name": { "english": "Non-Farm Payroll", "simplified_chinese": "非农就业人数", "traditional_chinese": "非農就業人數" }, + "periodicity": "Monthly", + "category": "Employment", + "describe": { "english": "...", "simplified_chinese": "", "traditional_chinese": "" }, + "importance": 3, + "start_date": 1356998400 + }, + "data": [ + { + "period": "2024-12-01", + "release_at": 1735900200, + "actual_value": "256000", + "previous_value": "212000", + "forecast_value": "165000", + "revised_value": "212000", + "next_release_at": 1738492200, + "unit": { "english": "Thousand", "simplified_chinese": "千", "traditional_chinese": "千" }, + "unit_prefix": { "english": "", "simplified_chinese": "", "traditional_chinese": "" } + } + ] +} +``` + +### Response Status + +| Status | Description | Schema | +| ------ | ----------- | ------ | +| 200 | Success | [MacroeconomicResponse](#MacroeconomicResponse) | +| 400 | Bad request | None | + +## Schemas + +### MacroeconomicResponse + + + +| Name | Type | Required | Description | +| ---- | ---- | -------- | ----------- | +| info | MacroeconomicIndicator | true | Indicator metadata | +| data | Macroeconomic[] | true | Historical data points | +| count | int | true | Total number of data points | + +### Macroeconomic + + + +| Name | Type | Required | Description | +| ---- | ---- | -------- | ----------- | +| period | string | true | Statistical period (e.g. `2024-12-01`, `2024-Q4`) | +| release_at | int | false | Unix timestamp of release datetime | +| actual_value | string | true | Actual released value | +| previous_value | string | true | Previous period value | +| forecast_value | string | true | Market consensus forecast | +| revised_value | string | true | Revised value (if any) | +| next_release_at | int | false | Unix timestamp of next scheduled release | +| unit | MultiLanguageText | true | Unit (e.g. Thousand, %) | +| unit_prefix | MultiLanguageText | true | Unit prefix / scale (e.g. millions, billions) | + +See [MultiLanguageText](#MultiLanguageText) in `macroeconomic_indicators`. From 561a3099efbb461b5b09ad33cdfc13c352b76d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Thu, 11 Jun 2026 17:43:16 +0800 Subject: [PATCH 03/21] docs(cli): add macroeconomic command doc (EN) --- .../en/docs/cli/fundamentals/macroeconomic.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 docs/en/docs/cli/fundamentals/macroeconomic.md diff --git a/docs/en/docs/cli/fundamentals/macroeconomic.md b/docs/en/docs/cli/fundamentals/macroeconomic.md new file mode 100644 index 00000000..2efef2bc --- /dev/null +++ b/docs/en/docs/cli/fundamentals/macroeconomic.md @@ -0,0 +1,90 @@ +--- +title: 'macroeconomic' +sidebar_label: 'macroeconomic' +sidebar_position: 20 +--- + +# longbridge macroeconomic + +Browse macroeconomic indicators and their historical release data — covering US, HK, CN, EU, JP, and SG markets. + +## Modes + +| Mode | Usage | Description | +| ---- | ----- | ----------- | +| List | `longbridge macroeconomic` | List all available indicators | +| History | `longbridge macroeconomic ` | Historical releases for one indicator | + +## Examples + +### List all indicators + +```bash +longbridge macroeconomic +``` + +``` +Total: 619 +Code Name Category Country Frequency Source +US00175 Non-Farm Payroll Employment US Monthly Bureau of Labor Statistics +US00176 Unemployment Rate Employment US Monthly Bureau of Labor Statistics +... +``` + +### Filter by country + +```bash +longbridge macroeconomic --country US +longbridge macroeconomic --country HK +longbridge macroeconomic --country CN +``` + +Supported country codes: `HK`, `CN`, `US`, `EU`, `JP`, `SG`. + +### Paginate the list + +```bash +longbridge macroeconomic --country US --limit 50 --page 2 +``` + +### Historical releases for a specific indicator + +```bash +longbridge macroeconomic US00175 +``` + +``` +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 macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 +``` + +### JSON output for AI / scripting + +```bash +# List as JSON +longbridge macroeconomic --format json + +# History as JSON +longbridge macroeconomic US00175 --format json +``` + +## Options + +| Option | Description | Default | +| ------ | ----------- | ------- | +| `--country` | Filter list: `HK` \| `CN` \| `US` \| `EU` \| `JP` \| `SG` | All | +| `--start` | History start date `YYYY-MM-DD` | — | +| `--end` | History end date `YYYY-MM-DD` | — | +| `--limit` | Max records (list: max 1000, history: max 100) | 1000 (list) / 20 (history) | +| `--page` | Page number, 1-based | 1 | +| `--format` | `table` or `json` | `table` | From 26b09f53f0b58e040f854474753c4e15f324f49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Thu, 11 Jun 2026 17:43:44 +0800 Subject: [PATCH 04/21] docs(fundamental): add macroeconomic SDK docs (zh-CN) --- .../fundamental/macroeconomic-indicators.md | 156 ++++++++++++++++++ .../fundamental/fundamental/macroeconomic.md | 145 ++++++++++++++++ 2 files changed, 301 insertions(+) create mode 100644 docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md create mode 100644 docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md diff --git a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md new file mode 100644 index 00000000..656fd2ca --- /dev/null +++ b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -0,0 +1,156 @@ +--- +slug: macroeconomic-indicators +title: 宏观经济指标列表 +sidebar_position: 20 +language_tabs: false +toc_footers: [] +includes: [] +search: true +highlight_theme: '' +headingLevel: 2 +--- + +列出 Longbridge 支持的宏观经济指标,可按国家/地区筛选。 + + +# 列出全部指标 +longbridge macroeconomic +# 筛选美国指标 +longbridge macroeconomic --country US + + + + +## 参数 + +> **SDK 方法参数。** + +| 名称 | 类型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| country | MacroeconomicCountry | 否 | 按国家/地区筛选。不填返回全部。 | +| offset | int | 否 | 分页偏移量,默认 0 | +| limit | int | 否 | 每页最大条数,默认 100,最大 1000 | + +### MacroeconomicCountry + +| 枚举值 | 国家/地区 | +| ------ | --------- | +| HongKong | 香港 | +| China | 中国大陆 | +| UnitedStates | 美国 | +| EuroZone | 欧元区 | +| Japan | 日本 | +| Singapore | 新加坡 | + +## 请求示例 + + + + +```python +from longbridge.openapi import FundamentalContext, Config, OAuthBuilder, MacroeconomicCountry + +oauth = OAuthBuilder("your-client-id").build(lambda url: print("请访问:", url)) +config = Config.from_oauth(oauth) +ctx = FundamentalContext(config) + +resp = ctx.macroeconomic_indicators(country=MacroeconomicCountry.UnitedStates, limit=50) +print(resp) +``` + + + + +```javascript +const { Config, FundamentalContext, OAuth, MacroeconomicCountry } = require('longbridge') + +async function main() { + const oauth = await OAuth.build('your-client-id', (_, url) => { + console.log('请访问此 URL 授权:' + url) + }) + const config = Config.fromOAuth(oauth) + const ctx = FundamentalContext.new(config) + const resp = await ctx.macroeconomicIndicators({ country: MacroeconomicCountry.UnitedStates }) + console.log(resp) +} +main().catch(console.error) +``` + + + + +```rust +use std::sync::Arc; +use longbridge::{oauth::OAuthBuilder, fundamental::FundamentalContext, Config}; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("请访问: {url}")).await?; + let config = Arc::new(Config::from_oauth(oauth)); + let ctx = FundamentalContext::new(config); + let resp = ctx.macroeconomic_indicators(None, None, None).await?; + println!("{:?}", resp); + Ok(()) +} +``` + + + + +## 响应 + +### 响应示例 + +```json +{ + "count": 619, + "list": [ + { + "indicator_code": "US00175", + "source_org": "Bureau of Labor Statistics", + "country": "United States", + "name": { + "english": "Non-Farm Payroll", + "simplified_chinese": "非农就业人数", + "traditional_chinese": "非農就業人數" + }, + "periodicity": "Monthly", + "category": "Employment", + "importance": 3, + "start_date": 1356998400 + } + ] +} +``` + +## 数据结构 + +### MacroeconomicIndicatorListResponse + +| 字段 | 类型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| list | MacroeconomicIndicator[] | 是 | 指标列表 | +| count | int | 是 | 满足条件的指标总数 | + +### MacroeconomicIndicator + +| 字段 | 类型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| indicator_code | string | 是 | 指标代码(用于 `macroeconomic` 查询) | +| source_org | string | 是 | 发布机构 | +| country | string | 是 | 国家/地区名称 | +| name | MultiLanguageText | 是 | 指标名称(多语言) | +| adjustment_factor | string | 否 | 调整因子 | +| periodicity | string | 是 | 发布频率(如 `Monthly`、`Quarterly`) | +| category | string | 是 | 指标分类(如 `Employment`、`Inflation`) | +| describe | MultiLanguageText | 是 | 指标说明(多语言) | +| importance | int | 是 | 重要性(1=低、2=中、3=高) | +| start_date | int | 否 | 数据起始日期的 Unix 时间戳 | + +### MultiLanguageText + +| 字段 | 类型 | 描述 | +| ---- | ---- | ---- | +| english | string | 英文 | +| simplified_chinese | string | 简体中文 | +| traditional_chinese | string | 繁体中文 | diff --git a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md new file mode 100644 index 00000000..d48f3bc8 --- /dev/null +++ b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md @@ -0,0 +1,145 @@ +--- +slug: macroeconomic +title: 宏观经济历史数据 +sidebar_position: 21 +language_tabs: false +toc_footers: [] +includes: [] +search: true +highlight_theme: '' +headingLevel: 2 +--- + +获取指定宏观经济指标的历史发布数据,包括实际值、预测值、前值和下次发布时间。 + + +# 查询非农就业人数历史数据 +longbridge macroeconomic US00175 +# 指定日期范围 +longbridge macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 + + + + +## 参数 + +> **SDK 方法参数。** + +| 名称 | 类型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| indicator_code | string | 是 | 指标代码,来自 `macroeconomic_indicators` | +| start_date | string | 否 | 开始日期,格式 `YYYY-MM-DD` | +| end_date | string | 否 | 结束日期,格式 `YYYY-MM-DD` | +| offset | int | 否 | 分页偏移量,默认 0 | +| limit | int | 否 | 最大返回条数,默认 100,最大 100 | + +## 请求示例 + + + + +```python +from longbridge.openapi import FundamentalContext, Config, OAuthBuilder + +oauth = OAuthBuilder("your-client-id").build(lambda url: print("请访问:", url)) +config = Config.from_oauth(oauth) +ctx = FundamentalContext(config) + +resp = ctx.macroeconomic("US00175", start_date="2024-01-01", end_date="2024-12-31") +print(resp) +``` + + + + +```javascript +const { Config, FundamentalContext, OAuth } = require('longbridge') + +async function main() { + const oauth = await OAuth.build('your-client-id', (_, url) => { + console.log('请访问此 URL 授权:' + url) + }) + const config = Config.fromOAuth(oauth) + const ctx = FundamentalContext.new(config) + const resp = await ctx.macroeconomic('US00175', { startDate: '2024-01-01', endDate: '2024-12-31' }) + console.log(resp) +} +main().catch(console.error) +``` + + + + +```rust +use std::sync::Arc; +use longbridge::{oauth::OAuthBuilder, fundamental::FundamentalContext, Config}; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("请访问: {url}")).await?; + let config = Arc::new(Config::from_oauth(oauth)); + let ctx = FundamentalContext::new(config); + let resp = ctx.macroeconomic("US00175", Some("2024-01-01"), Some("2024-12-31"), None, None).await?; + println!("{:?}", resp); + Ok(()) +} +``` + + + + +## 响应 + +### 响应示例 + +```json +{ + "count": 24, + "info": { + "indicator_code": "US00175", + "source_org": "Bureau of Labor Statistics", + "country": "United States", + "name": { "english": "Non-Farm Payroll", "simplified_chinese": "非农就业人数", "traditional_chinese": "非農就業人數" }, + "periodicity": "Monthly", + "category": "Employment", + "importance": 3 + }, + "data": [ + { + "period": "2024-12-01", + "release_at": 1735900200, + "actual_value": "256000", + "previous_value": "212000", + "forecast_value": "165000", + "revised_value": "212000", + "next_release_at": 1738492200, + "unit": { "english": "Thousand", "simplified_chinese": "千", "traditional_chinese": "千" }, + "unit_prefix": { "english": "", "simplified_chinese": "", "traditional_chinese": "" } + } + ] +} +``` + +## 数据结构 + +### MacroeconomicResponse + +| 字段 | 类型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| info | MacroeconomicIndicator | 是 | 指标元数据 | +| data | Macroeconomic[] | 是 | 历史数据点列表 | +| count | int | 是 | 数据总条数 | + +### Macroeconomic + +| 字段 | 类型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| period | string | 是 | 统计周期(如 `2024-12-01`、`2024-Q4`) | +| release_at | int | 否 | 发布时间 Unix 时间戳 | +| actual_value | string | 是 | 实际值 | +| previous_value | string | 是 | 前值 | +| forecast_value | string | 是 | 市场预期值 | +| revised_value | string | 是 | 修正值 | +| next_release_at | int | 否 | 下次发布时间 Unix 时间戳 | +| unit | MultiLanguageText | 是 | 单位(如 Thousand、%) | +| unit_prefix | MultiLanguageText | 是 | 单位前缀/数量级(如 百万、十亿) | From 6472eff74056089c21e1642a51264bc59aa3ccd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Thu, 11 Jun 2026 17:44:12 +0800 Subject: [PATCH 05/21] docs(fundamental): add macroeconomic SDK docs (zh-HK) --- .../fundamental/macroeconomic-indicators.md | 156 ++++++++++++++++++ .../fundamental/fundamental/macroeconomic.md | 141 ++++++++++++++++ 2 files changed, 297 insertions(+) create mode 100644 docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md create mode 100644 docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md diff --git a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md new file mode 100644 index 00000000..a83003f9 --- /dev/null +++ b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -0,0 +1,156 @@ +--- +slug: macroeconomic-indicators +title: 宏觀經濟指標列表 +sidebar_position: 20 +language_tabs: false +toc_footers: [] +includes: [] +search: true +highlight_theme: '' +headingLevel: 2 +--- + +列出 Longbridge 支持的宏觀經濟指標,可按國家/地區篩選。 + + +# 列出全部指標 +longbridge macroeconomic +# 篩選美國指標 +longbridge macroeconomic --country US + + + + +## 參數 + +> **SDK 方法參數。** + +| 名稱 | 類型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| country | MacroeconomicCountry | 否 | 按國家/地區篩選。不填返回全部。 | +| offset | int | 否 | 分頁偏移量,默認 0 | +| limit | int | 否 | 每頁最大條數,默認 100,最大 1000 | + +### MacroeconomicCountry + +| 枚舉值 | 國家/地區 | +| ------ | --------- | +| HongKong | 香港 | +| China | 中國大陸 | +| UnitedStates | 美國 | +| EuroZone | 歐元區 | +| Japan | 日本 | +| Singapore | 新加坡 | + +## 請求示例 + + + + +```python +from longbridge.openapi import FundamentalContext, Config, OAuthBuilder, MacroeconomicCountry + +oauth = OAuthBuilder("your-client-id").build(lambda url: print("請訪問:", url)) +config = Config.from_oauth(oauth) +ctx = FundamentalContext(config) + +resp = ctx.macroeconomic_indicators(country=MacroeconomicCountry.UnitedStates, limit=50) +print(resp) +``` + + + + +```javascript +const { Config, FundamentalContext, OAuth, MacroeconomicCountry } = require('longbridge') + +async function main() { + const oauth = await OAuth.build('your-client-id', (_, url) => { + console.log('請訪問此 URL 授權:' + url) + }) + const config = Config.fromOAuth(oauth) + const ctx = FundamentalContext.new(config) + const resp = await ctx.macroeconomicIndicators({ country: MacroeconomicCountry.UnitedStates }) + console.log(resp) +} +main().catch(console.error) +``` + + + + +```rust +use std::sync::Arc; +use longbridge::{oauth::OAuthBuilder, fundamental::FundamentalContext, Config}; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("請訪問: {url}")).await?; + let config = Arc::new(Config::from_oauth(oauth)); + let ctx = FundamentalContext::new(config); + let resp = ctx.macroeconomic_indicators(None, None, None).await?; + println!("{:?}", resp); + Ok(()) +} +``` + + + + +## 響應 + +### 響應示例 + +```json +{ + "count": 619, + "list": [ + { + "indicator_code": "US00175", + "source_org": "Bureau of Labor Statistics", + "country": "United States", + "name": { + "english": "Non-Farm Payroll", + "simplified_chinese": "非农就业人数", + "traditional_chinese": "非農就業人數" + }, + "periodicity": "Monthly", + "category": "Employment", + "importance": 3, + "start_date": 1356998400 + } + ] +} +``` + +## 數據結構 + +### MacroeconomicIndicatorListResponse + +| 字段 | 類型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| list | MacroeconomicIndicator[] | 是 | 指標列表 | +| count | int | 是 | 滿足條件的指標總數 | + +### MacroeconomicIndicator + +| 字段 | 類型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| indicator_code | string | 是 | 指標代碼(用於 `macroeconomic` 查詢) | +| source_org | string | 是 | 發布機構 | +| country | string | 是 | 國家/地區名稱 | +| name | MultiLanguageText | 是 | 指標名稱(多語言) | +| adjustment_factor | string | 否 | 調整因子 | +| periodicity | string | 是 | 發布頻率(如 `Monthly`、`Quarterly`) | +| category | string | 是 | 指標分類(如 `Employment`、`Inflation`) | +| describe | MultiLanguageText | 是 | 指標說明(多語言) | +| importance | int | 是 | 重要性(1=低、2=中、3=高) | +| start_date | int | 否 | 數據起始日期的 Unix 時間戳 | + +### MultiLanguageText + +| 字段 | 類型 | 描述 | +| ---- | ---- | ---- | +| english | string | 英文 | +| simplified_chinese | string | 簡體中文 | +| traditional_chinese | string | 繁體中文 | diff --git a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md new file mode 100644 index 00000000..75def3a3 --- /dev/null +++ b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md @@ -0,0 +1,141 @@ +--- +slug: macroeconomic +title: 宏觀經濟歷史數據 +sidebar_position: 21 +language_tabs: false +toc_footers: [] +includes: [] +search: true +highlight_theme: '' +headingLevel: 2 +--- + +獲取指定宏觀經濟指標的歷史發布數據,包括實際值、預測值、前值和下次發布時間。 + + +# 查詢非農就業人數歷史數據 +longbridge macroeconomic US00175 +# 指定日期範圍 +longbridge macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 + + + + +## 參數 + +> **SDK 方法參數。** + +| 名稱 | 類型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| indicator_code | string | 是 | 指標代碼,來自 `macroeconomic_indicators` | +| start_date | string | 否 | 開始日期,格式 `YYYY-MM-DD` | +| end_date | string | 否 | 結束日期,格式 `YYYY-MM-DD` | +| offset | int | 否 | 分頁偏移量,默認 0 | +| limit | int | 否 | 最大返回條數,默認 100,最大 100 | + +## 請求示例 + + + + +```python +from longbridge.openapi import FundamentalContext, Config, OAuthBuilder + +oauth = OAuthBuilder("your-client-id").build(lambda url: print("請訪問:", url)) +config = Config.from_oauth(oauth) +ctx = FundamentalContext(config) + +resp = ctx.macroeconomic("US00175", start_date="2024-01-01", end_date="2024-12-31") +print(resp) +``` + + + + +```javascript +const { Config, FundamentalContext, OAuth } = require('longbridge') + +async function main() { + const oauth = await OAuth.build('your-client-id', (_, url) => { + console.log('請訪問此 URL 授權:' + url) + }) + const config = Config.fromOAuth(oauth) + const ctx = FundamentalContext.new(config) + const resp = await ctx.macroeconomic('US00175', { startDate: '2024-01-01', endDate: '2024-12-31' }) + console.log(resp) +} +main().catch(console.error) +``` + + + + +```rust +use std::sync::Arc; +use longbridge::{oauth::OAuthBuilder, fundamental::FundamentalContext, Config}; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("請訪問: {url}")).await?; + let config = Arc::new(Config::from_oauth(oauth)); + let ctx = FundamentalContext::new(config); + let resp = ctx.macroeconomic("US00175", Some("2024-01-01"), Some("2024-12-31"), None, None).await?; + println!("{:?}", resp); + Ok(()) +} +``` + + + + +## 響應示例 + +```json +{ + "count": 24, + "info": { + "indicator_code": "US00175", + "name": { "english": "Non-Farm Payroll", "simplified_chinese": "非农就业人数", "traditional_chinese": "非農就業人數" }, + "periodicity": "Monthly", + "category": "Employment", + "importance": 3 + }, + "data": [ + { + "period": "2024-12-01", + "release_at": 1735900200, + "actual_value": "256000", + "previous_value": "212000", + "forecast_value": "165000", + "revised_value": "212000", + "next_release_at": 1738492200, + "unit": { "english": "Thousand", "simplified_chinese": "千", "traditional_chinese": "千" }, + "unit_prefix": { "english": "", "simplified_chinese": "", "traditional_chinese": "" } + } + ] +} +``` + +## 數據結構 + +### MacroeconomicResponse + +| 字段 | 類型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| info | MacroeconomicIndicator | 是 | 指標元數據 | +| data | Macroeconomic[] | 是 | 歷史數據點列表 | +| count | int | 是 | 數據總條數 | + +### Macroeconomic + +| 字段 | 類型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| period | string | 是 | 統計週期(如 `2024-12-01`、`2024-Q4`) | +| release_at | int | 否 | 發布時間 Unix 時間戳 | +| actual_value | string | 是 | 實際值 | +| previous_value | string | 是 | 前值 | +| forecast_value | string | 是 | 市場預期值 | +| revised_value | string | 是 | 修正值 | +| next_release_at | int | 否 | 下次發布時間 Unix 時間戳 | +| unit | MultiLanguageText | 是 | 單位(如 Thousand、%) | +| unit_prefix | MultiLanguageText | 是 | 單位前綴/數量級 | From e702db6ee243c1399ad9155431550f5f07d6847f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Thu, 11 Jun 2026 17:44:30 +0800 Subject: [PATCH 06/21] docs(cli): add macroeconomic command doc (zh-CN + zh-HK) --- .../docs/cli/fundamentals/macroeconomic.md | 86 +++++++++++++++++++ .../docs/cli/fundamentals/macroeconomic.md | 58 +++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 docs/zh-CN/docs/cli/fundamentals/macroeconomic.md create mode 100644 docs/zh-HK/docs/cli/fundamentals/macroeconomic.md diff --git a/docs/zh-CN/docs/cli/fundamentals/macroeconomic.md b/docs/zh-CN/docs/cli/fundamentals/macroeconomic.md new file mode 100644 index 00000000..423c30e7 --- /dev/null +++ b/docs/zh-CN/docs/cli/fundamentals/macroeconomic.md @@ -0,0 +1,86 @@ +--- +title: 'macroeconomic' +sidebar_label: 'macroeconomic' +sidebar_position: 20 +--- + +# longbridge macroeconomic + +浏览宏观经济指标及其历史发布数据,覆盖美国、香港、中国大陆、欧元区、日本和新加坡市场。 + +## 模式 + +| 模式 | 用法 | 描述 | +| ---- | ---- | ---- | +| 列表 | `longbridge macroeconomic` | 列出全部可用指标 | +| 历史 | `longbridge macroeconomic ` | 查询指定指标的历史数据 | + +## 示例 + +### 列出全部指标 + +```bash +longbridge macroeconomic +``` + +``` +Total: 619 +Code Name Category Country Frequency Source +US00175 非农就业人数 Employment US Monthly Bureau of Labor Statistics +... +``` + +### 按国家/地区筛选 + +```bash +longbridge macroeconomic --country US +longbridge macroeconomic --country HK +longbridge macroeconomic --country CN +``` + +支持的国家代码:`HK`、`CN`、`US`、`EU`、`JP`、`SG`。 + +### 分页查看 + +```bash +longbridge macroeconomic --country US --limit 50 --page 2 +``` + +### 查看某个指标的历史发布数据 + +```bash +longbridge macroeconomic US00175 +``` + +``` +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 +... +``` + +### 按日期范围筛选历史数据 + +```bash +longbridge macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 +``` + +### JSON 输出(适合 AI / 脚本) + +```bash +longbridge macroeconomic --format json +longbridge macroeconomic US00175 --format json +``` + +## 选项 + +| 选项 | 描述 | 默认值 | +| ---- | ---- | ------ | +| `--country` | 筛选列表:`HK` \| `CN` \| `US` \| `EU` \| `JP` \| `SG` | 全部 | +| `--start` | 历史开始日期 `YYYY-MM-DD` | — | +| `--end` | 历史结束日期 `YYYY-MM-DD` | — | +| `--limit` | 最大条数(列表最大 1000,历史最大 100) | 1000(列表)/ 20(历史) | +| `--page` | 页码,从 1 开始 | 1 | +| `--format` | `table` 或 `json` | `table` | diff --git a/docs/zh-HK/docs/cli/fundamentals/macroeconomic.md b/docs/zh-HK/docs/cli/fundamentals/macroeconomic.md new file mode 100644 index 00000000..0581274d --- /dev/null +++ b/docs/zh-HK/docs/cli/fundamentals/macroeconomic.md @@ -0,0 +1,58 @@ +--- +title: 'macroeconomic' +sidebar_label: 'macroeconomic' +sidebar_position: 20 +--- + +# longbridge macroeconomic + +瀏覽宏觀經濟指標及其歷史發布數據,覆蓋美國、香港、中國大陸、歐元區、日本和新加坡市場。 + +## 模式 + +| 模式 | 用法 | 描述 | +| ---- | ---- | ---- | +| 列表 | `longbridge macroeconomic` | 列出全部可用指標 | +| 歷史 | `longbridge macroeconomic ` | 查詢指定指標的歷史數據 | + +## 示例 + +### 列出全部指標 + +```bash +longbridge macroeconomic +``` + +### 按國家/地區篩選 + +```bash +longbridge macroeconomic --country US +longbridge macroeconomic --country HK +``` + +支持的國家代碼:`HK`、`CN`、`US`、`EU`、`JP`、`SG`。 + +### 查看某個指標的歷史發布數據 + +```bash +longbridge macroeconomic US00175 +longbridge macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 +``` + +### JSON 輸出(適合 AI / 腳本) + +```bash +longbridge macroeconomic --format json +longbridge macroeconomic US00175 --format json +``` + +## 選項 + +| 選項 | 描述 | 默認值 | +| ---- | ---- | ------ | +| `--country` | 篩選列表:`HK` \| `CN` \| `US` \| `EU` \| `JP` \| `SG` | 全部 | +| `--start` | 歷史開始日期 `YYYY-MM-DD` | — | +| `--end` | 歷史結束日期 `YYYY-MM-DD` | — | +| `--limit` | 最大條數(列表最大 1000,歷史最大 100) | 1000(列表)/ 20(歷史) | +| `--page` | 頁碼,從 1 開始 | 1 | +| `--format` | `table` 或 `json` | `table` | From 5e3d5c39f7eb132ad08fd23b78a5bbfc2c61b6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Fri, 12 Jun 2026 09:51:26 +0800 Subject: [PATCH 07/21] docs: update changelog for SDK v4.3.1 + macroeconomic CLI command --- docs/en/docs/changelog.md | 10 ++++++++++ docs/zh-CN/docs/changelog.md | 10 ++++++++++ docs/zh-HK/docs/changelog.md | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/docs/en/docs/changelog.md b/docs/en/docs/changelog.md index 675ad7f5..6dc1c48e 100644 --- a/docs/en/docs/changelog.md +++ b/docs/en/docs/changelog.md @@ -6,6 +6,16 @@ sidebar_position: 7 sidebar_icon: newspaper --- +## 2026-06-11 + +### SDK v4.3.1 + +- **Macroeconomic indicators** — Two new `FundamentalContext` methods: `macroeconomic_indicators` lists all indicators (filter by country), `macroeconomic` returns historical release data (actual / forecast / previous / revised values) for a given indicator code + +### CLI vX.Y.Z + +- **New `macroeconomic` command** — Browse 600+ macro indicators across US/HK/CN/EU/JP/SG and query historical release data with actual, forecast, previous, and revised values; supports `--country`, `--start`, `--end`, `--limit`, `--page`, `--format json` + ## 2026-06-04 ### CLI v0.22.4 diff --git a/docs/zh-CN/docs/changelog.md b/docs/zh-CN/docs/changelog.md index 798cc2a9..5aea084f 100644 --- a/docs/zh-CN/docs/changelog.md +++ b/docs/zh-CN/docs/changelog.md @@ -6,6 +6,16 @@ sidebar_position: 7 sidebar_icon: newspaper --- +## 2026-06-11 + +### SDK v4.3.1 + +- **宏观经济数据接口** — 新增两个 `FundamentalContext` 方法:`macroeconomic_indicators` 列出全部指标(支持按国家筛选),`macroeconomic` 查询指定指标的历史发布数据(实际值/预期值/前值/修正值) + +### CLI vX.Y.Z + +- **新增 `macroeconomic` 命令** — 浏览 600+ 宏观指标(覆盖美/港/中/欧/日/新)并查询历史发布数据;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` + ## 2026-06-04 ### CLI v0.22.4 diff --git a/docs/zh-HK/docs/changelog.md b/docs/zh-HK/docs/changelog.md index fdef278e..27794067 100644 --- a/docs/zh-HK/docs/changelog.md +++ b/docs/zh-HK/docs/changelog.md @@ -6,6 +6,16 @@ sidebar_position: 7 sidebar_icon: newspaper --- +## 2026-06-11 + +### SDK v4.3.1 + +- **宏觀經濟數據接口** — 新增兩個 `FundamentalContext` 方法:`macroeconomic_indicators` 列出全部指標(支持按國家篩選),`macroeconomic` 查詢指定指標的歷史發布數據(實際值/預期值/前值/修正值) + +### CLI vX.Y.Z + +- **新增 `macroeconomic` 命令** — 瀏覽 600+ 宏觀指標(覆蓋美/港/中/歐/日/新)並查詢歷史發布數據;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` + ## 2026-06-04 ### CLI v0.22.4 From 7affc092eb3d6e4c5ccf5bb99b9ac24f7c3a7baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Fri, 12 Jun 2026 09:51:26 +0800 Subject: [PATCH 08/21] docs(cli): add release notes for macroeconomic command --- docs/en/docs/cli/release-notes.md | 4 ++++ docs/zh-CN/docs/cli/release-notes.md | 4 ++++ docs/zh-HK/docs/cli/release-notes.md | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/docs/en/docs/cli/release-notes.md b/docs/en/docs/cli/release-notes.md index f3fd75bb..bdf739ab 100644 --- a/docs/en/docs/cli/release-notes.md +++ b/docs/en/docs/cli/release-notes.md @@ -7,6 +7,10 @@ sidebar_icon: newspaper # Release Notes +### [vX.Y.Z](https://github.com/longbridge/longbridge-terminal/releases/tag/vX.Y.Z) + +- **New `macroeconomic` command** — Browse 600+ macroeconomic 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.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) - **`constituent` now supports ETFs** — ETF symbols return an asset-allocation breakdown (holdings / regional / asset-class / industry tables); index symbols behave exactly as before diff --git a/docs/zh-CN/docs/cli/release-notes.md b/docs/zh-CN/docs/cli/release-notes.md index ef9a1f40..50378c9b 100644 --- a/docs/zh-CN/docs/cli/release-notes.md +++ b/docs/zh-CN/docs/cli/release-notes.md @@ -7,6 +7,10 @@ sidebar_icon: newspaper # Release Notes +### [vX.Y.Z](https://github.com/longbridge/longbridge-terminal/releases/tag/vX.Y.Z) + +- **新增 `macroeconomic` 命令** — 浏览 600+ 宏观经济指标,覆盖美/港/中/欧/日/新六大市场;列表模式支持 `--country` 筛选,历史模式支持 `--start`/`--end` 日期区间;`--format json` 满足 AI / 脚本需求 + ### [v0.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) - **`constituent` 支持 ETF** — ETF 标的现返回资产分布数据(持仓 / 地区 / 资产类别 / 行业四组表格);指数标的行为完全不变 diff --git a/docs/zh-HK/docs/cli/release-notes.md b/docs/zh-HK/docs/cli/release-notes.md index a586b7ec..01f21ec1 100644 --- a/docs/zh-HK/docs/cli/release-notes.md +++ b/docs/zh-HK/docs/cli/release-notes.md @@ -7,6 +7,10 @@ sidebar_icon: newspaper # Release Notes +### [vX.Y.Z](https://github.com/longbridge/longbridge-terminal/releases/tag/vX.Y.Z) + +- **新增 `macroeconomic` 命令** — 瀏覽 600+ 宏觀經濟指標,覆蓋美/港/中/歐/日/新六大市場;列表模式支持 `--country` 篩選,歷史模式支持 `--start`/`--end` 日期區間;`--format json` 滿足 AI / 腳本需求 + ### [v0.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) - **`constituent` 支持 ETF** — ETF 標的現返回資產分佈數據(持倉 / 地區 / 資產類別 / 行業四組表格);指數標的行為完全不變 From 71b01a52bbdfbd47b20e3a43170ce4aa72a73b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Fri, 12 Jun 2026 10:09:23 +0800 Subject: [PATCH 09/21] docs: replace vX.Y.Z placeholder with v0.24.0 --- docs/en/docs/changelog.md | 2 +- docs/en/docs/cli/release-notes.md | 2 +- docs/zh-CN/docs/changelog.md | 2 +- docs/zh-CN/docs/cli/release-notes.md | 2 +- docs/zh-HK/docs/changelog.md | 2 +- docs/zh-HK/docs/cli/release-notes.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/docs/changelog.md b/docs/en/docs/changelog.md index 6dc1c48e..d79a36b8 100644 --- a/docs/en/docs/changelog.md +++ b/docs/en/docs/changelog.md @@ -12,7 +12,7 @@ sidebar_icon: newspaper - **Macroeconomic indicators** — Two new `FundamentalContext` methods: `macroeconomic_indicators` lists all indicators (filter by country), `macroeconomic` returns historical release data (actual / forecast / previous / revised values) for a given indicator code -### CLI vX.Y.Z +### CLI v0.24.0 - **New `macroeconomic` command** — Browse 600+ macro indicators across US/HK/CN/EU/JP/SG and query historical release data with actual, forecast, previous, and revised values; supports `--country`, `--start`, `--end`, `--limit`, `--page`, `--format json` diff --git a/docs/en/docs/cli/release-notes.md b/docs/en/docs/cli/release-notes.md index bdf739ab..e5d40787 100644 --- a/docs/en/docs/cli/release-notes.md +++ b/docs/en/docs/cli/release-notes.md @@ -7,7 +7,7 @@ sidebar_icon: newspaper # Release Notes -### [vX.Y.Z](https://github.com/longbridge/longbridge-terminal/releases/tag/vX.Y.Z) +### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) - **New `macroeconomic` command** — Browse 600+ macroeconomic 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 diff --git a/docs/zh-CN/docs/changelog.md b/docs/zh-CN/docs/changelog.md index 5aea084f..cefbbd9c 100644 --- a/docs/zh-CN/docs/changelog.md +++ b/docs/zh-CN/docs/changelog.md @@ -12,7 +12,7 @@ sidebar_icon: newspaper - **宏观经济数据接口** — 新增两个 `FundamentalContext` 方法:`macroeconomic_indicators` 列出全部指标(支持按国家筛选),`macroeconomic` 查询指定指标的历史发布数据(实际值/预期值/前值/修正值) -### CLI vX.Y.Z +### CLI v0.24.0 - **新增 `macroeconomic` 命令** — 浏览 600+ 宏观指标(覆盖美/港/中/欧/日/新)并查询历史发布数据;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` diff --git a/docs/zh-CN/docs/cli/release-notes.md b/docs/zh-CN/docs/cli/release-notes.md index 50378c9b..af79a71e 100644 --- a/docs/zh-CN/docs/cli/release-notes.md +++ b/docs/zh-CN/docs/cli/release-notes.md @@ -7,7 +7,7 @@ sidebar_icon: newspaper # Release Notes -### [vX.Y.Z](https://github.com/longbridge/longbridge-terminal/releases/tag/vX.Y.Z) +### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) - **新增 `macroeconomic` 命令** — 浏览 600+ 宏观经济指标,覆盖美/港/中/欧/日/新六大市场;列表模式支持 `--country` 筛选,历史模式支持 `--start`/`--end` 日期区间;`--format json` 满足 AI / 脚本需求 diff --git a/docs/zh-HK/docs/changelog.md b/docs/zh-HK/docs/changelog.md index 27794067..38bae00e 100644 --- a/docs/zh-HK/docs/changelog.md +++ b/docs/zh-HK/docs/changelog.md @@ -12,7 +12,7 @@ sidebar_icon: newspaper - **宏觀經濟數據接口** — 新增兩個 `FundamentalContext` 方法:`macroeconomic_indicators` 列出全部指標(支持按國家篩選),`macroeconomic` 查詢指定指標的歷史發布數據(實際值/預期值/前值/修正值) -### CLI vX.Y.Z +### CLI v0.24.0 - **新增 `macroeconomic` 命令** — 瀏覽 600+ 宏觀指標(覆蓋美/港/中/歐/日/新)並查詢歷史發布數據;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` diff --git a/docs/zh-HK/docs/cli/release-notes.md b/docs/zh-HK/docs/cli/release-notes.md index 01f21ec1..b5af22c4 100644 --- a/docs/zh-HK/docs/cli/release-notes.md +++ b/docs/zh-HK/docs/cli/release-notes.md @@ -7,7 +7,7 @@ sidebar_icon: newspaper # Release Notes -### [vX.Y.Z](https://github.com/longbridge/longbridge-terminal/releases/tag/vX.Y.Z) +### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) - **新增 `macroeconomic` 命令** — 瀏覽 600+ 宏觀經濟指標,覆蓋美/港/中/歐/日/新六大市場;列表模式支持 `--country` 篩選,歷史模式支持 `--start`/`--end` 日期區間;`--format json` 滿足 AI / 腳本需求 From d5410070e521bee586112db9e008cf9256e7250a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Fri, 12 Jun 2026 16:39:30 +0800 Subject: [PATCH 10/21] =?UTF-8?q?docs:=20rename=20CLI=20command=20macroeco?= =?UTF-8?q?nomic=20=E2=86=92=20macrodata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/changelog.md | 2 +- .../{macroeconomic.md => macrodata.md} | 28 +++++++++---------- docs/en/docs/cli/release-notes.md | 2 +- .../fundamental/macroeconomic-indicators.md | 4 +-- .../fundamental/fundamental/macroeconomic.md | 4 +-- docs/zh-CN/docs/changelog.md | 2 +- .../{macroeconomic.md => macrodata.md} | 28 +++++++++---------- docs/zh-CN/docs/cli/release-notes.md | 2 +- .../fundamental/macroeconomic-indicators.md | 4 +-- .../fundamental/fundamental/macroeconomic.md | 4 +-- docs/zh-HK/docs/changelog.md | 2 +- .../{macroeconomic.md => macrodata.md} | 24 ++++++++-------- docs/zh-HK/docs/cli/release-notes.md | 2 +- .../fundamental/macroeconomic-indicators.md | 4 +-- .../fundamental/fundamental/macroeconomic.md | 4 +-- 15 files changed, 58 insertions(+), 58 deletions(-) rename docs/en/docs/cli/fundamentals/{macroeconomic.md => macrodata.md} (71%) rename docs/zh-CN/docs/cli/fundamentals/{macroeconomic.md => macrodata.md} (70%) rename docs/zh-HK/docs/cli/fundamentals/{macroeconomic.md => macrodata.md} (64%) diff --git a/docs/en/docs/changelog.md b/docs/en/docs/changelog.md index d79a36b8..1a069927 100644 --- a/docs/en/docs/changelog.md +++ b/docs/en/docs/changelog.md @@ -14,7 +14,7 @@ sidebar_icon: newspaper ### CLI v0.24.0 -- **New `macroeconomic` command** — Browse 600+ macro indicators across US/HK/CN/EU/JP/SG and query historical release data with actual, forecast, previous, and revised values; supports `--country`, `--start`, `--end`, `--limit`, `--page`, `--format json` +- **New `macrodata` command** — Browse 600+ macro indicators across US/HK/CN/EU/JP/SG and query historical release data with actual, forecast, previous, and revised values; supports `--country`, `--start`, `--end`, `--limit`, `--page`, `--format json` ## 2026-06-04 diff --git a/docs/en/docs/cli/fundamentals/macroeconomic.md b/docs/en/docs/cli/fundamentals/macrodata.md similarity index 71% rename from docs/en/docs/cli/fundamentals/macroeconomic.md rename to docs/en/docs/cli/fundamentals/macrodata.md index 2efef2bc..beccb6b9 100644 --- a/docs/en/docs/cli/fundamentals/macroeconomic.md +++ b/docs/en/docs/cli/fundamentals/macrodata.md @@ -1,10 +1,10 @@ --- -title: 'macroeconomic' -sidebar_label: 'macroeconomic' +title: 'macrodata' +sidebar_label: 'macrodata' sidebar_position: 20 --- -# longbridge macroeconomic +# longbridge macrodata Browse macroeconomic indicators and their historical release data — covering US, HK, CN, EU, JP, and SG markets. @@ -12,15 +12,15 @@ Browse macroeconomic indicators and their historical release data — covering U | Mode | Usage | Description | | ---- | ----- | ----------- | -| List | `longbridge macroeconomic` | List all available indicators | -| History | `longbridge macroeconomic ` | Historical releases for one indicator | +| List | `longbridge macrodata` | List all available indicators | +| History | `longbridge macrodata ` | Historical releases for one indicator | ## Examples ### List all indicators ```bash -longbridge macroeconomic +longbridge macrodata ``` ``` @@ -34,9 +34,9 @@ US00176 Unemployment Rate Employment US Monthly Bureau of Lab ### Filter by country ```bash -longbridge macroeconomic --country US -longbridge macroeconomic --country HK -longbridge macroeconomic --country CN +longbridge macrodata --country US +longbridge macrodata --country HK +longbridge macrodata --country CN ``` Supported country codes: `HK`, `CN`, `US`, `EU`, `JP`, `SG`. @@ -44,13 +44,13 @@ Supported country codes: `HK`, `CN`, `US`, `EU`, `JP`, `SG`. ### Paginate the list ```bash -longbridge macroeconomic --country US --limit 50 --page 2 +longbridge macrodata --country US --limit 50 --page 2 ``` ### Historical releases for a specific indicator ```bash -longbridge macroeconomic US00175 +longbridge macrodata US00175 ``` ``` @@ -65,17 +65,17 @@ Period Actual Forecast Previous Revised Unit ### Filter history by date range ```bash -longbridge macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 ``` ### JSON output for AI / scripting ```bash # List as JSON -longbridge macroeconomic --format json +longbridge macrodata --format json # History as JSON -longbridge macroeconomic US00175 --format json +longbridge macrodata US00175 --format json ``` ## Options diff --git a/docs/en/docs/cli/release-notes.md b/docs/en/docs/cli/release-notes.md index e5d40787..9c8cbe5b 100644 --- a/docs/en/docs/cli/release-notes.md +++ b/docs/en/docs/cli/release-notes.md @@ -9,7 +9,7 @@ sidebar_icon: newspaper ### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) -- **New `macroeconomic` command** — Browse 600+ macroeconomic 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 +- **New `macrodata` command** — Browse 600+ macroeconomic 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.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) diff --git a/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md index 534c82c4..9679e1b7 100644 --- a/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -14,9 +14,9 @@ List macroeconomic indicators available through Longbridge, optionally filtered # List all indicators -longbridge macroeconomic +longbridge macrodata # Filter by US indicators -longbridge macroeconomic --country US +longbridge macrodata --country US diff --git a/docs/en/docs/fundamental/fundamental/macroeconomic.md b/docs/en/docs/fundamental/fundamental/macroeconomic.md index 2298f299..89fb25b2 100644 --- a/docs/en/docs/fundamental/fundamental/macroeconomic.md +++ b/docs/en/docs/fundamental/fundamental/macroeconomic.md @@ -14,9 +14,9 @@ Get historical releases for a specific macroeconomic indicator — actual values # Historical data for Non-Farm Payroll -longbridge macroeconomic US00175 +longbridge macrodata US00175 # Date range filter -longbridge macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 diff --git a/docs/zh-CN/docs/changelog.md b/docs/zh-CN/docs/changelog.md index cefbbd9c..6ebf622e 100644 --- a/docs/zh-CN/docs/changelog.md +++ b/docs/zh-CN/docs/changelog.md @@ -14,7 +14,7 @@ sidebar_icon: newspaper ### CLI v0.24.0 -- **新增 `macroeconomic` 命令** — 浏览 600+ 宏观指标(覆盖美/港/中/欧/日/新)并查询历史发布数据;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` +- **新增 `macrodata` 命令** — 浏览 600+ 宏观指标(覆盖美/港/中/欧/日/新)并查询历史发布数据;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` ## 2026-06-04 diff --git a/docs/zh-CN/docs/cli/fundamentals/macroeconomic.md b/docs/zh-CN/docs/cli/fundamentals/macrodata.md similarity index 70% rename from docs/zh-CN/docs/cli/fundamentals/macroeconomic.md rename to docs/zh-CN/docs/cli/fundamentals/macrodata.md index 423c30e7..74ab1b2f 100644 --- a/docs/zh-CN/docs/cli/fundamentals/macroeconomic.md +++ b/docs/zh-CN/docs/cli/fundamentals/macrodata.md @@ -1,10 +1,10 @@ --- -title: 'macroeconomic' -sidebar_label: 'macroeconomic' +title: 'macrodata' +sidebar_label: 'macrodata' sidebar_position: 20 --- -# longbridge macroeconomic +# longbridge macrodata 浏览宏观经济指标及其历史发布数据,覆盖美国、香港、中国大陆、欧元区、日本和新加坡市场。 @@ -12,15 +12,15 @@ sidebar_position: 20 | 模式 | 用法 | 描述 | | ---- | ---- | ---- | -| 列表 | `longbridge macroeconomic` | 列出全部可用指标 | -| 历史 | `longbridge macroeconomic ` | 查询指定指标的历史数据 | +| 列表 | `longbridge macrodata` | 列出全部可用指标 | +| 历史 | `longbridge macrodata ` | 查询指定指标的历史数据 | ## 示例 ### 列出全部指标 ```bash -longbridge macroeconomic +longbridge macrodata ``` ``` @@ -33,9 +33,9 @@ US00175 非农就业人数 Employment US Monthly Bureau of Labor S ### 按国家/地区筛选 ```bash -longbridge macroeconomic --country US -longbridge macroeconomic --country HK -longbridge macroeconomic --country CN +longbridge macrodata --country US +longbridge macrodata --country HK +longbridge macrodata --country CN ``` 支持的国家代码:`HK`、`CN`、`US`、`EU`、`JP`、`SG`。 @@ -43,13 +43,13 @@ longbridge macroeconomic --country CN ### 分页查看 ```bash -longbridge macroeconomic --country US --limit 50 --page 2 +longbridge macrodata --country US --limit 50 --page 2 ``` ### 查看某个指标的历史发布数据 ```bash -longbridge macroeconomic US00175 +longbridge macrodata US00175 ``` ``` @@ -64,14 +64,14 @@ Period Actual Forecast Previous Revised Unit ### 按日期范围筛选历史数据 ```bash -longbridge macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 ``` ### JSON 输出(适合 AI / 脚本) ```bash -longbridge macroeconomic --format json -longbridge macroeconomic US00175 --format json +longbridge macrodata --format json +longbridge macrodata US00175 --format json ``` ## 选项 diff --git a/docs/zh-CN/docs/cli/release-notes.md b/docs/zh-CN/docs/cli/release-notes.md index af79a71e..c2a6a2e2 100644 --- a/docs/zh-CN/docs/cli/release-notes.md +++ b/docs/zh-CN/docs/cli/release-notes.md @@ -9,7 +9,7 @@ sidebar_icon: newspaper ### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) -- **新增 `macroeconomic` 命令** — 浏览 600+ 宏观经济指标,覆盖美/港/中/欧/日/新六大市场;列表模式支持 `--country` 筛选,历史模式支持 `--start`/`--end` 日期区间;`--format json` 满足 AI / 脚本需求 +- **新增 `macrodata` 命令** — 浏览 600+ 宏观经济指标,覆盖美/港/中/欧/日/新六大市场;列表模式支持 `--country` 筛选,历史模式支持 `--start`/`--end` 日期区间;`--format json` 满足 AI / 脚本需求 ### [v0.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) diff --git a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md index 656fd2ca..0f267538 100644 --- a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -14,9 +14,9 @@ headingLevel: 2 # 列出全部指标 -longbridge macroeconomic +longbridge macrodata # 筛选美国指标 -longbridge macroeconomic --country US +longbridge macrodata --country US diff --git a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md index d48f3bc8..8889183d 100644 --- a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md +++ b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md @@ -14,9 +14,9 @@ headingLevel: 2 # 查询非农就业人数历史数据 -longbridge macroeconomic US00175 +longbridge macrodata US00175 # 指定日期范围 -longbridge macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 diff --git a/docs/zh-HK/docs/changelog.md b/docs/zh-HK/docs/changelog.md index 38bae00e..4480751b 100644 --- a/docs/zh-HK/docs/changelog.md +++ b/docs/zh-HK/docs/changelog.md @@ -14,7 +14,7 @@ sidebar_icon: newspaper ### CLI v0.24.0 -- **新增 `macroeconomic` 命令** — 瀏覽 600+ 宏觀指標(覆蓋美/港/中/歐/日/新)並查詢歷史發布數據;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` +- **新增 `macrodata` 命令** — 瀏覽 600+ 宏觀指標(覆蓋美/港/中/歐/日/新)並查詢歷史發布數據;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` ## 2026-06-04 diff --git a/docs/zh-HK/docs/cli/fundamentals/macroeconomic.md b/docs/zh-HK/docs/cli/fundamentals/macrodata.md similarity index 64% rename from docs/zh-HK/docs/cli/fundamentals/macroeconomic.md rename to docs/zh-HK/docs/cli/fundamentals/macrodata.md index 0581274d..43ab5132 100644 --- a/docs/zh-HK/docs/cli/fundamentals/macroeconomic.md +++ b/docs/zh-HK/docs/cli/fundamentals/macrodata.md @@ -1,10 +1,10 @@ --- -title: 'macroeconomic' -sidebar_label: 'macroeconomic' +title: 'macrodata' +sidebar_label: 'macrodata' sidebar_position: 20 --- -# longbridge macroeconomic +# longbridge macrodata 瀏覽宏觀經濟指標及其歷史發布數據,覆蓋美國、香港、中國大陸、歐元區、日本和新加坡市場。 @@ -12,22 +12,22 @@ sidebar_position: 20 | 模式 | 用法 | 描述 | | ---- | ---- | ---- | -| 列表 | `longbridge macroeconomic` | 列出全部可用指標 | -| 歷史 | `longbridge macroeconomic ` | 查詢指定指標的歷史數據 | +| 列表 | `longbridge macrodata` | 列出全部可用指標 | +| 歷史 | `longbridge macrodata ` | 查詢指定指標的歷史數據 | ## 示例 ### 列出全部指標 ```bash -longbridge macroeconomic +longbridge macrodata ``` ### 按國家/地區篩選 ```bash -longbridge macroeconomic --country US -longbridge macroeconomic --country HK +longbridge macrodata --country US +longbridge macrodata --country HK ``` 支持的國家代碼:`HK`、`CN`、`US`、`EU`、`JP`、`SG`。 @@ -35,15 +35,15 @@ longbridge macroeconomic --country HK ### 查看某個指標的歷史發布數據 ```bash -longbridge macroeconomic US00175 -longbridge macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata US00175 +longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 ``` ### JSON 輸出(適合 AI / 腳本) ```bash -longbridge macroeconomic --format json -longbridge macroeconomic US00175 --format json +longbridge macrodata --format json +longbridge macrodata US00175 --format json ``` ## 選項 diff --git a/docs/zh-HK/docs/cli/release-notes.md b/docs/zh-HK/docs/cli/release-notes.md index b5af22c4..5c12b334 100644 --- a/docs/zh-HK/docs/cli/release-notes.md +++ b/docs/zh-HK/docs/cli/release-notes.md @@ -9,7 +9,7 @@ sidebar_icon: newspaper ### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) -- **新增 `macroeconomic` 命令** — 瀏覽 600+ 宏觀經濟指標,覆蓋美/港/中/歐/日/新六大市場;列表模式支持 `--country` 篩選,歷史模式支持 `--start`/`--end` 日期區間;`--format json` 滿足 AI / 腳本需求 +- **新增 `macrodata` 命令** — 瀏覽 600+ 宏觀經濟指標,覆蓋美/港/中/歐/日/新六大市場;列表模式支持 `--country` 篩選,歷史模式支持 `--start`/`--end` 日期區間;`--format json` 滿足 AI / 腳本需求 ### [v0.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) diff --git a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md index a83003f9..a7035097 100644 --- a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -14,9 +14,9 @@ headingLevel: 2 # 列出全部指標 -longbridge macroeconomic +longbridge macrodata # 篩選美國指標 -longbridge macroeconomic --country US +longbridge macrodata --country US diff --git a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md index 75def3a3..1d2d7776 100644 --- a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md +++ b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md @@ -14,9 +14,9 @@ headingLevel: 2 # 查詢非農就業人數歷史數據 -longbridge macroeconomic US00175 +longbridge macrodata US00175 # 指定日期範圍 -longbridge macroeconomic US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 From 1a9c673c7110a3402ebd4e0f7787d031f064ce20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Fri, 12 Jun 2026 18:29:29 +0800 Subject: [PATCH 11/21] docs: sync macrodata/macroeconomic docs with SDK/CLI/MCP PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace US00175 → 62267 everywhere - CLI: add --lang flag, fix --limit default to 20 - SDK: fix name/describe/unit/unit_prefix MultiLanguageText → string - SDK: add macroeconomic_indicators_v2 (keyword param) and macroeconomic_v2 (sort param) - MCP: add macroeconomic indicators to capabilities table (3 langs) --- docs/en/docs/cli/fundamentals/macrodata.md | 14 +-- .../fundamental/macroeconomic-indicators.md | 83 ++++++++++++---- .../fundamental/fundamental/macroeconomic.md | 96 ++++++++++++++++--- docs/en/docs/mcp.md | 16 ++-- docs/zh-CN/docs/cli/fundamentals/macrodata.md | 11 ++- .../fundamental/macroeconomic-indicators.md | 53 ++++++++-- .../fundamental/fundamental/macroeconomic.md | 62 +++++++++--- docs/zh-CN/docs/mcp.md | 16 ++-- docs/zh-HK/docs/cli/fundamentals/macrodata.md | 9 +- .../fundamental/macroeconomic-indicators.md | 53 ++++++++-- .../fundamental/fundamental/macroeconomic.md | 62 +++++++++--- docs/zh-HK/docs/mcp.md | 2 +- 12 files changed, 371 insertions(+), 106 deletions(-) diff --git a/docs/en/docs/cli/fundamentals/macrodata.md b/docs/en/docs/cli/fundamentals/macrodata.md index beccb6b9..6a3ef5e6 100644 --- a/docs/en/docs/cli/fundamentals/macrodata.md +++ b/docs/en/docs/cli/fundamentals/macrodata.md @@ -25,9 +25,8 @@ longbridge macrodata ``` Total: 619 -Code Name Category Country Frequency Source -US00175 Non-Farm Payroll Employment US Monthly Bureau of Labor Statistics -US00176 Unemployment Rate Employment US Monthly Bureau of Labor Statistics +Code Name Category Country Frequency Source +62267 Non-Farm Payroll Employment US Monthly Bureau of Labor Statistics ... ``` @@ -50,7 +49,7 @@ longbridge macrodata --country US --limit 50 --page 2 ### Historical releases for a specific indicator ```bash -longbridge macrodata US00175 +longbridge macrodata 62267 ``` ``` @@ -65,7 +64,7 @@ Period Actual Forecast Previous Revised Unit ### Filter history by date range ```bash -longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata 62267 --start 2024-01-01 --end 2024-12-31 ``` ### JSON output for AI / scripting @@ -75,7 +74,7 @@ longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 longbridge macrodata --format json # History as JSON -longbridge macrodata US00175 --format json +longbridge macrodata 62267 --format json ``` ## Options @@ -85,6 +84,7 @@ longbridge macrodata US00175 --format json | `--country` | Filter list: `HK` \| `CN` \| `US` \| `EU` \| `JP` \| `SG` | All | | `--start` | History start date `YYYY-MM-DD` | — | | `--end` | History end date `YYYY-MM-DD` | — | -| `--limit` | Max records (list: max 1000, history: max 100) | 1000 (list) / 20 (history) | +| `--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` | diff --git a/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md index 9679e1b7..3b933324 100644 --- a/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -148,22 +148,14 @@ async fn main() -> Result<(), Box> { "count": 619, "list": [ { - "indicator_code": "US00175", + "indicator_code": "62267", "source_org": "Bureau of Labor Statistics", "country": "United States", - "name": { - "english": "Non-Farm Payroll", - "simplified_chinese": "非农就业人数", - "traditional_chinese": "非農就業人數" - }, + "name": "Non-Farm Payroll", "adjustment_factor": "", "periodicity": "Monthly", "category": "Employment", - "describe": { - "english": "Employment situation report...", - "simplified_chinese": "", - "traditional_chinese": "" - }, + "describe": "Employment situation report...", "importance": 3, "start_date": 1356998400 } @@ -198,20 +190,71 @@ async fn main() -> Result<(), Box> { | indicator_code | string | true | Indicator code (use as input to `macroeconomic`) | | source_org | string | true | Publishing organisation | | country | string | true | Country name | -| name | MultiLanguageText | true | Indicator name | +| name | string | true | Indicator name | | adjustment_factor | string | false | Adjustment factor | | periodicity | string | true | Release periodicity (e.g. `Monthly`, `Quarterly`) | | category | string | true | Indicator category (e.g. `Employment`, `Inflation`) | -| describe | MultiLanguageText | true | Indicator description | +| describe | string | true | Indicator description | | importance | int | true | Importance level (1 = Low, 2 = Medium, 3 = High) | | start_date | int | false | Unix timestamp of data coverage start date | -### MultiLanguageText - +--- + +## macroeconomic_indicators_v2 + + + +V2 variant adds a `keyword` parameter for fuzzy name search, and uses the v2 API endpoint. + +### Parameters + +| Name | Type | Required | Description | +| ---- | ---- | -------- | ----------- | +| country | MacroeconomicCountry | NO | Filter by country. Omit for all countries. | +| keyword | string | NO | Fuzzy filter on indicator name (case-insensitive) | +| offset | int | NO | Pagination offset. Default: 0 | +| limit | int | NO | Max records per page. Default: 100, max: 1000 | + +### Request Example + + + + +```python +resp = ctx.macroeconomic_indicators_v2( + country=MacroeconomicCountry.UnitedStates, + keyword="payroll", +) +print(resp) +``` -| Name | Type | Description | -| ---- | ---- | ----------- | -| english | string | English text | -| simplified_chinese | string | Simplified Chinese text | -| traditional_chinese | string | Traditional Chinese text | + + + +```javascript +const resp = await ctx.macroeconomicIndicatorsV2({ + country: MacroeconomicCountry.UnitedStates, + keyword: 'payroll', +}) +console.log(resp) +``` + + + + +```rust +let resp = ctx.macroeconomic_indicators_v2(None, Some("payroll"), None, None).await?; +println!("{:?}", resp); +``` + + + + +```go +keyword := "payroll" +resp, err := c.MacroeconomicIndicatorsV2(ctx, nil, &keyword, nil, nil) +``` + + + diff --git a/docs/en/docs/fundamental/fundamental/macroeconomic.md b/docs/en/docs/fundamental/fundamental/macroeconomic.md index 89fb25b2..7f45bc5d 100644 --- a/docs/en/docs/fundamental/fundamental/macroeconomic.md +++ b/docs/en/docs/fundamental/fundamental/macroeconomic.md @@ -14,9 +14,9 @@ Get historical releases for a specific macroeconomic indicator — actual values # Historical data for Non-Farm Payroll -longbridge macrodata US00175 +longbridge macrodata 62267 # Date range filter -longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata 62267 --start 2024-01-01 --end 2024-12-31 @@ -45,7 +45,7 @@ oauth = OAuthBuilder("your-client-id").build(lambda url: print("Visit:", url)) config = Config.from_oauth(oauth) ctx = FundamentalContext(config) -resp = ctx.macroeconomic("US00175", start_date="2024-01-01", end_date="2024-12-31") +resp = ctx.macroeconomic("62267", start_date="2024-01-01", end_date="2024-12-31") print(resp) ``` @@ -60,7 +60,7 @@ async def main() -> None: oauth = await OAuthBuilder("your-client-id").build_async(lambda url: print("Visit:", url)) config = Config.from_oauth(oauth) ctx = AsyncFundamentalContext.create(config) - resp = await ctx.macroeconomic("US00175", start_date="2024-01-01", end_date="2024-12-31") + resp = await ctx.macroeconomic("62267", start_date="2024-01-01", end_date="2024-12-31") print(resp) if __name__ == "__main__": @@ -79,7 +79,7 @@ async function main() { }) const config = Config.fromOAuth(oauth) const ctx = FundamentalContext.new(config) - const resp = await ctx.macroeconomic('US00175', { startDate: '2024-01-01', endDate: '2024-12-31' }) + const resp = await ctx.macroeconomic('62267', { startDate: '2024-01-01', endDate: '2024-12-31' }) console.log(resp) } main().catch(console.error) @@ -97,7 +97,7 @@ class Main { try (OAuth oauth = new OAuthBuilder("your-client-id").build(url -> System.out.println("Open to authorize: " + url)).get(); Config config = Config.fromOAuth(oauth); FundamentalContext ctx = FundamentalContext.create(config)) { - var resp = ctx.getMacroeconomic("US00175", "2024-01-01", "2024-12-31", null, null).get(); + var resp = ctx.getMacroeconomic("62267", "2024-01-01", "2024-12-31", null, null).get(); System.out.println(resp); } } @@ -116,7 +116,7 @@ async fn main() -> Result<(), Box> { let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("Open: {url}")).await?; let config = Arc::new(Config::from_oauth(oauth)); let ctx = FundamentalContext::new(config); - let resp = ctx.macroeconomic("US00175", Some("2024-01-01"), Some("2024-12-31"), None, None).await?; + let resp = ctx.macroeconomic("62267", Some("2024-01-01"), Some("2024-12-31"), None, None).await?; println!("{:?}", resp); Ok(()) } @@ -133,13 +133,13 @@ async fn main() -> Result<(), Box> { { "count": 24, "info": { - "indicator_code": "US00175", + "indicator_code": "62267", "source_org": "Bureau of Labor Statistics", "country": "United States", - "name": { "english": "Non-Farm Payroll", "simplified_chinese": "非农就业人数", "traditional_chinese": "非農就業人數" }, + "name": "Non-Farm Payroll", "periodicity": "Monthly", "category": "Employment", - "describe": { "english": "...", "simplified_chinese": "", "traditional_chinese": "" }, + "describe": "...", "importance": 3, "start_date": 1356998400 }, @@ -152,8 +152,8 @@ async fn main() -> Result<(), Box> { "forecast_value": "165000", "revised_value": "212000", "next_release_at": 1738492200, - "unit": { "english": "Thousand", "simplified_chinese": "千", "traditional_chinese": "千" }, - "unit_prefix": { "english": "", "simplified_chinese": "", "traditional_chinese": "" } + "unit": "Thousand", + "unit_prefix": "" } ] } @@ -191,7 +191,73 @@ async fn main() -> Result<(), Box> { | forecast_value | string | true | Market consensus forecast | | revised_value | string | true | Revised value (if any) | | next_release_at | int | false | Unix timestamp of next scheduled release | -| unit | MultiLanguageText | true | Unit (e.g. Thousand, %) | -| unit_prefix | MultiLanguageText | true | Unit prefix / scale (e.g. millions, billions) | +| unit | string | true | Unit (e.g. `Thousand`, `%`) | +| unit_prefix | string | true | Unit prefix / scale (e.g. millions, billions) | -See [MultiLanguageText](#MultiLanguageText) in `macroeconomic_indicators`. + +--- + +## macroeconomic_v2 + + + +V2 variant adds a `sort` parameter and uses the v2 API endpoint. + +### Parameters + +| Name | Type | Required | Description | +| ---- | ---- | -------- | ----------- | +| indicator_code | string | YES | Indicator code from `macroeconomic_indicators` | +| start_date | string | NO | Start date in `YYYY-MM-DD` format | +| end_date | string | NO | End date in `YYYY-MM-DD` format | +| offset | int | NO | Pagination offset. Default: 0 | +| limit | int | NO | Max records. Default: 100, max: 100 | +| sort | string | NO | Sort order: `asc` or `desc`. Default: `desc` | + +### Request Example + + + + +```python +resp = ctx.macroeconomic_v2( + "62267", + start_date="2024-01-01", + end_date="2024-12-31", + sort="asc", +) +print(resp) +``` + + + + +```javascript +const resp = await ctx.macroeconomicV2('62267', { + startDate: '2024-01-01', + endDate: '2024-12-31', + sort: 'asc', +}) +console.log(resp) +``` + + + + +```rust +let resp = ctx.macroeconomic_v2( + "62267", Some("2024-01-01"), Some("2024-12-31"), None, None, Some("asc") +).await?; +println!("{:?}", resp); +``` + + + + +```go +sort := "asc" +resp, err := c.MacroeconomicV2(ctx, "62267", &startDate, &endDate, nil, nil, &sort) +``` + + + diff --git a/docs/en/docs/mcp.md b/docs/en/docs/mcp.md index cf6fda0a..0146041f 100644 --- a/docs/en/docs/mcp.md +++ b/docs/en/docs/mcp.md @@ -21,14 +21,14 @@ Longbridge provides a hosted HTTP MCP (Model Context Protocol) service that lets Longbridge MCP exposes 100+ tools across six capability areas. Your client discovers them automatically on connect — no manual configuration. -| Capability | Coverage | -| --------------------------- | ------------------------------------------------------------------------- | -| **Real-time market data** | Quotes, candlesticks, depth, broker queues, trades, intraday capital flow | -| **Fundamentals & research** | Company profiles, dividends, valuations, executive holdings, A/H premium | -| **Derivatives** | Option chains, warrant filters, issuers, warrant quotes | -| **Account & portfolio** | Balances, positions, cash flow, watchlists and groups | -| **Trading** | Place / modify / cancel orders, estimate max purchase quantity | -| **Automation** | Price alerts, scheduled DCA (dollar-cost averaging) plans | +| Capability | Coverage | +| --------------------------- | -------------------------------------------------------------------------------------------------- | +| **Real-time market data** | Quotes, candlesticks, depth, broker queues, trades, intraday capital flow | +| **Fundamentals & research** | Company profiles, dividends, valuations, executive holdings, A/H premium, macroeconomic indicators | +| **Derivatives** | Option chains, warrant filters, issuers, warrant quotes | +| **Account & portfolio** | Balances, positions, cash flow, watchlists and groups | +| **Trading** | Place / modify / cancel orders, estimate max purchase quantity | +| **Automation** | Price alerts, scheduled DCA (dollar-cost averaging) plans | Actual tool availability depends on your region, account level, and granted OAuth scopes. diff --git a/docs/zh-CN/docs/cli/fundamentals/macrodata.md b/docs/zh-CN/docs/cli/fundamentals/macrodata.md index 74ab1b2f..e599d80e 100644 --- a/docs/zh-CN/docs/cli/fundamentals/macrodata.md +++ b/docs/zh-CN/docs/cli/fundamentals/macrodata.md @@ -26,7 +26,7 @@ longbridge macrodata ``` Total: 619 Code Name Category Country Frequency Source -US00175 非农就业人数 Employment US Monthly Bureau of Labor Statistics +62267 非农就业人数 Employment US Monthly Bureau of Labor Statistics ... ``` @@ -49,7 +49,7 @@ longbridge macrodata --country US --limit 50 --page 2 ### 查看某个指标的历史发布数据 ```bash -longbridge macrodata US00175 +longbridge macrodata 62267 ``` ``` @@ -64,14 +64,14 @@ Period Actual Forecast Previous Revised Unit ### 按日期范围筛选历史数据 ```bash -longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata 62267 --start 2024-01-01 --end 2024-12-31 ``` ### JSON 输出(适合 AI / 脚本) ```bash longbridge macrodata --format json -longbridge macrodata US00175 --format json +longbridge macrodata 62267 --format json ``` ## 选项 @@ -81,6 +81,7 @@ longbridge macrodata US00175 --format json | `--country` | 筛选列表:`HK` \| `CN` \| `US` \| `EU` \| `JP` \| `SG` | 全部 | | `--start` | 历史开始日期 `YYYY-MM-DD` | — | | `--end` | 历史结束日期 `YYYY-MM-DD` | — | -| `--limit` | 最大条数(列表最大 1000,历史最大 100) | 1000(列表)/ 20(历史) | +| `--lang` | 名称/描述语言:`zh-CN` \| `zh-HK` \| `en` | — | +| `--limit` | 每页最大条数(列表最大 1000,历史最大 100) | 20 | | `--page` | 页码,从 1 开始 | 1 | | `--format` | `table` 或 `json` | `table` | diff --git a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md index 0f267538..21cec6cc 100644 --- a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -106,14 +106,10 @@ async fn main() -> Result<(), Box> { "count": 619, "list": [ { - "indicator_code": "US00175", + "indicator_code": "62267", "source_org": "Bureau of Labor Statistics", "country": "United States", - "name": { - "english": "Non-Farm Payroll", - "simplified_chinese": "非农就业人数", - "traditional_chinese": "非農就業人數" - }, + "name": "Non-Farm Payroll", "periodicity": "Monthly", "category": "Employment", "importance": 3, @@ -139,11 +135,11 @@ async fn main() -> Result<(), Box> { | indicator_code | string | 是 | 指标代码(用于 `macroeconomic` 查询) | | source_org | string | 是 | 发布机构 | | country | string | 是 | 国家/地区名称 | -| name | MultiLanguageText | 是 | 指标名称(多语言) | +| name | string | 是 | 指标名称 | | adjustment_factor | string | 否 | 调整因子 | | periodicity | string | 是 | 发布频率(如 `Monthly`、`Quarterly`) | | category | string | 是 | 指标分类(如 `Employment`、`Inflation`) | -| describe | MultiLanguageText | 是 | 指标说明(多语言) | +| describe | string | 是 | 指标说明 | | importance | int | 是 | 重要性(1=低、2=中、3=高) | | start_date | int | 否 | 数据起始日期的 Unix 时间戳 | @@ -154,3 +150,44 @@ async fn main() -> Result<(), Box> { | english | string | 英文 | | simplified_chinese | string | 简体中文 | | traditional_chinese | string | 繁体中文 | + +--- + +## macroeconomic_indicators_v2 + + + +v2 版本新增 `keyword` 参数,支持按指标名称模糊搜索,使用 v2 API 端点。 + +### 参数 + +| 名称 | 类型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| country | MacroeconomicCountry | 否 | 按国家/地区筛选。不填返回全部。 | +| keyword | string | 否 | 按指标名称模糊搜索(不区分大小写) | +| offset | int | 否 | 分页偏移量,默认 0 | +| limit | int | 否 | 每页最大条数,默认 100,最大 1000 | + +### 请求示例 + + + + +```python +resp = ctx.macroeconomic_indicators_v2( + country=MacroeconomicCountry.UnitedStates, + keyword="payroll", +) +print(resp) +``` + + + + +```rust +let resp = ctx.macroeconomic_indicators_v2(None, Some("payroll"), None, None).await?; +println!("{:?}", resp); +``` + + + diff --git a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md index 8889183d..d345831a 100644 --- a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md +++ b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md @@ -14,9 +14,9 @@ headingLevel: 2 # 查询非农就业人数历史数据 -longbridge macrodata US00175 +longbridge macrodata 62267 # 指定日期范围 -longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata 62267 --start 2024-01-01 --end 2024-12-31 @@ -45,7 +45,7 @@ oauth = OAuthBuilder("your-client-id").build(lambda url: print("请访问:", url config = Config.from_oauth(oauth) ctx = FundamentalContext(config) -resp = ctx.macroeconomic("US00175", start_date="2024-01-01", end_date="2024-12-31") +resp = ctx.macroeconomic("62267", start_date="2024-01-01", end_date="2024-12-31") print(resp) ``` @@ -61,7 +61,7 @@ async function main() { }) const config = Config.fromOAuth(oauth) const ctx = FundamentalContext.new(config) - const resp = await ctx.macroeconomic('US00175', { startDate: '2024-01-01', endDate: '2024-12-31' }) + const resp = await ctx.macroeconomic('62267', { startDate: '2024-01-01', endDate: '2024-12-31' }) console.log(resp) } main().catch(console.error) @@ -79,7 +79,7 @@ async fn main() -> Result<(), Box> { let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("请访问: {url}")).await?; let config = Arc::new(Config::from_oauth(oauth)); let ctx = FundamentalContext::new(config); - let resp = ctx.macroeconomic("US00175", Some("2024-01-01"), Some("2024-12-31"), None, None).await?; + let resp = ctx.macroeconomic("62267", Some("2024-01-01"), Some("2024-12-31"), None, None).await?; println!("{:?}", resp); Ok(()) } @@ -96,10 +96,10 @@ async fn main() -> Result<(), Box> { { "count": 24, "info": { - "indicator_code": "US00175", + "indicator_code": "62267", "source_org": "Bureau of Labor Statistics", "country": "United States", - "name": { "english": "Non-Farm Payroll", "simplified_chinese": "非农就业人数", "traditional_chinese": "非農就業人數" }, + "name": "Non-Farm Payroll", "periodicity": "Monthly", "category": "Employment", "importance": 3 @@ -113,8 +113,8 @@ async fn main() -> Result<(), Box> { "forecast_value": "165000", "revised_value": "212000", "next_release_at": 1738492200, - "unit": { "english": "Thousand", "simplified_chinese": "千", "traditional_chinese": "千" }, - "unit_prefix": { "english": "", "simplified_chinese": "", "traditional_chinese": "" } + "unit": "Thousand", + "unit_prefix": "" } ] } @@ -141,5 +141,45 @@ async fn main() -> Result<(), Box> { | forecast_value | string | 是 | 市场预期值 | | revised_value | string | 是 | 修正值 | | next_release_at | int | 否 | 下次发布时间 Unix 时间戳 | -| unit | MultiLanguageText | 是 | 单位(如 Thousand、%) | -| unit_prefix | MultiLanguageText | 是 | 单位前缀/数量级(如 百万、十亿) | +| unit | string | 是 | 单位(如 Thousand、%) | +| unit_prefix | string | 是 | 单位前缀/数量级(如 百万、十亿) | + +--- + +## macroeconomic_v2 + + + +v2 版本新增 `sort` 参数,使用 v2 API 端点。 + +### 参数 + +| 名称 | 类型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| indicator_code | string | 是 | 指标代码,来自 `macroeconomic_indicators` | +| start_date | string | 否 | 开始日期,格式 `YYYY-MM-DD` | +| end_date | string | 否 | 结束日期,格式 `YYYY-MM-DD` | +| offset | int | 否 | 分页偏移量,默认 0 | +| limit | int | 否 | 最大返回条数,默认 100,最大 100 | +| sort | string | 否 | 排序方向:`asc` 或 `desc`,默认 `desc` | + +### 请求示例 + + + + +```python +resp = ctx.macroeconomic_v2("62267", start_date="2024-01-01", end_date="2024-12-31", sort="asc") +print(resp) +``` + + + + +```rust +let resp = ctx.macroeconomic_v2("62267", Some("2024-01-01"), Some("2024-12-31"), None, None, Some("asc")).await?; +println!("{:?}", resp); +``` + + + diff --git a/docs/zh-CN/docs/mcp.md b/docs/zh-CN/docs/mcp.md index f1475262..65844702 100644 --- a/docs/zh-CN/docs/mcp.md +++ b/docs/zh-CN/docs/mcp.md @@ -21,14 +21,14 @@ Longbridge 提供托管的 HTTP MCP(Model Context Protocol)服务,让你 Longbridge MCP 暴露 100+ 工具,覆盖六大能力域,客户端连接后会自动发现——无需手动配置。 -| 能力 | 覆盖范围 | -| ---------------- | -------------------------------------------- | -| **实时行情** | 报价、K 线、深度、经纪队列、逐笔、分时资金流 | -| **基本面与研究** | 公司资料、分红、估值、高管持仓、A/H 溢价 | -| **衍生品** | 期权链、涡轮筛选、发行商、涡轮报价 | -| **账户与组合** | 余额、持仓、资金流水、自选股及分组 | -| **交易** | 下单、改单、撤单、可买量估算 | -| **自动化** | 股价提醒、定投(DCA)计划 | +| 能力 | 覆盖范围 | +| ---------------- | -------------------------------------------------------- | +| **实时行情** | 报价、K 线、深度、经纪队列、逐笔、分时资金流 | +| **基本面与研究** | 公司资料、分红、估值、高管持仓、A/H 溢价、宏观经济指标 | +| **衍生品** | 期权链、涡轮筛选、发行商、涡轮报价 | +| **账户与组合** | 余额、持仓、资金流水、自选股及分组 | +| **交易** | 下单、改单、撤单、可买量估算 | +| **自动化** | 股价提醒、定投(DCA)计划 | 实际可用工具因地区、账户等级与 OAuth 授权范围而异。 diff --git a/docs/zh-HK/docs/cli/fundamentals/macrodata.md b/docs/zh-HK/docs/cli/fundamentals/macrodata.md index 43ab5132..7bed1610 100644 --- a/docs/zh-HK/docs/cli/fundamentals/macrodata.md +++ b/docs/zh-HK/docs/cli/fundamentals/macrodata.md @@ -35,15 +35,15 @@ longbridge macrodata --country HK ### 查看某個指標的歷史發布數據 ```bash -longbridge macrodata US00175 -longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata 62267 +longbridge macrodata 62267 --start 2024-01-01 --end 2024-12-31 ``` ### JSON 輸出(適合 AI / 腳本) ```bash longbridge macrodata --format json -longbridge macrodata US00175 --format json +longbridge macrodata 62267 --format json ``` ## 選項 @@ -53,6 +53,7 @@ longbridge macrodata US00175 --format json | `--country` | 篩選列表:`HK` \| `CN` \| `US` \| `EU` \| `JP` \| `SG` | 全部 | | `--start` | 歷史開始日期 `YYYY-MM-DD` | — | | `--end` | 歷史結束日期 `YYYY-MM-DD` | — | -| `--limit` | 最大條數(列表最大 1000,歷史最大 100) | 1000(列表)/ 20(歷史) | +| `--lang` | 名稱/描述語言:`zh-CN` \| `zh-HK` \| `en` | — | +| `--limit` | 每頁最大條數(列表最大 1000,歷史最大 100) | 20 | | `--page` | 頁碼,從 1 開始 | 1 | | `--format` | `table` 或 `json` | `table` | diff --git a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md index a7035097..3fa600ee 100644 --- a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -106,14 +106,10 @@ async fn main() -> Result<(), Box> { "count": 619, "list": [ { - "indicator_code": "US00175", + "indicator_code": "62267", "source_org": "Bureau of Labor Statistics", "country": "United States", - "name": { - "english": "Non-Farm Payroll", - "simplified_chinese": "非农就业人数", - "traditional_chinese": "非農就業人數" - }, + "name": "Non-Farm Payroll", "periodicity": "Monthly", "category": "Employment", "importance": 3, @@ -139,11 +135,11 @@ async fn main() -> Result<(), Box> { | indicator_code | string | 是 | 指標代碼(用於 `macroeconomic` 查詢) | | source_org | string | 是 | 發布機構 | | country | string | 是 | 國家/地區名稱 | -| name | MultiLanguageText | 是 | 指標名稱(多語言) | +| name | string | 是 | 指標名稱 | | adjustment_factor | string | 否 | 調整因子 | | periodicity | string | 是 | 發布頻率(如 `Monthly`、`Quarterly`) | | category | string | 是 | 指標分類(如 `Employment`、`Inflation`) | -| describe | MultiLanguageText | 是 | 指標說明(多語言) | +| describe | string | 是 | 指標說明 | | importance | int | 是 | 重要性(1=低、2=中、3=高) | | start_date | int | 否 | 數據起始日期的 Unix 時間戳 | @@ -154,3 +150,44 @@ async fn main() -> Result<(), Box> { | english | string | 英文 | | simplified_chinese | string | 簡體中文 | | traditional_chinese | string | 繁體中文 | + +--- + +## macroeconomic_indicators_v2 + + + +v2 版本新增 `keyword` 參數,支持按指標名稱模糊搜索,使用 v2 API 端點。 + +### 參數 + +| 名稱 | 類型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| country | MacroeconomicCountry | 否 | 按國家/地區篩選。不填返回全部。 | +| keyword | string | 否 | 按指標名稱模糊搜索(不區分大小寫) | +| offset | int | 否 | 分頁偏移量,默認 0 | +| limit | int | 否 | 每頁最大條數,默認 100,最大 1000 | + +### 請求示例 + + + + +```python +resp = ctx.macroeconomic_indicators_v2( + country=MacroeconomicCountry.UnitedStates, + keyword="payroll", +) +print(resp) +``` + + + + +```rust +let resp = ctx.macroeconomic_indicators_v2(None, Some("payroll"), None, None).await?; +println!("{:?}", resp); +``` + + + diff --git a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md index 1d2d7776..5f9f5211 100644 --- a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md +++ b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md @@ -14,9 +14,9 @@ headingLevel: 2 # 查詢非農就業人數歷史數據 -longbridge macrodata US00175 +longbridge macrodata 62267 # 指定日期範圍 -longbridge macrodata US00175 --start 2024-01-01 --end 2024-12-31 +longbridge macrodata 62267 --start 2024-01-01 --end 2024-12-31 @@ -45,7 +45,7 @@ oauth = OAuthBuilder("your-client-id").build(lambda url: print("請訪問:", url config = Config.from_oauth(oauth) ctx = FundamentalContext(config) -resp = ctx.macroeconomic("US00175", start_date="2024-01-01", end_date="2024-12-31") +resp = ctx.macroeconomic("62267", start_date="2024-01-01", end_date="2024-12-31") print(resp) ``` @@ -61,7 +61,7 @@ async function main() { }) const config = Config.fromOAuth(oauth) const ctx = FundamentalContext.new(config) - const resp = await ctx.macroeconomic('US00175', { startDate: '2024-01-01', endDate: '2024-12-31' }) + const resp = await ctx.macroeconomic('62267', { startDate: '2024-01-01', endDate: '2024-12-31' }) console.log(resp) } main().catch(console.error) @@ -79,7 +79,7 @@ async fn main() -> Result<(), Box> { let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("請訪問: {url}")).await?; let config = Arc::new(Config::from_oauth(oauth)); let ctx = FundamentalContext::new(config); - let resp = ctx.macroeconomic("US00175", Some("2024-01-01"), Some("2024-12-31"), None, None).await?; + let resp = ctx.macroeconomic("62267", Some("2024-01-01"), Some("2024-12-31"), None, None).await?; println!("{:?}", resp); Ok(()) } @@ -94,8 +94,8 @@ async fn main() -> Result<(), Box> { { "count": 24, "info": { - "indicator_code": "US00175", - "name": { "english": "Non-Farm Payroll", "simplified_chinese": "非农就业人数", "traditional_chinese": "非農就業人數" }, + "indicator_code": "62267", + "name": "Non-Farm Payroll", "periodicity": "Monthly", "category": "Employment", "importance": 3 @@ -109,8 +109,8 @@ async fn main() -> Result<(), Box> { "forecast_value": "165000", "revised_value": "212000", "next_release_at": 1738492200, - "unit": { "english": "Thousand", "simplified_chinese": "千", "traditional_chinese": "千" }, - "unit_prefix": { "english": "", "simplified_chinese": "", "traditional_chinese": "" } + "unit": "Thousand", + "unit_prefix": "" } ] } @@ -137,5 +137,45 @@ async fn main() -> Result<(), Box> { | forecast_value | string | 是 | 市場預期值 | | revised_value | string | 是 | 修正值 | | next_release_at | int | 否 | 下次發布時間 Unix 時間戳 | -| unit | MultiLanguageText | 是 | 單位(如 Thousand、%) | -| unit_prefix | MultiLanguageText | 是 | 單位前綴/數量級 | +| unit | string | 是 | 單位(如 Thousand、%) | +| unit_prefix | string | 是 | 單位前綴/數量級 | + +--- + +## macroeconomic_v2 + + + +v2 版本新增 `sort` 參數,使用 v2 API 端點。 + +### 參數 + +| 名稱 | 類型 | 必填 | 描述 | +| ---- | ---- | ---- | ---- | +| indicator_code | string | 是 | 指標代碼,來自 `macroeconomic_indicators` | +| start_date | string | 否 | 開始日期,格式 `YYYY-MM-DD` | +| end_date | string | 否 | 結束日期,格式 `YYYY-MM-DD` | +| offset | int | 否 | 分頁偏移量,默認 0 | +| limit | int | 否 | 最大返回條數,默認 100,最大 100 | +| sort | string | 否 | 排序方向:`asc` 或 `desc`,默認 `desc` | + +### 請求示例 + + + + +```python +resp = ctx.macroeconomic_v2("62267", start_date="2024-01-01", end_date="2024-12-31", sort="asc") +print(resp) +``` + + + + +```rust +let resp = ctx.macroeconomic_v2("62267", Some("2024-01-01"), Some("2024-12-31"), None, None, Some("asc")).await?; +println!("{:?}", resp); +``` + + + diff --git a/docs/zh-HK/docs/mcp.md b/docs/zh-HK/docs/mcp.md index fa4adb72..319fc121 100644 --- a/docs/zh-HK/docs/mcp.md +++ b/docs/zh-HK/docs/mcp.md @@ -24,7 +24,7 @@ Longbridge MCP 暴露 100+ 工具,覆蓋六大能力域,客戶端連接後 | 能力 | 覆蓋範圍 | | ---------------- | -------------------------------------------- | | **即時行情** | 報價、K 線、深度、經紀隊列、逐筆、分時資金流 | -| **基本面與研究** | 公司資料、派息、估值、高管持倉、A/H 溢價 | +| **基本面與研究** | 公司資料、派息、估值、高管持倉、A/H 溢價、宏觀經濟指標 | | **衍生品** | 期權鏈、窩輪篩選、發行商、窩輪報價 | | **帳戶與組合** | 餘額、持倉、資金流水、自選股及分組 | | **交易** | 下單、改單、撤單、可買量估算 | From 7d1e2c3faec240be6ef023e9195b3d07cdf37442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Fri, 12 Jun 2026 18:58:30 +0800 Subject: [PATCH 12/21] =?UTF-8?q?docs:=20update=20macrodata=20indicator=20?= =?UTF-8?q?count=20600+=20=E2=86=92=20400+?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/changelog.md | 2 +- docs/en/docs/cli/release-notes.md | 2 +- docs/zh-CN/docs/changelog.md | 2 +- docs/zh-CN/docs/cli/release-notes.md | 2 +- docs/zh-HK/docs/changelog.md | 2 +- docs/zh-HK/docs/cli/release-notes.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/docs/changelog.md b/docs/en/docs/changelog.md index 1a069927..5867ec5e 100644 --- a/docs/en/docs/changelog.md +++ b/docs/en/docs/changelog.md @@ -14,7 +14,7 @@ sidebar_icon: newspaper ### CLI v0.24.0 -- **New `macrodata` command** — Browse 600+ macro indicators across US/HK/CN/EU/JP/SG and query historical release data with actual, forecast, previous, and revised values; supports `--country`, `--start`, `--end`, `--limit`, `--page`, `--format json` +- **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`, `--start`, `--end`, `--limit`, `--page`, `--format json` ## 2026-06-04 diff --git a/docs/en/docs/cli/release-notes.md b/docs/en/docs/cli/release-notes.md index 9c8cbe5b..ed4ed6b9 100644 --- a/docs/en/docs/cli/release-notes.md +++ b/docs/en/docs/cli/release-notes.md @@ -9,7 +9,7 @@ sidebar_icon: newspaper ### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) -- **New `macrodata` command** — Browse 600+ macroeconomic 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 +- **New `macrodata` command** — Browse 400+ macroeconomic 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.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) diff --git a/docs/zh-CN/docs/changelog.md b/docs/zh-CN/docs/changelog.md index 6ebf622e..86955a6a 100644 --- a/docs/zh-CN/docs/changelog.md +++ b/docs/zh-CN/docs/changelog.md @@ -14,7 +14,7 @@ sidebar_icon: newspaper ### CLI v0.24.0 -- **新增 `macrodata` 命令** — 浏览 600+ 宏观指标(覆盖美/港/中/欧/日/新)并查询历史发布数据;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` +- **新增 `macrodata` 命令** — 浏览 400+ 宏观指标(覆盖美/港/中/欧/日/新)并查询历史发布数据;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` ## 2026-06-04 diff --git a/docs/zh-CN/docs/cli/release-notes.md b/docs/zh-CN/docs/cli/release-notes.md index c2a6a2e2..fc642cec 100644 --- a/docs/zh-CN/docs/cli/release-notes.md +++ b/docs/zh-CN/docs/cli/release-notes.md @@ -9,7 +9,7 @@ sidebar_icon: newspaper ### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) -- **新增 `macrodata` 命令** — 浏览 600+ 宏观经济指标,覆盖美/港/中/欧/日/新六大市场;列表模式支持 `--country` 筛选,历史模式支持 `--start`/`--end` 日期区间;`--format json` 满足 AI / 脚本需求 +- **新增 `macrodata` 命令** — 浏览 400+ 宏观经济指标,覆盖美/港/中/欧/日/新六大市场;列表模式支持 `--country` 筛选,历史模式支持 `--start`/`--end` 日期区间;`--format json` 满足 AI / 脚本需求 ### [v0.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) diff --git a/docs/zh-HK/docs/changelog.md b/docs/zh-HK/docs/changelog.md index 4480751b..168a8028 100644 --- a/docs/zh-HK/docs/changelog.md +++ b/docs/zh-HK/docs/changelog.md @@ -14,7 +14,7 @@ sidebar_icon: newspaper ### CLI v0.24.0 -- **新增 `macrodata` 命令** — 瀏覽 600+ 宏觀指標(覆蓋美/港/中/歐/日/新)並查詢歷史發布數據;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` +- **新增 `macrodata` 命令** — 瀏覽 400+ 宏觀指標(覆蓋美/港/中/歐/日/新)並查詢歷史發布數據;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` ## 2026-06-04 diff --git a/docs/zh-HK/docs/cli/release-notes.md b/docs/zh-HK/docs/cli/release-notes.md index 5c12b334..62c161aa 100644 --- a/docs/zh-HK/docs/cli/release-notes.md +++ b/docs/zh-HK/docs/cli/release-notes.md @@ -9,7 +9,7 @@ sidebar_icon: newspaper ### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) -- **新增 `macrodata` 命令** — 瀏覽 600+ 宏觀經濟指標,覆蓋美/港/中/歐/日/新六大市場;列表模式支持 `--country` 篩選,歷史模式支持 `--start`/`--end` 日期區間;`--format json` 滿足 AI / 腳本需求 +- **新增 `macrodata` 命令** — 瀏覽 400+ 宏觀經濟指標,覆蓋美/港/中/歐/日/新六大市場;列表模式支持 `--country` 篩選,歷史模式支持 `--start`/`--end` 日期區間;`--format json` 滿足 AI / 腳本需求 ### [v0.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) From d9d193925edc8d42efae3ee8b093aeb6d3783b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Fri, 12 Jun 2026 19:00:19 +0800 Subject: [PATCH 13/21] docs(cli): add --keyword flag to macrodata command (3 langs) --- docs/en/docs/cli/fundamentals/macrodata.md | 8 ++++++++ docs/zh-CN/docs/cli/fundamentals/macrodata.md | 8 ++++++++ docs/zh-HK/docs/cli/fundamentals/macrodata.md | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/docs/en/docs/cli/fundamentals/macrodata.md b/docs/en/docs/cli/fundamentals/macrodata.md index 6a3ef5e6..16f034a3 100644 --- a/docs/en/docs/cli/fundamentals/macrodata.md +++ b/docs/en/docs/cli/fundamentals/macrodata.md @@ -40,6 +40,13 @@ 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 @@ -82,6 +89,7 @@ longbridge macrodata 62267 --format json | 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` | — | diff --git a/docs/zh-CN/docs/cli/fundamentals/macrodata.md b/docs/zh-CN/docs/cli/fundamentals/macrodata.md index e599d80e..dcafe22a 100644 --- a/docs/zh-CN/docs/cli/fundamentals/macrodata.md +++ b/docs/zh-CN/docs/cli/fundamentals/macrodata.md @@ -40,6 +40,13 @@ longbridge macrodata --country CN 支持的国家代码:`HK`、`CN`、`US`、`EU`、`JP`、`SG`。 +### 按关键词搜索 + +```bash +longbridge macrodata --keyword CPI +longbridge macrodata --keyword CPI --country US +``` + ### 分页查看 ```bash @@ -79,6 +86,7 @@ longbridge macrodata 62267 --format json | 选项 | 描述 | 默认值 | | ---- | ---- | ------ | | `--country` | 筛选列表:`HK` \| `CN` \| `US` \| `EU` \| `JP` \| `SG` | 全部 | +| `--keyword` | 按指标名称筛选(模糊匹配,仅列表模式) | — | | `--start` | 历史开始日期 `YYYY-MM-DD` | — | | `--end` | 历史结束日期 `YYYY-MM-DD` | — | | `--lang` | 名称/描述语言:`zh-CN` \| `zh-HK` \| `en` | — | diff --git a/docs/zh-HK/docs/cli/fundamentals/macrodata.md b/docs/zh-HK/docs/cli/fundamentals/macrodata.md index 7bed1610..8760a759 100644 --- a/docs/zh-HK/docs/cli/fundamentals/macrodata.md +++ b/docs/zh-HK/docs/cli/fundamentals/macrodata.md @@ -32,6 +32,13 @@ longbridge macrodata --country HK 支持的國家代碼:`HK`、`CN`、`US`、`EU`、`JP`、`SG`。 +### 按關鍵詞搜索 + +```bash +longbridge macrodata --keyword CPI +longbridge macrodata --keyword CPI --country US +``` + ### 查看某個指標的歷史發布數據 ```bash @@ -51,6 +58,7 @@ longbridge macrodata 62267 --format json | 選項 | 描述 | 默認值 | | ---- | ---- | ------ | | `--country` | 篩選列表:`HK` \| `CN` \| `US` \| `EU` \| `JP` \| `SG` | 全部 | +| `--keyword` | 按指標名稱篩選(模糊匹配,僅列表模式) | — | | `--start` | 歷史開始日期 `YYYY-MM-DD` | — | | `--end` | 歷史結束日期 `YYYY-MM-DD` | — | | `--lang` | 名稱/描述語言:`zh-CN` \| `zh-HK` \| `en` | — | From c51b9b8d9cefd21b12ef3400b11d4d45b5219b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Fri, 12 Jun 2026 19:20:09 +0800 Subject: [PATCH 14/21] =?UTF-8?q?docs(cli):=20replace=20macroeconomic=20?= =?UTF-8?q?=E2=86=92=20macrodata=20in=20all=20CLI=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/cli/fundamentals/finance-calendar.md | 6 +++--- docs/en/docs/cli/fundamentals/macrodata.md | 2 +- docs/en/docs/cli/release-notes.md | 2 +- docs/zh-CN/docs/cli/fundamentals/finance-calendar.md | 6 +++--- docs/zh-CN/docs/cli/fundamentals/macrodata.md | 2 +- docs/zh-CN/docs/cli/release-notes.md | 2 +- docs/zh-HK/docs/cli/fundamentals/finance-calendar.md | 6 +++--- docs/zh-HK/docs/cli/fundamentals/macrodata.md | 2 +- docs/zh-HK/docs/cli/release-notes.md | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/en/docs/cli/fundamentals/finance-calendar.md b/docs/en/docs/cli/fundamentals/finance-calendar.md index 0b478b1d..603ddaa9 100644 --- a/docs/en/docs/cli/fundamentals/finance-calendar.md +++ b/docs/en/docs/cli/fundamentals/finance-calendar.md @@ -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 @@ -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 @@ -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 diff --git a/docs/en/docs/cli/fundamentals/macrodata.md b/docs/en/docs/cli/fundamentals/macrodata.md index 16f034a3..c834a9d1 100644 --- a/docs/en/docs/cli/fundamentals/macrodata.md +++ b/docs/en/docs/cli/fundamentals/macrodata.md @@ -6,7 +6,7 @@ sidebar_position: 20 # longbridge macrodata -Browse macroeconomic indicators and their historical release data — covering US, HK, CN, EU, JP, and SG markets. +Browse macrodata indicators and their historical release data — covering US, HK, CN, EU, JP, and SG markets. ## Modes diff --git a/docs/en/docs/cli/release-notes.md b/docs/en/docs/cli/release-notes.md index ed4ed6b9..35e12bf0 100644 --- a/docs/en/docs/cli/release-notes.md +++ b/docs/en/docs/cli/release-notes.md @@ -9,7 +9,7 @@ sidebar_icon: newspaper ### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) -- **New `macrodata` command** — Browse 400+ macroeconomic 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 +- **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.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) diff --git a/docs/zh-CN/docs/cli/fundamentals/finance-calendar.md b/docs/zh-CN/docs/cli/fundamentals/finance-calendar.md index 47e45bb8..20e89e11 100644 --- a/docs/zh-CN/docs/cli/fundamentals/finance-calendar.md +++ b/docs/zh-CN/docs/cli/fundamentals/finance-calendar.md @@ -6,7 +6,7 @@ sidebar_position: 6 # longbridge finance-calendar -浏览即将到来的财经事件——财报发布、股息派发、拆合股、IPO 及宏观经济数据,支持按标的、自选股、市场或事件类型过滤。 +浏览即将到来的财经事件——财报发布、股息派发、拆合股、IPO 及宏观数据,支持按标的、自选股、市场或事件类型过滤。 ## 子命令 @@ -16,7 +16,7 @@ sidebar_position: 6 | `dividend` | 股息公告 | | `split` | 拆股与合股 | | `ipo` | IPO 上市 | -| `macrodata` | 宏观经济数据发布 | +| `macrodata` | 宏观数据发布 | | `closed` | 市场休市日 | ## 示例 @@ -59,7 +59,7 @@ longbridge finance-calendar split --market HK longbridge finance-calendar macrodata --star 3 ``` -只显示高重要性宏观经济数据发布(三星级),涵盖 CPI、非农就业、美联储利率决议等市场重要事件。 +只显示高重要性宏观数据发布(三星级),涵盖 CPI、非农就业、美联储利率决议等市场重要事件。 ### IPO 日历 diff --git a/docs/zh-CN/docs/cli/fundamentals/macrodata.md b/docs/zh-CN/docs/cli/fundamentals/macrodata.md index dcafe22a..0fdd8de6 100644 --- a/docs/zh-CN/docs/cli/fundamentals/macrodata.md +++ b/docs/zh-CN/docs/cli/fundamentals/macrodata.md @@ -6,7 +6,7 @@ sidebar_position: 20 # longbridge macrodata -浏览宏观经济指标及其历史发布数据,覆盖美国、香港、中国大陆、欧元区、日本和新加坡市场。 +浏览宏观数据指标及其历史发布数据,覆盖美国、香港、中国大陆、欧元区、日本和新加坡市场。 ## 模式 diff --git a/docs/zh-CN/docs/cli/release-notes.md b/docs/zh-CN/docs/cli/release-notes.md index fc642cec..fcd7b072 100644 --- a/docs/zh-CN/docs/cli/release-notes.md +++ b/docs/zh-CN/docs/cli/release-notes.md @@ -9,7 +9,7 @@ sidebar_icon: newspaper ### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) -- **新增 `macrodata` 命令** — 浏览 400+ 宏观经济指标,覆盖美/港/中/欧/日/新六大市场;列表模式支持 `--country` 筛选,历史模式支持 `--start`/`--end` 日期区间;`--format json` 满足 AI / 脚本需求 +- **新增 `macrodata` 命令** — 浏览 400+ 宏观数据指标,覆盖美/港/中/欧/日/新六大市场;列表模式支持 `--country` 筛选,历史模式支持 `--start`/`--end` 日期区间;`--format json` 满足 AI / 脚本需求 ### [v0.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) diff --git a/docs/zh-HK/docs/cli/fundamentals/finance-calendar.md b/docs/zh-HK/docs/cli/fundamentals/finance-calendar.md index b1af69f0..b22dc5c7 100644 --- a/docs/zh-HK/docs/cli/fundamentals/finance-calendar.md +++ b/docs/zh-HK/docs/cli/fundamentals/finance-calendar.md @@ -6,7 +6,7 @@ sidebar_position: 6 # longbridge finance-calendar -瀏覽即將到來的財經事件——財報發布、股息派發、拆合股、IPO 及宏觀經濟數據,支援按標的、自選股、市場或事件類型篩選。 +瀏覽即將到來的財經事件——財報發布、股息派發、拆合股、IPO 及宏觀數據,支援按標的、自選股、市場或事件類型篩選。 ## 子命令 @@ -16,7 +16,7 @@ sidebar_position: 6 | `dividend` | 股息公告 | | `split` | 拆股與合股 | | `ipo` | IPO 上市 | -| `macrodata` | 宏觀經濟數據發布 | +| `macrodata` | 宏觀數據發布 | | `closed` | 市場休市日 | ## 示例 @@ -59,7 +59,7 @@ longbridge finance-calendar split --market HK longbridge finance-calendar macrodata --star 3 ``` -只顯示高重要性宏觀經濟數據發布(三星級),涵蓋 CPI、非農就業、美聯儲利率決議等市場重要事件。 +只顯示高重要性宏觀數據發布(三星級),涵蓋 CPI、非農就業、美聯儲利率決議等市場重要事件。 ### IPO 日曆 diff --git a/docs/zh-HK/docs/cli/fundamentals/macrodata.md b/docs/zh-HK/docs/cli/fundamentals/macrodata.md index 8760a759..ff3dc3c1 100644 --- a/docs/zh-HK/docs/cli/fundamentals/macrodata.md +++ b/docs/zh-HK/docs/cli/fundamentals/macrodata.md @@ -6,7 +6,7 @@ sidebar_position: 20 # longbridge macrodata -瀏覽宏觀經濟指標及其歷史發布數據,覆蓋美國、香港、中國大陸、歐元區、日本和新加坡市場。 +瀏覽宏觀數據指標及其歷史發布數據,覆蓋美國、香港、中國大陸、歐元區、日本和新加坡市場。 ## 模式 diff --git a/docs/zh-HK/docs/cli/release-notes.md b/docs/zh-HK/docs/cli/release-notes.md index 62c161aa..57e5174a 100644 --- a/docs/zh-HK/docs/cli/release-notes.md +++ b/docs/zh-HK/docs/cli/release-notes.md @@ -9,7 +9,7 @@ sidebar_icon: newspaper ### [v0.24.0](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.24.0) -- **新增 `macrodata` 命令** — 瀏覽 400+ 宏觀經濟指標,覆蓋美/港/中/歐/日/新六大市場;列表模式支持 `--country` 篩選,歷史模式支持 `--start`/`--end` 日期區間;`--format json` 滿足 AI / 腳本需求 +- **新增 `macrodata` 命令** — 瀏覽 400+ 宏觀數據指標,覆蓋美/港/中/歐/日/新六大市場;列表模式支持 `--country` 篩選,歷史模式支持 `--start`/`--end` 日期區間;`--format json` 滿足 AI / 腳本需求 ### [v0.22.4](https://github.com/longbridge/longbridge-terminal/releases/tag/v0.22.4) From 8ea3f5a7ad3eaebd85975b90ad1a3fcf909ad494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Sat, 13 Jun 2026 11:35:23 +0800 Subject: [PATCH 15/21] fix: use full-width colon in zh-CN/zh-HK SDK code examples --- .../docs/fundamental/fundamental/macroeconomic-indicators.md | 4 ++-- docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md | 4 ++-- .../docs/fundamental/fundamental/macroeconomic-indicators.md | 4 ++-- docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md index 21cec6cc..c12096df 100644 --- a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -50,7 +50,7 @@ longbridge macrodata --country US ```python from longbridge.openapi import FundamentalContext, Config, OAuthBuilder, MacroeconomicCountry -oauth = OAuthBuilder("your-client-id").build(lambda url: print("请访问:", url)) +oauth = OAuthBuilder("your-client-id").build(lambda url: print("请访问:", url)) config = Config.from_oauth(oauth) ctx = FundamentalContext(config) @@ -85,7 +85,7 @@ use longbridge::{oauth::OAuthBuilder, fundamental::FundamentalContext, Config}; #[tokio::main] async fn main() -> Result<(), Box> { - let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("请访问: {url}")).await?; + let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("请访问:{url}")).await?; let config = Arc::new(Config::from_oauth(oauth)); let ctx = FundamentalContext::new(config); let resp = ctx.macroeconomic_indicators(None, None, None).await?; diff --git a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md index d345831a..eaf14a02 100644 --- a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md +++ b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md @@ -41,7 +41,7 @@ longbridge macrodata 62267 --start 2024-01-01 --end 2024-12-31 ```python from longbridge.openapi import FundamentalContext, Config, OAuthBuilder -oauth = OAuthBuilder("your-client-id").build(lambda url: print("请访问:", url)) +oauth = OAuthBuilder("your-client-id").build(lambda url: print("请访问:", url)) config = Config.from_oauth(oauth) ctx = FundamentalContext(config) @@ -76,7 +76,7 @@ use longbridge::{oauth::OAuthBuilder, fundamental::FundamentalContext, Config}; #[tokio::main] async fn main() -> Result<(), Box> { - let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("请访问: {url}")).await?; + let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("请访问:{url}")).await?; let config = Arc::new(Config::from_oauth(oauth)); let ctx = FundamentalContext::new(config); let resp = ctx.macroeconomic("62267", Some("2024-01-01"), Some("2024-12-31"), None, None).await?; diff --git a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md index 3fa600ee..9791d677 100644 --- a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -50,7 +50,7 @@ longbridge macrodata --country US ```python from longbridge.openapi import FundamentalContext, Config, OAuthBuilder, MacroeconomicCountry -oauth = OAuthBuilder("your-client-id").build(lambda url: print("請訪問:", url)) +oauth = OAuthBuilder("your-client-id").build(lambda url: print("請訪問:", url)) config = Config.from_oauth(oauth) ctx = FundamentalContext(config) @@ -85,7 +85,7 @@ use longbridge::{oauth::OAuthBuilder, fundamental::FundamentalContext, Config}; #[tokio::main] async fn main() -> Result<(), Box> { - let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("請訪問: {url}")).await?; + let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("請訪問:{url}")).await?; let config = Arc::new(Config::from_oauth(oauth)); let ctx = FundamentalContext::new(config); let resp = ctx.macroeconomic_indicators(None, None, None).await?; diff --git a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md index 5f9f5211..0f70d774 100644 --- a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md +++ b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md @@ -41,7 +41,7 @@ longbridge macrodata 62267 --start 2024-01-01 --end 2024-12-31 ```python from longbridge.openapi import FundamentalContext, Config, OAuthBuilder -oauth = OAuthBuilder("your-client-id").build(lambda url: print("請訪問:", url)) +oauth = OAuthBuilder("your-client-id").build(lambda url: print("請訪問:", url)) config = Config.from_oauth(oauth) ctx = FundamentalContext(config) @@ -76,7 +76,7 @@ use longbridge::{oauth::OAuthBuilder, fundamental::FundamentalContext, Config}; #[tokio::main] async fn main() -> Result<(), Box> { - let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("請訪問: {url}")).await?; + let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("請訪問:{url}")).await?; let config = Arc::new(Config::from_oauth(oauth)); let ctx = FundamentalContext::new(config); let resp = ctx.macroeconomic("62267", Some("2024-01-01"), Some("2024-12-31"), None, None).await?; From d338d627bb6c00b5cbf3e7905ce33ab5858dfb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Sat, 13 Jun 2026 12:23:44 +0800 Subject: [PATCH 16/21] docs: add SDK v4.3.2 changelog entry (macroeconomic v2 methods) --- docs/en/docs/changelog.md | 8 +++++++- docs/zh-CN/docs/changelog.md | 8 +++++++- docs/zh-HK/docs/changelog.md | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/en/docs/changelog.md b/docs/en/docs/changelog.md index 5867ec5e..4bfd8dac 100644 --- a/docs/en/docs/changelog.md +++ b/docs/en/docs/changelog.md @@ -6,6 +6,12 @@ sidebar_position: 7 sidebar_icon: newspaper --- +## 2026-06-13 + +### SDK v4.3.2 + +- **Macroeconomic indicators v2** — `macroeconomic_indicators_v2` adds `keyword` fuzzy search; `macroeconomic_v2` adds `sort` (`asc`/`desc`) parameter; both use the v2 API endpoint + ## 2026-06-11 ### SDK v4.3.1 @@ -14,7 +20,7 @@ sidebar_icon: newspaper ### 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`, `--start`, `--end`, `--limit`, `--page`, `--format json` +- **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` ## 2026-06-04 diff --git a/docs/zh-CN/docs/changelog.md b/docs/zh-CN/docs/changelog.md index 86955a6a..93982e9f 100644 --- a/docs/zh-CN/docs/changelog.md +++ b/docs/zh-CN/docs/changelog.md @@ -6,6 +6,12 @@ sidebar_position: 7 sidebar_icon: newspaper --- +## 2026-06-13 + +### SDK v4.3.2 + +- **宏观经济数据 v2** — `macroeconomic_indicators_v2` 新增 `keyword` 模糊搜索;`macroeconomic_v2` 新增 `sort` 排序参数(`asc`/`desc`);两个方法均使用 v2 API 端点 + ## 2026-06-11 ### SDK v4.3.1 @@ -14,7 +20,7 @@ sidebar_icon: newspaper ### CLI v0.24.0 -- **新增 `macrodata` 命令** — 浏览 400+ 宏观指标(覆盖美/港/中/欧/日/新)并查询历史发布数据;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` +- **新增 `macrodata` 命令** — 浏览 400+ 宏观指标(覆盖美/港/中/欧/日/新)并查询历史发布数据;支持 `--country`、`--keyword`、`--lang`、`--start`、`--end`、`--limit`、`--page`、`--format json` ## 2026-06-04 diff --git a/docs/zh-HK/docs/changelog.md b/docs/zh-HK/docs/changelog.md index 168a8028..1a520116 100644 --- a/docs/zh-HK/docs/changelog.md +++ b/docs/zh-HK/docs/changelog.md @@ -6,6 +6,12 @@ sidebar_position: 7 sidebar_icon: newspaper --- +## 2026-06-13 + +### SDK v4.3.2 + +- **宏觀經濟數據 v2** — `macroeconomic_indicators_v2` 新增 `keyword` 模糊搜索;`macroeconomic_v2` 新增 `sort` 排序參數(`asc`/`desc`);兩個方法均使用 v2 API 端點 + ## 2026-06-11 ### SDK v4.3.1 @@ -14,7 +20,7 @@ sidebar_icon: newspaper ### CLI v0.24.0 -- **新增 `macrodata` 命令** — 瀏覽 400+ 宏觀指標(覆蓋美/港/中/歐/日/新)並查詢歷史發布數據;支持 `--country`、`--start`、`--end`、`--limit`、`--page`、`--format json` +- **新增 `macrodata` 命令** — 瀏覽 400+ 宏觀指標(覆蓋美/港/中/歐/日/新)並查詢歷史發布數據;支持 `--country`、`--keyword`、`--lang`、`--start`、`--end`、`--limit`、`--page`、`--format json` ## 2026-06-04 From ac8867d2f991ca698d303fbf03bcd6114b28d832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Sat, 13 Jun 2026 19:48:53 +0800 Subject: [PATCH 17/21] docs(fundamental): update macroeconomic - clean response example, remove v2 internal section Remove unmapped v2 fields (source_org, adjustment_factor, category, start_date from info; revised_value, next_release_at, unit, unit_prefix from data points), fix country value to shorthand code ("US"), and delete the macroeconomic_v2 section which covers internal pub(crate) methods not intended for user docs. Applied consistently across en, zh-CN, and zh-HK. --- .../fundamental/fundamental/macroeconomic.md | 85 +------------------ .../fundamental/fundamental/macroeconomic.md | 55 +----------- .../fundamental/fundamental/macroeconomic.md | 53 +----------- 3 files changed, 9 insertions(+), 184 deletions(-) diff --git a/docs/en/docs/fundamental/fundamental/macroeconomic.md b/docs/en/docs/fundamental/fundamental/macroeconomic.md index 7f45bc5d..d66b63fd 100644 --- a/docs/en/docs/fundamental/fundamental/macroeconomic.md +++ b/docs/en/docs/fundamental/fundamental/macroeconomic.md @@ -134,14 +134,11 @@ async fn main() -> Result<(), Box> { "count": 24, "info": { "indicator_code": "62267", - "source_org": "Bureau of Labor Statistics", - "country": "United States", + "country": "US", "name": "Non-Farm Payroll", "periodicity": "Monthly", - "category": "Employment", "describe": "...", - "importance": 3, - "start_date": 1356998400 + "importance": 3 }, "data": [ { @@ -149,11 +146,7 @@ async fn main() -> Result<(), Box> { "release_at": 1735900200, "actual_value": "256000", "previous_value": "212000", - "forecast_value": "165000", - "revised_value": "212000", - "next_release_at": 1738492200, - "unit": "Thousand", - "unit_prefix": "" + "forecast_value": "165000" } ] } @@ -189,75 +182,3 @@ async fn main() -> Result<(), Box> { | actual_value | string | true | Actual released value | | previous_value | string | true | Previous period value | | forecast_value | string | true | Market consensus forecast | -| revised_value | string | true | Revised value (if any) | -| next_release_at | int | false | Unix timestamp of next scheduled release | -| unit | string | true | Unit (e.g. `Thousand`, `%`) | -| unit_prefix | string | true | Unit prefix / scale (e.g. millions, billions) | - - ---- - -## macroeconomic_v2 - - - -V2 variant adds a `sort` parameter and uses the v2 API endpoint. - -### Parameters - -| Name | Type | Required | Description | -| ---- | ---- | -------- | ----------- | -| indicator_code | string | YES | Indicator code from `macroeconomic_indicators` | -| start_date | string | NO | Start date in `YYYY-MM-DD` format | -| end_date | string | NO | End date in `YYYY-MM-DD` format | -| offset | int | NO | Pagination offset. Default: 0 | -| limit | int | NO | Max records. Default: 100, max: 100 | -| sort | string | NO | Sort order: `asc` or `desc`. Default: `desc` | - -### Request Example - - - - -```python -resp = ctx.macroeconomic_v2( - "62267", - start_date="2024-01-01", - end_date="2024-12-31", - sort="asc", -) -print(resp) -``` - - - - -```javascript -const resp = await ctx.macroeconomicV2('62267', { - startDate: '2024-01-01', - endDate: '2024-12-31', - sort: 'asc', -}) -console.log(resp) -``` - - - - -```rust -let resp = ctx.macroeconomic_v2( - "62267", Some("2024-01-01"), Some("2024-12-31"), None, None, Some("asc") -).await?; -println!("{:?}", resp); -``` - - - - -```go -sort := "asc" -resp, err := c.MacroeconomicV2(ctx, "62267", &startDate, &endDate, nil, nil, &sort) -``` - - - diff --git a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md index eaf14a02..7280a5a6 100644 --- a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md +++ b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic.md @@ -97,11 +97,10 @@ async fn main() -> Result<(), Box> { "count": 24, "info": { "indicator_code": "62267", - "source_org": "Bureau of Labor Statistics", - "country": "United States", + "country": "US", "name": "Non-Farm Payroll", "periodicity": "Monthly", - "category": "Employment", + "describe": "...", "importance": 3 }, "data": [ @@ -110,11 +109,7 @@ async fn main() -> Result<(), Box> { "release_at": 1735900200, "actual_value": "256000", "previous_value": "212000", - "forecast_value": "165000", - "revised_value": "212000", - "next_release_at": 1738492200, - "unit": "Thousand", - "unit_prefix": "" + "forecast_value": "165000" } ] } @@ -139,47 +134,3 @@ async fn main() -> Result<(), Box> { | actual_value | string | 是 | 实际值 | | previous_value | string | 是 | 前值 | | forecast_value | string | 是 | 市场预期值 | -| revised_value | string | 是 | 修正值 | -| next_release_at | int | 否 | 下次发布时间 Unix 时间戳 | -| unit | string | 是 | 单位(如 Thousand、%) | -| unit_prefix | string | 是 | 单位前缀/数量级(如 百万、十亿) | - ---- - -## macroeconomic_v2 - - - -v2 版本新增 `sort` 参数,使用 v2 API 端点。 - -### 参数 - -| 名称 | 类型 | 必填 | 描述 | -| ---- | ---- | ---- | ---- | -| indicator_code | string | 是 | 指标代码,来自 `macroeconomic_indicators` | -| start_date | string | 否 | 开始日期,格式 `YYYY-MM-DD` | -| end_date | string | 否 | 结束日期,格式 `YYYY-MM-DD` | -| offset | int | 否 | 分页偏移量,默认 0 | -| limit | int | 否 | 最大返回条数,默认 100,最大 100 | -| sort | string | 否 | 排序方向:`asc` 或 `desc`,默认 `desc` | - -### 请求示例 - - - - -```python -resp = ctx.macroeconomic_v2("62267", start_date="2024-01-01", end_date="2024-12-31", sort="asc") -print(resp) -``` - - - - -```rust -let resp = ctx.macroeconomic_v2("62267", Some("2024-01-01"), Some("2024-12-31"), None, None, Some("asc")).await?; -println!("{:?}", resp); -``` - - - diff --git a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md index 0f70d774..43a08a25 100644 --- a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md +++ b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic.md @@ -95,9 +95,10 @@ async fn main() -> Result<(), Box> { "count": 24, "info": { "indicator_code": "62267", + "country": "US", "name": "Non-Farm Payroll", "periodicity": "Monthly", - "category": "Employment", + "describe": "...", "importance": 3 }, "data": [ @@ -106,11 +107,7 @@ async fn main() -> Result<(), Box> { "release_at": 1735900200, "actual_value": "256000", "previous_value": "212000", - "forecast_value": "165000", - "revised_value": "212000", - "next_release_at": 1738492200, - "unit": "Thousand", - "unit_prefix": "" + "forecast_value": "165000" } ] } @@ -135,47 +132,3 @@ async fn main() -> Result<(), Box> { | actual_value | string | 是 | 實際值 | | previous_value | string | 是 | 前值 | | forecast_value | string | 是 | 市場預期值 | -| revised_value | string | 是 | 修正值 | -| next_release_at | int | 否 | 下次發布時間 Unix 時間戳 | -| unit | string | 是 | 單位(如 Thousand、%) | -| unit_prefix | string | 是 | 單位前綴/數量級 | - ---- - -## macroeconomic_v2 - - - -v2 版本新增 `sort` 參數,使用 v2 API 端點。 - -### 參數 - -| 名稱 | 類型 | 必填 | 描述 | -| ---- | ---- | ---- | ---- | -| indicator_code | string | 是 | 指標代碼,來自 `macroeconomic_indicators` | -| start_date | string | 否 | 開始日期,格式 `YYYY-MM-DD` | -| end_date | string | 否 | 結束日期,格式 `YYYY-MM-DD` | -| offset | int | 否 | 分頁偏移量,默認 0 | -| limit | int | 否 | 最大返回條數,默認 100,最大 100 | -| sort | string | 否 | 排序方向:`asc` 或 `desc`,默認 `desc` | - -### 請求示例 - - - - -```python -resp = ctx.macroeconomic_v2("62267", start_date="2024-01-01", end_date="2024-12-31", sort="asc") -print(resp) -``` - - - - -```rust -let resp = ctx.macroeconomic_v2("62267", Some("2024-01-01"), Some("2024-12-31"), None, None, Some("asc")).await?; -println!("{:?}", resp); -``` - - - From 1509eb61771e4b50bbd0726d422f64c6afbcf373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Sat, 13 Jun 2026 19:49:16 +0800 Subject: [PATCH 18/21] docs(fundamental): update macroeconomic-indicators - add keyword param, fix country abbreviations, clean response example Co-Authored-By: Claude Sonnet 4.6 (1M context) --- .../fundamental/macroeconomic-indicators.md | 86 +++---------------- .../fundamental/macroeconomic-indicators.md | 69 +++------------ .../fundamental/macroeconomic-indicators.md | 69 +++------------ 3 files changed, 33 insertions(+), 191 deletions(-) diff --git a/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md index 3b933324..7ec9240f 100644 --- a/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -28,6 +28,7 @@ longbridge macrodata --country US | Name | Type | Required | Description | | ---- | ---- | -------- | ----------- | | country | MacroeconomicCountry | NO | Filter by country. Omit for all countries. | +| keyword | string | NO | Fuzzy search by indicator name (case-insensitive) | | offset | int | NO | Pagination offset. Default: 0 | | limit | int | NO | Max records per page. Default: 100, max: 1000 | @@ -35,12 +36,12 @@ longbridge macrodata --country US | Value | Country | | ----- | ------- | -| HongKong | Hong Kong SAR | -| China | China (Mainland) | -| UnitedStates | United States | -| EuroZone | Euro Zone | -| Japan | Japan | -| Singapore | Singapore | +| HK | Hong Kong SAR | +| CN | China (Mainland) | +| US | United States | +| EU | Euro Zone | +| JP | Japan | +| SG | Singapore | ## Request Example @@ -61,6 +62,10 @@ print(resp) # US only resp = ctx.macroeconomic_indicators(country=MacroeconomicCountry.UnitedStates, limit=50) print(resp) + +# Search by keyword +resp = ctx.macroeconomic_indicators(keyword="payroll") +print(resp) ``` @@ -149,15 +154,11 @@ async fn main() -> Result<(), Box> { "list": [ { "indicator_code": "62267", - "source_org": "Bureau of Labor Statistics", - "country": "United States", + "country": "US", "name": "Non-Farm Payroll", - "adjustment_factor": "", "periodicity": "Monthly", - "category": "Employment", "describe": "Employment situation report...", - "importance": 3, - "start_date": 1356998400 + "importance": 3 } ] } @@ -197,64 +198,3 @@ async fn main() -> Result<(), Box> { | describe | string | true | Indicator description | | importance | int | true | Importance level (1 = Low, 2 = Medium, 3 = High) | | start_date | int | false | Unix timestamp of data coverage start date | - - ---- - -## macroeconomic_indicators_v2 - - - -V2 variant adds a `keyword` parameter for fuzzy name search, and uses the v2 API endpoint. - -### Parameters - -| Name | Type | Required | Description | -| ---- | ---- | -------- | ----------- | -| country | MacroeconomicCountry | NO | Filter by country. Omit for all countries. | -| keyword | string | NO | Fuzzy filter on indicator name (case-insensitive) | -| offset | int | NO | Pagination offset. Default: 0 | -| limit | int | NO | Max records per page. Default: 100, max: 1000 | - -### Request Example - - - - -```python -resp = ctx.macroeconomic_indicators_v2( - country=MacroeconomicCountry.UnitedStates, - keyword="payroll", -) -print(resp) -``` - - - - -```javascript -const resp = await ctx.macroeconomicIndicatorsV2({ - country: MacroeconomicCountry.UnitedStates, - keyword: 'payroll', -}) -console.log(resp) -``` - - - - -```rust -let resp = ctx.macroeconomic_indicators_v2(None, Some("payroll"), None, None).await?; -println!("{:?}", resp); -``` - - - - -```go -keyword := "payroll" -resp, err := c.MacroeconomicIndicatorsV2(ctx, nil, &keyword, nil, nil) -``` - - - diff --git a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md index c12096df..d02b2350 100644 --- a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -28,6 +28,7 @@ longbridge macrodata --country US | 名称 | 类型 | 必填 | 描述 | | ---- | ---- | ---- | ---- | | country | MacroeconomicCountry | 否 | 按国家/地区筛选。不填返回全部。 | +| keyword | string | 否 | 按指标名称模糊搜索(不区分大小写) | | offset | int | 否 | 分页偏移量,默认 0 | | limit | int | 否 | 每页最大条数,默认 100,最大 1000 | @@ -35,12 +36,12 @@ longbridge macrodata --country US | 枚举值 | 国家/地区 | | ------ | --------- | -| HongKong | 香港 | -| China | 中国大陆 | -| UnitedStates | 美国 | -| EuroZone | 欧元区 | -| Japan | 日本 | -| Singapore | 新加坡 | +| HK | 香港 | +| CN | 中国大陆 | +| US | 美国 | +| EU | 欧元区 | +| JP | 日本 | +| SG | 新加坡 | ## 请求示例 @@ -107,13 +108,11 @@ async fn main() -> Result<(), Box> { "list": [ { "indicator_code": "62267", - "source_org": "Bureau of Labor Statistics", - "country": "United States", + "country": "US", "name": "Non-Farm Payroll", "periodicity": "Monthly", - "category": "Employment", - "importance": 3, - "start_date": 1356998400 + "describe": "Employment situation report...", + "importance": 3 } ] } @@ -143,51 +142,3 @@ async fn main() -> Result<(), Box> { | importance | int | 是 | 重要性(1=低、2=中、3=高) | | start_date | int | 否 | 数据起始日期的 Unix 时间戳 | -### MultiLanguageText - -| 字段 | 类型 | 描述 | -| ---- | ---- | ---- | -| english | string | 英文 | -| simplified_chinese | string | 简体中文 | -| traditional_chinese | string | 繁体中文 | - ---- - -## macroeconomic_indicators_v2 - - - -v2 版本新增 `keyword` 参数,支持按指标名称模糊搜索,使用 v2 API 端点。 - -### 参数 - -| 名称 | 类型 | 必填 | 描述 | -| ---- | ---- | ---- | ---- | -| country | MacroeconomicCountry | 否 | 按国家/地区筛选。不填返回全部。 | -| keyword | string | 否 | 按指标名称模糊搜索(不区分大小写) | -| offset | int | 否 | 分页偏移量,默认 0 | -| limit | int | 否 | 每页最大条数,默认 100,最大 1000 | - -### 请求示例 - - - - -```python -resp = ctx.macroeconomic_indicators_v2( - country=MacroeconomicCountry.UnitedStates, - keyword="payroll", -) -print(resp) -``` - - - - -```rust -let resp = ctx.macroeconomic_indicators_v2(None, Some("payroll"), None, None).await?; -println!("{:?}", resp); -``` - - - diff --git a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md index 9791d677..6ae2449e 100644 --- a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -28,6 +28,7 @@ longbridge macrodata --country US | 名稱 | 類型 | 必填 | 描述 | | ---- | ---- | ---- | ---- | | country | MacroeconomicCountry | 否 | 按國家/地區篩選。不填返回全部。 | +| keyword | string | 否 | 按指標名稱模糊搜索(不區分大小寫) | | offset | int | 否 | 分頁偏移量,默認 0 | | limit | int | 否 | 每頁最大條數,默認 100,最大 1000 | @@ -35,12 +36,12 @@ longbridge macrodata --country US | 枚舉值 | 國家/地區 | | ------ | --------- | -| HongKong | 香港 | -| China | 中國大陸 | -| UnitedStates | 美國 | -| EuroZone | 歐元區 | -| Japan | 日本 | -| Singapore | 新加坡 | +| HK | 香港 | +| CN | 中國大陸 | +| US | 美國 | +| EU | 歐元區 | +| JP | 日本 | +| SG | 新加坡 | ## 請求示例 @@ -107,13 +108,11 @@ async fn main() -> Result<(), Box> { "list": [ { "indicator_code": "62267", - "source_org": "Bureau of Labor Statistics", - "country": "United States", + "country": "US", "name": "Non-Farm Payroll", "periodicity": "Monthly", - "category": "Employment", - "importance": 3, - "start_date": 1356998400 + "describe": "Employment situation report...", + "importance": 3 } ] } @@ -143,51 +142,3 @@ async fn main() -> Result<(), Box> { | importance | int | 是 | 重要性(1=低、2=中、3=高) | | start_date | int | 否 | 數據起始日期的 Unix 時間戳 | -### MultiLanguageText - -| 字段 | 類型 | 描述 | -| ---- | ---- | ---- | -| english | string | 英文 | -| simplified_chinese | string | 簡體中文 | -| traditional_chinese | string | 繁體中文 | - ---- - -## macroeconomic_indicators_v2 - - - -v2 版本新增 `keyword` 參數,支持按指標名稱模糊搜索,使用 v2 API 端點。 - -### 參數 - -| 名稱 | 類型 | 必填 | 描述 | -| ---- | ---- | ---- | ---- | -| country | MacroeconomicCountry | 否 | 按國家/地區篩選。不填返回全部。 | -| keyword | string | 否 | 按指標名稱模糊搜索(不區分大小寫) | -| offset | int | 否 | 分頁偏移量,默認 0 | -| limit | int | 否 | 每頁最大條數,默認 100,最大 1000 | - -### 請求示例 - - - - -```python -resp = ctx.macroeconomic_indicators_v2( - country=MacroeconomicCountry.UnitedStates, - keyword="payroll", -) -print(resp) -``` - - - - -```rust -let resp = ctx.macroeconomic_indicators_v2(None, Some("payroll"), None, None).await?; -println!("{:?}", resp); -``` - - - From 4269cab14863c0e5747e06b391a1cee7ae13a398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Sat, 13 Jun 2026 19:54:18 +0800 Subject: [PATCH 19/21] docs(fundamental): remove unmapped v2 fields from MacroeconomicIndicator schema --- .../docs/fundamental/fundamental/macroeconomic-indicators.md | 4 ---- .../docs/fundamental/fundamental/macroeconomic-indicators.md | 4 ---- .../docs/fundamental/fundamental/macroeconomic-indicators.md | 4 ---- 3 files changed, 12 deletions(-) diff --git a/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md index 7ec9240f..24c6eb80 100644 --- a/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/en/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -189,12 +189,8 @@ async fn main() -> Result<(), Box> { | Name | Type | Required | Description | | ---- | ---- | -------- | ----------- | | indicator_code | string | true | Indicator code (use as input to `macroeconomic`) | -| source_org | string | true | Publishing organisation | | country | string | true | Country name | | name | string | true | Indicator name | -| adjustment_factor | string | false | Adjustment factor | | periodicity | string | true | Release periodicity (e.g. `Monthly`, `Quarterly`) | -| category | string | true | Indicator category (e.g. `Employment`, `Inflation`) | | describe | string | true | Indicator description | | importance | int | true | Importance level (1 = Low, 2 = Medium, 3 = High) | -| start_date | int | false | Unix timestamp of data coverage start date | diff --git a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md index d02b2350..7116e5fe 100644 --- a/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/zh-CN/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -132,13 +132,9 @@ async fn main() -> Result<(), Box> { | 字段 | 类型 | 必填 | 描述 | | ---- | ---- | ---- | ---- | | indicator_code | string | 是 | 指标代码(用于 `macroeconomic` 查询) | -| source_org | string | 是 | 发布机构 | | country | string | 是 | 国家/地区名称 | | name | string | 是 | 指标名称 | -| adjustment_factor | string | 否 | 调整因子 | | periodicity | string | 是 | 发布频率(如 `Monthly`、`Quarterly`) | -| category | string | 是 | 指标分类(如 `Employment`、`Inflation`) | | describe | string | 是 | 指标说明 | | importance | int | 是 | 重要性(1=低、2=中、3=高) | -| start_date | int | 否 | 数据起始日期的 Unix 时间戳 | diff --git a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md index 6ae2449e..4d3726a7 100644 --- a/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md +++ b/docs/zh-HK/docs/fundamental/fundamental/macroeconomic-indicators.md @@ -132,13 +132,9 @@ async fn main() -> Result<(), Box> { | 字段 | 類型 | 必填 | 描述 | | ---- | ---- | ---- | ---- | | indicator_code | string | 是 | 指標代碼(用於 `macroeconomic` 查詢) | -| source_org | string | 是 | 發布機構 | | country | string | 是 | 國家/地區名稱 | | name | string | 是 | 指標名稱 | -| adjustment_factor | string | 否 | 調整因子 | | periodicity | string | 是 | 發布頻率(如 `Monthly`、`Quarterly`) | -| category | string | 是 | 指標分類(如 `Employment`、`Inflation`) | | describe | string | 是 | 指標說明 | | importance | int | 是 | 重要性(1=低、2=中、3=高) | -| start_date | int | 否 | 數據起始日期的 Unix 時間戳 | From 8234c1276212cd69c09a440f49dd24805c91e1ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Mon, 15 Jun 2026 10:01:11 +0800 Subject: [PATCH 20/21] docs: remove v2 references from changelog, keep only user-facing keyword change --- docs/en/docs/changelog.md | 2 +- docs/zh-CN/docs/changelog.md | 2 +- docs/zh-HK/docs/changelog.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/docs/changelog.md b/docs/en/docs/changelog.md index 4bfd8dac..a068a3b2 100644 --- a/docs/en/docs/changelog.md +++ b/docs/en/docs/changelog.md @@ -10,7 +10,7 @@ sidebar_icon: newspaper ### SDK v4.3.2 -- **Macroeconomic indicators v2** — `macroeconomic_indicators_v2` adds `keyword` fuzzy search; `macroeconomic_v2` adds `sort` (`asc`/`desc`) parameter; both use the v2 API endpoint +- **`macroeconomic_indicators` adds `keyword` search** — new optional parameter for fuzzy filtering of indicators by name (case-insensitive) ## 2026-06-11 diff --git a/docs/zh-CN/docs/changelog.md b/docs/zh-CN/docs/changelog.md index 93982e9f..7b9c98e2 100644 --- a/docs/zh-CN/docs/changelog.md +++ b/docs/zh-CN/docs/changelog.md @@ -10,7 +10,7 @@ sidebar_icon: newspaper ### SDK v4.3.2 -- **宏观经济数据 v2** — `macroeconomic_indicators_v2` 新增 `keyword` 模糊搜索;`macroeconomic_v2` 新增 `sort` 排序参数(`asc`/`desc`);两个方法均使用 v2 API 端点 +- **`macroeconomic_indicators` 新增 `keyword` 搜索参数** — 可按指标名称模糊筛选(不区分大小写) ## 2026-06-11 diff --git a/docs/zh-HK/docs/changelog.md b/docs/zh-HK/docs/changelog.md index 1a520116..4107ef94 100644 --- a/docs/zh-HK/docs/changelog.md +++ b/docs/zh-HK/docs/changelog.md @@ -10,7 +10,7 @@ sidebar_icon: newspaper ### SDK v4.3.2 -- **宏觀經濟數據 v2** — `macroeconomic_indicators_v2` 新增 `keyword` 模糊搜索;`macroeconomic_v2` 新增 `sort` 排序參數(`asc`/`desc`);兩個方法均使用 v2 API 端點 +- **`macroeconomic_indicators` 新增 `keyword` 搜索參數** — 可按指標名稱模糊篩選(不區分大小寫) ## 2026-06-11 From 26617452ca610690299da70c1c7fc617eb7ce176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=AB=A0=E6=B4=AA?= Date: Mon, 15 Jun 2026 10:37:00 +0800 Subject: [PATCH 21/21] docs: merge SDK v4.3.1 into v4.3.2 changelog entry --- docs/en/docs/changelog.md | 6 +----- docs/zh-CN/docs/changelog.md | 6 +----- docs/zh-HK/docs/changelog.md | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/docs/en/docs/changelog.md b/docs/en/docs/changelog.md index a068a3b2..d894217b 100644 --- a/docs/en/docs/changelog.md +++ b/docs/en/docs/changelog.md @@ -10,14 +10,10 @@ sidebar_icon: newspaper ### SDK v4.3.2 -- **`macroeconomic_indicators` adds `keyword` search** — new optional parameter for fuzzy filtering of indicators by name (case-insensitive) +- **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 ## 2026-06-11 -### SDK v4.3.1 - -- **Macroeconomic indicators** — Two new `FundamentalContext` methods: `macroeconomic_indicators` lists all indicators (filter by country), `macroeconomic` returns historical release data (actual / forecast / previous / revised 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` diff --git a/docs/zh-CN/docs/changelog.md b/docs/zh-CN/docs/changelog.md index 7b9c98e2..b698b48d 100644 --- a/docs/zh-CN/docs/changelog.md +++ b/docs/zh-CN/docs/changelog.md @@ -10,14 +10,10 @@ sidebar_icon: newspaper ### SDK v4.3.2 -- **`macroeconomic_indicators` 新增 `keyword` 搜索参数** — 可按指标名称模糊筛选(不区分大小写) +- **宏观经济数据接口** — 新增两个 `FundamentalContext` 方法:`macroeconomic_indicators` 列出全部指标(支持按国家筛选、关键词搜索),`macroeconomic` 查询指定指标的历史发布数据(实际值/预期值/前值) ## 2026-06-11 -### SDK v4.3.1 - -- **宏观经济数据接口** — 新增两个 `FundamentalContext` 方法:`macroeconomic_indicators` 列出全部指标(支持按国家筛选),`macroeconomic` 查询指定指标的历史发布数据(实际值/预期值/前值/修正值) - ### CLI v0.24.0 - **新增 `macrodata` 命令** — 浏览 400+ 宏观指标(覆盖美/港/中/欧/日/新)并查询历史发布数据;支持 `--country`、`--keyword`、`--lang`、`--start`、`--end`、`--limit`、`--page`、`--format json` diff --git a/docs/zh-HK/docs/changelog.md b/docs/zh-HK/docs/changelog.md index 4107ef94..1f77f157 100644 --- a/docs/zh-HK/docs/changelog.md +++ b/docs/zh-HK/docs/changelog.md @@ -10,14 +10,10 @@ sidebar_icon: newspaper ### SDK v4.3.2 -- **`macroeconomic_indicators` 新增 `keyword` 搜索參數** — 可按指標名稱模糊篩選(不區分大小寫) +- **宏觀經濟數據接口** — 新增兩個 `FundamentalContext` 方法:`macroeconomic_indicators` 列出全部指標(支持按國家篩選、關鍵詞搜索),`macroeconomic` 查詢指定指標的歷史發布數據(實際值/預期值/前值) ## 2026-06-11 -### SDK v4.3.1 - -- **宏觀經濟數據接口** — 新增兩個 `FundamentalContext` 方法:`macroeconomic_indicators` 列出全部指標(支持按國家篩選),`macroeconomic` 查詢指定指標的歷史發布數據(實際值/預期值/前值/修正值) - ### CLI v0.24.0 - **新增 `macrodata` 命令** — 瀏覽 400+ 宏觀指標(覆蓋美/港/中/歐/日/新)並查詢歷史發布數據;支持 `--country`、`--keyword`、`--lang`、`--start`、`--end`、`--limit`、`--page`、`--format json`