跳到主要内容
基金数据 API

组合穿透

/v1/fund-portfolio-xray机构版

传入基金代码与权重,把整篮子穿透到个股层面:每只股票的综合权重、由哪几只基金贡献、覆盖了多少净值。机构版可用。

回答的问题:我这一篮子基金合起来,实际买的是哪些股票、各占多少?

请求参数

参数必填类型默认说明
codes✅string—基金代码,逗号分隔,如 110022,009265
weights✅string—与 codes 一一对应的权重,逗号分隔,如 0.6,0.4(也接受 60,40)

响应字段

字段类型说明
funds[]array参与计算的基金:code / weight
report_periodstring报告期
coveragestring覆盖范围,top10
stock_countint穿透后的股票只数
covered_weight_pctnumber穿透覆盖了多少基金净值(%)
stocks[]array个股明细,见下
stocks[].code / namestring股票代码 / 名称
stocks[].xray_weight_pctnumber该股在你整个组合里的综合权重(%)
stocks[].fund_countint有几只基金持有它
stocks[].via[]array来源拆解:code / weight / nav_ratio / contrib_pct(该基金贡献了多少)

真实响应样例

用 110022 实抓的真实响应。列表类字段已截短以便阅读(原始响应更完整); 其中的 elapsed_ms 是某一次的耗时,首次请求通常 1–3 秒。

{
  "ok": true,
  "endpoint": "fund-portfolio-xray",
  "tier": "institutional",
  "elapsed_ms": 13271,
  "data": {
    "funds": [
      {
        "code": "110022",
        "weight": 0.6
      },
      {
        "code": "009265",
        "weight": 0.4
      }
    ],
    "report_period": [
      "2026年3季度"
    ],
    "coverage": "top10",
    "stock_count": 14,
    "covered_weight_pct": 68.602,
    "stocks": [
      {
        "code": "600519",
        "name": "贵州茅台",
        "xray_weight_pct": 9.904,
        "via": [
          {
            "code": "110022",
            "weight": 0.6,
            "nav_ratio": "9.96%",
            "contrib_pct": 5.976
          },
          {
            "code": "009265",
            "weight": 0.4,
            "nav_ratio": "9.82%",
            "contrib_pct": 3.928
          }
        ],
        "fund_count": 2
      },
      {
        "code": "000333",
        "name": "美的集团",
        "xray_weight_pct": 8.048,
        "via": [
          {
            "code": "110022",
            "weight": 0.6,
            "nav_ratio": "9.48%",
            "contrib_pct": 5.688
          },
          {
            "code": "009265",
            "weight": 0.4,
            "nav_ratio": "5.90%",
            "contrib_pct": 2.36
          }
        ],
        "fund_count": 2
      },
      {
        "code": "600809",
        "name": "山西汾酒",
        "xray_weight_pct": 7.004,
        "via": [
          {
            "code": "110022",
            "weight": 0.6,
            "nav_ratio": "8.62%",
            "contrib_pct": 5.172
          },
          {
            "code": "009265",
            "weight": 0.4,
            "nav_ratio": "4.58%",
            "contrib_pct": 1.832
          }
        ],
        "fund_count": 2
      }
    ],
    "method": "fund_weight * nav_ratio,基于季报前 10 大重仓股",
    "note": "⚠️ 这是**计算值**,不是数据源的原始数据。`covered_weight_pct` 只覆盖前 10 大重仓股,⛔ 不等于组合总仓位;季报之外的持仓(第 11 名及以后)不在计算范围内。"
  }
}

调用示例

curl "https://api.fundapi.cn/v1/fund-portfolio-xray?code=110022" \
  -H "Authorization: Bearer 你的API Key" \
  -H "User-Agent: your-app"

注意

`covered_weight_pct` 不到 100 是正常的

只穿透前十大重仓股,剩余仓位不在其中。示例组合覆盖 68.6%。⛔ 不要按 100% 凑满。

`xray_weight_pct` 已经是组合层面的统计

它等于「基金权重 × 该股占基金净值比」再跨基金求和。直接用这个数,⛔ 不要自己再乘一次权重。