Loading...
Loading...
A股基础数据查询。股票列表、公司信息、每日指标(PE/PB/换手率)、更名历史。 当用户询问"茅台公司信息""PE是多少""股票列表""万科更名"时触发。
npx skill4agent add hubblevision/hubble-data-service-skill cn-fundamental所有接口均为 V2 版本()。/api/v2/...
BASE="http://43.167.234.49:3101"
AUTH=(-H "X-API-Key: 123456" -H "Content-Type: application/json")| 规则 | 值 |
|---|---|
| 参数名 | |
| 代码格式 | 带交易所后缀 |
| 日期格式 | |
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | No | |
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | 股票代码(如 |
| string | No | |
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | 股票代码(如 |
| string | No | 交易日期 YYYYMMDD |
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | 股票代码(如 |
# 股票列表
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/symbols?listStatus=L"
# 公司信息
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/company?tsCode=000001.SZ"
# 每日指标(PE/PB/换手率)
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/daily-basic?tsCode=600519.SH&tradeDate=20240115"
# 更名历史
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/name-change?tsCode=000001.SZ"
# 公司信息 + 每日指标并行
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/company?tsCode=600519.SH" &
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/daily-basic?tsCode=600519.SH" &
wait| 错误 | 原因 | 修复 |
|---|---|---|
| 空数据 | | 用 |
| 404 | 端点路径错误 | 不要用 |
| 400 | 日期格式错误 | 用 |