宏观指标列表 在线试调 →
宏观指标列表: 代码/名称/分类/数据期数, 支持分类筛选与模糊匹配
接口说明
宏观与市场统计指标清单:国民经济(GDP/社零)、物价(CPI/PPI)、景气(PMI/消费者信心)、外贸能源、债券利率(国债/国开债收益率曲线)、市场资金面(成交额/拥挤度)、美国与海外宏观、指数与基金,共九大类。
category=1..9 分类筛选;keyword 代码/名称模糊(如 CPI)
has_data 标注是否有历史序列(98 指标在供数中)
快速调用
同一调用的三种等价写法,按接入习惯任选其一,复制即可运行。
物价类指标
import top369 as gp
pro = gp.pro_api("sk-xxxxxxxxxxxx") # 安装: pip install top369
df = pro.macro_list(category="2")
print(df.head())
模糊匹配
import top369 as gp
pro = gp.pro_api("sk-xxxxxxxxxxxx") # 安装: pip install top369
df = pro.macro_list(keyword="PMI")
物价类指标
import requests
API = "https://api.369.top/api"
KEY = "sk-xxxxxxxxxxxx"
r = requests.get(f"{API}/macro/list",
headers={"X-API-Key": KEY},
params={"category": "2"},
timeout=30)
r.raise_for_status()
data = r.json()["data"] # 信封解包, 本接口数据在 data["rows"]
模糊匹配
import requests
API = "https://api.369.top/api"
KEY = "sk-xxxxxxxxxxxx"
r = requests.get(f"{API}/macro/list",
headers={"X-API-Key": KEY},
params={"keyword": "PMI"},
timeout=30)
r.raise_for_status()
data = r.json()["data"] # 信封解包, 本接口数据在 data["rows"]
物价类指标
curl -H "X-API-Key: sk-xxxxxxxxxxxx" \ "https://api.369.top/api/macro/list?category=2"
模糊匹配
curl -H "X-API-Key: sk-xxxxxxxxxxxx" \ "https://api.369.top/api/macro/list?keyword=PMI"
输入参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| category | str | 可选 | 分类: 1=国民经济 2=物价 3=景气 4=外贸能源 5=债券航运 6=另类 7=市场资金面 8=美国海外 9=指数基金, 缺省全部 |
| keyword | str | 可选 | 指标代码/名称模糊匹配(如: CPI 或 消费) |
| limit | int | 可选 | 返回条数上限, 默认300(≤1000) |
返回字段
| 名称 | 类型 | 描述 |
|---|---|---|
| total | int | 命中指标总数 |
| rows[].code | str | 指标代码(2_CPI 等, 前缀=分类) |
| rows[].name | str | 指标名称 |
| rows[].category | str | 分类前缀(1..9) |
| rows[].category_name | str | 分类名称 |
| rows[].has_data | bool | 是否有历史序列 |
| rows[].periods | int | 历史期数(无数据=0) |
返回数据样例
{
"total": 6,
"rows": [
{
"code": "2_CGPI",
"name": "企业商品价格指数",
"category": "2",
"category_name": "物价指数",
"has_data": true,
"periods": 114
},
{
"code": "2_CPI",
"name": "居民消费价格指数",
"category": "2",
"category_name": "物价指数",
"has_data": true,
"periods": 133
},
{
"code": "2_PPCI",
"name": "生活资料价格指数",
"category": "2",
"category_name": "物价指数",
"has_data": false,
"periods": 0
}
]
}
样例取自平台数据,rows共 6 条,样例仅展示前 3 条。
最佳实践:先 list 选指标再 series 取序列; 择时常用 2_CPI/2_PPI/3_PMI/1_GDPI 与 5_ 国债收益率族。