跳到主要内容

基金净值与收益

基金净值

GET /api/fund/performance/nav

operation_idget_fund_performance_nav

请求参数

参数类型必需默认值说明
fund_typestringotc(场外基金)/ exchange(ETF、LOF)/ reits(公募 REITs)。
thscodestring完整基金 thscode,必须保留市场后缀。
rangestring最新一条week / month / tmonth / hyear / year / twoyear / tyear / fyear
nav_typestringunit,adjunit(单位净值)/ adj(复权净值)/ unit,adj(同时返回)。

不传 range 时最多返回最新一个净值日期;传入后按 nav_date 升序返回区间序列。 unit_nav 为单位净值,adj_nav 为复权净值,复权净值不等同于累计净值。

curl 'https://fuyao.aicubes.cn/api/fund/performance/nav?fund_type=exchange&thscode=510300.SH&range=year&nav_type=unit' \
-H 'X-api-key: <your-api-key>'

响应示例

{
"code": 0,
"message": "success",
"request_id": "97634b0fbf4746afaa32e8a71adbd636",
"data": {
"timestamp": 1784131200000,
"item": [
{
"nav_date": 1752595200000,
"unit_nav": 4.0713
},
{
"nav_date": 1752681600000,
"unit_nav": 4.1015
}
]
}
}

返回字段

data.item[] 字段:

字段类型说明
nav_datelong净值日期,毫秒级 Unix 时间戳。
unit_navnumber单位净值;未通过 nav_type 请求时不输出。
adj_navnumber复权净值;未通过 nav_type 请求时不输出,不等同于累计净值。

基金区间收益

GET /api/fund/performance/returns

operation_idget_fund_performance_returns

请求参数

参数类型必需默认值说明
fund_typestringotc(场外基金)/ exchange(ETF、LOF)/ reits(公募 REITs)。
thscodestring完整基金 thscode,必须保留市场后缀。
curl 'https://fuyao.aicubes.cn/api/fund/performance/returns?fund_type=exchange&thscode=510300.SH' \
-H 'X-api-key: <your-api-key>'

响应示例

{
"code": 0,
"message": "success",
"request_id": "61cb2a8b9340483aaf00e36748f77918",
"data": {
"timestamp": 0,
"item": [
{
"return_month": -3.33,
"return_tmonth": 0.03,
"return_hyear": 0.19,
"return_year": 19.66,
"return_tyear": 28.69,
"return_fyear": 1.77,
"return_nowyear": 2.49,
"return_now": 121.58
}
]
}
}

返回字段

data.item[] 字段:

字段类型说明
return_monthnumber近一月收益率,百分数原值。
return_tmonthnumber近三月收益率,百分数原值。
return_hyearnumber近半年收益率,百分数原值。
return_yearnumber近一年收益率,百分数原值。
return_tyearnumber近三年收益率,百分数原值。
return_fyearnumber近五年收益率,百分数原值。
return_nowyearnumber今年以来收益率,百分数原值。
return_nownumber成立以来收益率,百分数原值。

通用参数与错误码参见基金 API 总览