基本面
鉴权
签名方式:每个请求用 App Key / Secret 签名。请求头如下:
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
Authorization | string · header | 必填 | OpenAPI 后台 上的账户 Access Token,作为原始 token 传入(不带 Bearer 前缀),并参与签名计算。 |
X-Api-Key | string · header | 必填 | 你的 App Key。 |
X-Timestamp | string · header | 必填 | 请求时间戳,单位秒(Unix 时间)。 |
X-Api-Signature | string · header | 必填 | HMAC-SHA256 签名。格式:HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=。 |
列出 Longbridge 支持的宏观经济指标,可按国家/地区筛选。
# List all indicators
longbridge macrodata
# Filter by US indicators
longbridge macrodata --country US
请求
查询参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
country | string | 可选 | 按国家筛选。省略则返回所有国家。 |
keyword | string | 可选 | 按指标名称模糊搜索(不区分大小写) |
offset | integer | 可选 | 分页偏移量。默认:0 |
limit | integer | 可选 | 每页最大记录数。默认:100,最大:1000 |
响应
响应字段
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
indicator | object | 必填 | 指标详情 |
indicator.indicator_id | integer | 可选 | 指标 ID |
indicator.indicator_name | string | 可选 | 指标名称 |
indicator.unit | string | 可选 | 数值单位 |
indicator.description | string | 可选 | 指标描述 |
indicator.market | string | 可选 | 市场/国家代码 |
indicator.frequence | string | 可选 | 发布频率,如 `day`、`month` |
indicator.importance | integer | 可选 | 重要程度(1=低,2=中,3=高) |
indicator.indicator_data | object[] | 可选 | 时间序列数据点 |
indicator.indicator_data[].actual_data | string | 可选 | 实际值 |
indicator.indicator_data[].previous_data | string | 可选 | 前值 |
indicator.indicator_data[].estimated_data | string | 可选 | 预期值 |
indicator.indicator_data[].published_time | string | 可选 | 发布时间(ISO 8601) |
indicator.indicator_data[].observation_date | string | 可选 | 观测日期(YYYY-MM-DD) |
total | integer | 可选 | 匹配的指标总数 |
响应 JSON 示例
{
"count": 619,
"list": [
{
"indicator_code": "61744",
"country": "US",
"name": "Non-Farm Payroll",
"periodicity": "Monthly",
"describe": "Employment situation report...",
"importance": 3
}
]
}错误码
参见错误码文档。