Skip to main content
Fund Data API

API reference

Start with the conventions below (auth, envelope, errors, rate limits), then open a specific endpoint. Every sample response in these pages was captured from the live API — not derived from the source code.

Authentication

Paid endpoints authenticate with therequest header Authorization: Bearer <key> — the key stays out of URLs and access logs.

curl "https://api.fundapi.cn/v1/fund-nav?code=110022" \
  -H "Authorization: Bearer YOUR_KEY"
  • Adding ?key= to the URL also works — convenient for quick browser tests, but it ends up in logs. X-API-Key isnot supported and returns 401.
  • An API key is shown in plain text exactly once, at issue time.
  • code is always a 6-digit open-end fund code (e.g. 110022). Passing a stock code returns "not found".
  • The health check GET /health needs no key and consumes no quota — safe to wire into monitoring.

Response envelope

Every endpoint returns the same shape. There is no second format:

{
  "ok": true,
  "endpoint": "fund-nav",
  "tier": "pro",
  "elapsed_ms": 426,
  "data": { }
}
  • ok: true on success. When false, data is null — read error.
  • tier: the tier used for this request.
  • elapsed_ms: server-side time in milliseconds.

⚠️ Business failures still return HTTP 200 withok:false. Always check okbefore the status code.

Error codes

HTTPScenarioerror example (as returned)
200 + ok:falseFund code not found / data source temporarily unavailable查询不到对应数据
401Missing or wrong API key需要 API Key
403Tier too low / UA flagged as a scanner此端点需更高版本,如「此端点需专业版及以上」 / 请求被安全策略拦截
404Endpoint path does not exist端点不存在:/v1/fund-nope
405Method other than GET该端点不支持这种请求方法
422Missing or malformed parameter缺少或不合法的参数:code
429Rate limit / daily quota / concurrency见响应头 Retry-After

The error strings are returned verbatim in Chinese. Parseok and the HTTP status; do not match on the message text.

Rate limits and concurrency

TierLimitNotes
Concurrent connections per IP8Beyond that you get 429; close the connection and retry
No key (anonymous)500 / day, 10 / minuteCounted per IP, free endpoints only (3 of them)
Trialno daily cap, 30 / minuteCounted per API key, 7 days
Prono daily cap, 60 / minuteCounted per API key
Institutionalno daily cap, 300 / minuteCounted per API key
  • 8 concurrent connections is enough for batch work — one request returns tens or hundreds of rows. Do not fan out one request per fund.
  • Over the limit returns 429 with Retry-After; wait that long and retry.
  • Requests must carry a User-Agent. An empty UA, or one matching a scanner signature, gets 403.

Two data flags

FlagMeaning
stale: true + stale_age_sData was returned but it is not fresh (N seconds old). Only appears when the upstream source is failing.
degraded: true + reasonNothing could be returned; retry later.

They are mutually exclusive. stale does not mean the data is wrong — only that it is slightly late. The intraday estimate endpoint never returnsstale: a stale estimate is more misleading than an error.

All endpoints

EndpointNameTier
/v1/fund-searchFund searchFree
/v1/fund-profileFund profileFree
/v1/fund-screener-optionsScreener optionsFree
/v1/fund-navNAV historyTrial
/v1/fund-rankMarket rankingTrial
/v1/fund-noticesFund noticesTrial
/v1/fund-holdingsQuarterly holdingsPro
/v1/fund-managersFund managersPro
/v1/fund-estimateIntraday estimatePro
/v1/fund-dividendsDividends & splitsPro
/v1/fund-trade-ruleTrading rulesPro
/v1/fund-ratingAgency ratingsPro
/v1/fund-overlapHoldings overlapInstitutional
/v1/fund-portfolio-xrayPortfolio look-throughInstitutional
/v1/fund-portfolio-diagnosePortfolio diagnosticsInstitutional
/v1/fund-holding-changesHoldings changesInstitutional
/v1/fund-manager-historyManager historyInstitutional
/v1/fund-compareFund comparisonInstitutional
/v1/fund-screenerMarket screenerInstitutional