基金估值跟踪 API 接入文档fund
基金估值跟踪,一接口聚合「基金实时估值 / 指数行情 / 基金详情 / 全部常用指数批量」4 大功能,覆盖国内基金 + A 股核心指数。 基于天天基金、新浪财经、东方财富三路上游,无需注册即可调用: • action=estimate — 基金实时估值(盘中每分钟更新,含单位净值、估算净值、估算涨跌幅、上次净值日期) • action=index — 单个指数行情(新浪主、东方财富备双通道容灾,含当前点位、涨跌点、涨跌幅) • action=info — 基金详细信息(名称、净值、累计净值、近 1 月/3 月/6 月/1 年/3 年/成立来收益、基金类型、风险等级、规模、基金经理、成立日、管理人) • action=indices — 6 个常用指数批量(上证、深证成指、创业板、上证 50、沪深 300、中证 500) 本接口已修复源码中「新浪通道缺 sh/sz 前缀」的 bug,并优化了 HTML 爬虫的容错。
1. 基本信息
| 接口地址 | https://v1.apizero.cn/api/fund |
|---|---|
| 请求方法 | GET |
| 分类 | finance |
| 提供方 | 极数本源 |
| 计费模式 | 免费试用 |
| 单次消耗 | 0 积分 |
| 起步价 | — |
| QPS 限制 | 5 req/s |
| 每日免费额度 | 200 次(已认证用户) |
| 匿名每日额度 | 50 次(无 API Key) |
| VIP 免费 | 否 |
| 调用次数 |
2. 认证
匿名每日 50 次、QPS 2;登录用户每日 200 次、QPS 5(全部免费)。盘中数据已内置 30~60 秒缓存,info 详情缓存 6 小时。
获取 API Key:登录 https://apizero.cn/account/keys
3. 请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
action | string | 是 | 操作类型:estimate=基金估值 / index=单个指数 / info=基金详情 / indices=全部常用指数 | estimate |
code | string | 否 | 基金或指数代码(6 位数字);当 action 为 estimate/index/info 时必填,indices 时不需要 | 005827 |
4. 请求头
| Header | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
Authorization | string | 否 | API Key 鉴权头,格式 Bearer sk_live_xxx;匿名调用时可省略(每日 50 次免费) | Bearer sk_live_xxxxxxxxxxxxxx |
5. 请求示例
以下 5 种语言示例都是可直接运行的,只需把 YOUR_API_KEY 替换为实际 Key。
cURL
curl "https://v1.apizero.cn/api/fund?action=estimate&code=005827&key=YOUR_API_KEY"Python
import requests
resp = requests.get(
"https://v1.apizero.cn/api/fund",
params={
"action": "estimate",
"code": "005827",
"key": "YOUR_API_KEY",
},
timeout=15,
)
resp.raise_for_status()
print(resp.json())JavaScript (Node.js)
// Node.js 18+ / 浏览器原生 fetch
const params = new URLSearchParams({
"action": "estimate",
"code": "005827",
"key": "YOUR_API_KEY",
});
const res = await fetch(`https://v1.apizero.cn/api/fund?${params}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://v1.apizero.cn/api/fund", nil)
q := req.URL.Query()
q.Set("action", "estimate")
q.Set("code", "005827")
q.Set("key", "YOUR_API_KEY")
req.URL.RawQuery = q.Encode()
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}PHP
<?php
$url = "https://v1.apizero.cn/api/fund?" . http_build_query([
"action" => "estimate",
"code" => "005827",
"key" => "YOUR_API_KEY",
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
$body = curl_exec($ch);
curl_close($ch);
$data = json_decode($body, true);
print_r($data);6. 响应字段
| 字段 | 类型 | 说明 | 示例 |
|---|---|---|---|
action | string | 回传的 action 标识(estimate/index/info/indices) | — |
fund_code | string | 基金代码(estimate/info) | — |
fund_name | string | 基金名称(estimate/info) | — |
net_value | number | 单位净值(estimate/info) | — |
estimate | number | 估算净值(estimate;盘中每分钟更新) | — |
change_rate | number|string | 估算涨跌幅 % 或字符串带 % (estimate=number / index/info=string) | — |
nav_date | string | 上次净值日期 YYYY-MM-DD(estimate) | — |
update_time | string | 估值更新时间(estimate) | — |
index_code | string | 指数代码(index) | — |
index_name | string | 指数名称(index) | — |
current_value | number | 当前点位(index) | — |
change_amount | number | 涨跌点(index) | — |
source | string | 数据源:sina / eastmoney(index) | — |
total_net_value | number | 累计净值(info) | — |
return_1m | string | 近 1 月收益(info) | — |
return_3m | string | 近 3 月收益(info) | — |
return_6m | string | 近 6 月收益(info) | — |
return_1y | string | 近 1 年收益(info) | — |
return_3y | string | 近 3 年收益(info) | — |
return_total | string | 成立来收益(info) | — |
fund_type | string | 基金类型,如「混合型-偏股」(info) | — |
risk_level | string | 风险等级(info) | — |
fund_scale | string | 基金规模,如「267.93亿元」(info) | — |
fund_manager | string | 基金经理(info) | — |
establish_date | string | 成立日期 YYYY-MM-DD(info) | — |
company | string | 管理公司(info) | — |
count | number | 指数总数(indices;当前固定 6) | — |
list | array | 指数列表(indices;元素结构同 index 返回) | — |
7. 响应示例
{
"code": 0,
"msg": "成功",
"data": {
"action": "estimate",
"fund_code": "005827",
"fund_name": "易方达蓝筹精选混合",
"nav_date": "2026-04-30",
"net_value": 1.7393,
"estimate": 1.727,
"change_rate": -0.71,
"update_time": "2026-05-06 15:00"
},
"request_id": "abc123def456"
}8. 错误码
| code | status | 说明 |
|---|---|---|
4000 | — | 参数错误:action 非法 / code 非 6 位数字 / 缺少必填参数等 |
4015 | — | 匿名调用每日额度用完,需要 API Key |
4029 | — | QPS 超限 |
4030 | — | 今日额度用完 |
5020 | — | 上游不可用 / 基金代码不存在 / 非交易时段无估值数据 |
9. 变更日志
- 1.0.0(2026-05-06)
- 首次上线,聚合基金估值/指数行情/基金详情/批量指数 4 个 action
- 修复源码新浪通道缺 sh/sz 前缀的 bug(创业板等深证指数原本无法走主通道)
- 修复 HTML 爬虫的成立日 + 管理人 regex(源码 regex 不识别 </span> 拦截)
- 内建分级缓存:实时数据 30-60 秒、详情 6 小时
- 上游异常时单个指数失败不阻塞批量返回(indices)
常见问题
基金估值跟踪 接口怎么免费使用?
未登录用户每个 IP 每天 50 次免费。登录用户创建 API Key 后每天 200 次免费,超额部分按点数计费(0 点/次)。
基金估值跟踪 支持哪些调用方式?
接口使用 GET 请求。文档提供 cURL、Python、JavaScript (Node.js)、Go、PHP 五种语言的可运行示例。也可以下载 /openapi.json 导入 Postman / Insomnia / Apifox 反向生成 SDK。
调用不限额么? QPS 是多少?
本接口 QPS 限制 5 req/s,每个 API Key 每日免费 200 次。需要更高额度可升级 VIP 套餐或联系售后提高 QPS。
这个接口跟自己直连上游有什么区别?
极数本源 作为中间层提供:统一鉴权(一个 Key 调所有接口)、统一计费(点数制)、统一限流、统一错误码、多上游自动切换。免去逐个对接上游、维护 Key、统计调用量的运维成本。