{"_id":"@cxxgo/fund-valuation-query","_rev":"10-23ab2cfde06aafd103882d8e0ee5aa73","name":"@cxxgo/fund-valuation-query","dist-tags":{"latest":"1.0.8"},"versions":{"1.0.4":{"name":"@cxxgo/fund-valuation-query","version":"1.0.4","keywords":[],"author":"","license":"ISC","_id":"@cxxgo/fund-valuation-query@1.0.4","maintainers":[{"name":"candy252324","email":"1964646121@qq.com"}],"homepage":"https://github.com/cxxgo/fund-valuation-query#readme","bugs":{"url":"https://github.com/cxxgo/fund-valuation-query/issues"},"bin":{"fund":"dist/fund.js"},"dist":{"shasum":"482c13dcf048a6e0e1137139642ef7ccdfca1d68","tarball":"https://registry.npmjs.org/@cxxgo/fund-valuation-query/-/fund-valuation-query-1.0.4.tgz","fileCount":3,"integrity":"sha512-EWpO8PTGQt6PkgzZl+oSFjVD7PqcgQKwMjyLYjRmgGNf2Xi2voH6wQphGDQJoxFrigD6v2AY7FEEKvIMyIzqkg==","signatures":[{"sig":"MEUCIB84OE5tSuaeyz5L370QHnj7yo553FItkkLHaUeSFgOYAiEAihQfJulT5GDzaYK98ktQWdL1WC1jFkemuYOZvK1lpk0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35189},"type":"module","gitHead":"275e2742d77e99f110ec6dd359fee68b51190fe1","scripts":{"build":"node scripts/build.js","start":"node dist/fund.js serve","publish":"npm publish","release:major":"npm version major && git push && git push --tags && npm publish","release:minor":"npm version minor && git push && git push --tags && npm publish","release:patch":"npm version patch && git push && git push --tags && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"candy252324","email":"1964646121@qq.com"},"repository":{"url":"git+https://github.com/cxxgo/fund-valuation-query.git","type":"git"},"_npmVersion":"10.9.2","description":"基金实时估值查询 CLI 工具，根据持仓股票行情估算基金涨跌幅","directories":{},"_nodeVersion":"22.16.0","dependencies":{"axios":"^1.9.0","chalk":"^5.3.0","cheerio":"^1.0.0","express":"^4.21.0","commander":"^12.1.0","cli-table3":"^0.6.5"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.25.12"},"_npmOperationalInternal":{"tmp":"tmp/fund-valuation-query_1.0.4_1778224638647_0.6953470247141764","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@cxxgo/fund-valuation-query","version":"1.0.5","keywords":[],"author":"","license":"ISC","_id":"@cxxgo/fund-valuation-query@1.0.5","maintainers":[{"name":"candy252324","email":"1964646121@qq.com"}],"homepage":"https://github.com/cxxgo/fund-valuation-query#readme","bugs":{"url":"https://github.com/cxxgo/fund-valuation-query/issues"},"bin":{"fund":"dist/fund.js"},"dist":{"shasum":"a51390487f297ca005a77ae652041f5945deed7b","tarball":"https://registry.npmjs.org/@cxxgo/fund-valuation-query/-/fund-valuation-query-1.0.5.tgz","fileCount":3,"integrity":"sha512-julqikPbRkc6bIGx0qCVpwQkfta+U/Ec5J6hM3/SToFkUe/O/2FMa+Gka6Jt8OxiHGLfc7nvVO6qP5PYnqkC7A==","signatures":[{"sig":"MEYCIQDGWLrhqGXWyuP+NeFy2yrrIrJ04QgIkGgey4XKVEvQ6AIhAJnps9L2DUqkYrkkIyBnMMW6LWxgedq4kN6DrPK7HW78","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60667},"type":"module","gitHead":"3175f2eaf5c34f72310ca44feb0e76d0a210b4ea","scripts":{"build":"node scripts/build.js","start":"node dist/fund.js serve","publish":"npm publish","release:major":"npm version major && git push && git push --tags && npm publish","release:minor":"npm version minor && git push && git push --tags && npm publish","release:patch":"npm version patch && git push && git push --tags && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"candy252324","email":"1964646121@qq.com"},"repository":{"url":"git+https://github.com/cxxgo/fund-valuation-query.git","type":"git"},"_npmVersion":"10.9.2","description":"基金实时估值查询 CLI 工具，根据持仓股票行情估算基金涨跌幅","directories":{},"_nodeVersion":"22.16.0","dependencies":{"axios":"^1.9.0","chalk":"^5.3.0","cheerio":"^1.0.0","express":"^4.21.0","commander":"^12.1.0","cli-table3":"^0.6.5"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.25.12"},"_npmOperationalInternal":{"tmp":"tmp/fund-valuation-query_1.0.5_1778486159072_0.19565162752997356","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@cxxgo/fund-valuation-query","version":"1.0.6","keywords":[],"author":"","license":"ISC","_id":"@cxxgo/fund-valuation-query@1.0.6","maintainers":[{"name":"candy252324","email":"1964646121@qq.com"}],"homepage":"https://github.com/cxxgo/fund-valuation-query#readme","bugs":{"url":"https://github.com/cxxgo/fund-valuation-query/issues"},"bin":{"fund":"dist/fund.js"},"dist":{"shasum":"b5d23fe3883a9a621923a095d0adf82ba4e06205","tarball":"https://registry.npmjs.org/@cxxgo/fund-valuation-query/-/fund-valuation-query-1.0.6.tgz","fileCount":3,"integrity":"sha512-nQHElcM80xKehXct3H+lxqXOxwgYo2M6yxEB1aRMS7e+CyPmLUrnwKPgx6fqclrFRwPf+DplIWVcszizuOnqKw==","signatures":[{"sig":"MEYCIQDP5/80zrmZzVyfyvxomQiyex3cFRvsBZf1xU0m/9x0kAIhAMbaZESf5RUlvegWm4znOK9s+I2F9YqjJaBJ49c9Mnn4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61794},"type":"module","gitHead":"39524f978372ad398ad23642bd09a83f81fe664d","scripts":{"build":"node scripts/build.js","start":"node dist/fund.js serve","publish":"npm publish","release:major":"npm version major && git push && git push --tags && npm publish","release:minor":"npm version minor && git push && git push --tags && npm publish","release:patch":"npm version patch && git push && git push --tags && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"candy252324","email":"1964646121@qq.com"},"repository":{"url":"git+https://github.com/cxxgo/fund-valuation-query.git","type":"git"},"_npmVersion":"10.9.2","description":"基金实时估值查询 CLI 工具，根据持仓股票行情估算基金涨跌幅","directories":{},"_nodeVersion":"22.16.0","dependencies":{"axios":"^1.9.0","chalk":"^5.3.0","cheerio":"^1.0.0","express":"^4.21.0","commander":"^12.1.0","cli-table3":"^0.6.5"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.25.12"},"_npmOperationalInternal":{"tmp":"tmp/fund-valuation-query_1.0.6_1778488375820_0.09425767176982869","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@cxxgo/fund-valuation-query","version":"1.0.7","keywords":[],"author":"","license":"ISC","_id":"@cxxgo/fund-valuation-query@1.0.7","maintainers":[{"name":"candy252324","email":"1964646121@qq.com"}],"homepage":"https://github.com/cxxgo/fund-valuation-query#readme","bugs":{"url":"https://github.com/cxxgo/fund-valuation-query/issues"},"bin":{"fund":"dist/fund.js"},"dist":{"shasum":"4922145ed518f2b1b01f4430bc6bc8f2e8965a64","tarball":"https://registry.npmjs.org/@cxxgo/fund-valuation-query/-/fund-valuation-query-1.0.7.tgz","fileCount":3,"integrity":"sha512-Rjb7UHNqcbkaWQk2N/acdfWHJnFn6utrNqIJaBp2I2Zpz3P8gdTCEDgWQILgMbcBAuQI7GJF0F6k9ADJsPZUFA==","signatures":[{"sig":"MEUCIQCjeWOJWzwZO9ytSp8f363Wq42FphJvUhXHMzjqZMlpAwIgLjLl4zY9ruUt15j+eummruOid0pKCT6nWe8kVRAUETg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61951},"type":"module","gitHead":"30fd75ae76a5e40dc3fc259ba6326f70c79166c2","scripts":{"build":"node scripts/build.js","start":"node dist/fund.js serve","publish":"npm publish","release:major":"npm version major && git push && git push --tags && npm publish","release:minor":"npm version minor && git push && git push --tags && npm publish","release:patch":"npm version patch && git push && git push --tags && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"candy252324","email":"1964646121@qq.com"},"repository":{"url":"git+https://github.com/cxxgo/fund-valuation-query.git","type":"git"},"_npmVersion":"10.9.2","description":"基金实时估值查询 CLI 工具，根据持仓股票行情估算基金涨跌幅","directories":{},"_nodeVersion":"22.16.0","dependencies":{"axios":"^1.9.0","chalk":"^5.3.0","cheerio":"^1.0.0","express":"^4.21.0","commander":"^12.1.0","cli-table3":"^0.6.5"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.25.12"},"_npmOperationalInternal":{"tmp":"tmp/fund-valuation-query_1.0.7_1778552237932_0.6461865854582929","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"@cxxgo/fund-valuation-query","version":"1.0.8","type":"module","bin":{"fund":"dist/fund.js"},"scripts":{"start":"node dist/fund.js serve","build":"node scripts/build.js","prepublishOnly":"npm run build","publish":"npm publish","release:patch":"npm version patch && git push && git push --tags && npm publish","release:minor":"npm version minor && git push && git push --tags && npm publish","release:major":"npm version major && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/cxxgo/fund-valuation-query.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/cxxgo/fund-valuation-query/issues"},"homepage":"https://github.com/cxxgo/fund-valuation-query#readme","description":"基金实时估值查询 CLI 工具，根据持仓股票行情估算基金涨跌幅","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"devDependencies":{"esbuild":"^0.25.12"},"dependencies":{"axios":"^1.9.0","chalk":"^5.3.0","cheerio":"^1.0.0","cli-table3":"^0.6.5","commander":"^12.1.0","express":"^4.21.0"},"_id":"@cxxgo/fund-valuation-query@1.0.8","gitHead":"4324290826b514132fbdd9a6da867fb69fd2136a","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Rj1bE/yebKxPArhP3jQyDu2Ig5hjFSfgIuu4/peg+0AdZncKsxIM3jPeA2hs9OlSrx94rf/XAJK9PRep9rg+TQ==","shasum":"833147ab40b4d700dd40002335d910d25918088c","tarball":"https://registry.npmjs.org/@cxxgo/fund-valuation-query/-/fund-valuation-query-1.0.8.tgz","fileCount":3,"unpackedSize":62440,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD1/ziOOPXeZ0QI9nU2Y37dIxKMdC8JzcbGX0fG7E155wIgNlSWr/EMAp+qjo7xCD6fPZ83qEWUmrfqwuXsrwuaxek="}]},"_npmUser":{"name":"candy252324","email":"1964646121@qq.com"},"directories":{},"maintainers":[{"name":"candy252324","email":"1964646121@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fund-valuation-query_1.0.8_1787018314254_0.882542013196977"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-08T07:17:18.530Z","modified":"2026-08-18T01:58:34.586Z","1.0.0":"2026-05-07T06:28:35.355Z","1.0.1":"2026-05-07T06:44:28.873Z","1.0.4":"2026-05-08T07:17:18.763Z","1.0.5":"2026-05-11T07:55:59.187Z","1.0.6":"2026-05-11T08:32:55.952Z","1.0.7":"2026-05-12T02:17:18.056Z","1.0.8":"2026-08-18T01:58:34.399Z"},"bugs":{"url":"https://github.com/cxxgo/fund-valuation-query/issues"},"license":"ISC","homepage":"https://github.com/cxxgo/fund-valuation-query#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/cxxgo/fund-valuation-query.git"},"description":"基金实时估值查询 CLI 工具，根据持仓股票行情估算基金涨跌幅","maintainers":[{"name":"candy252324","email":"1964646121@qq.com"}],"readme":"# fund-valuation-query\n\n基金实时估值查询 CLI 工具。根据基金持仓股票的实时行情，展示基金最近一个收盘交易日表现和盘中估值。\n\n## 原理\n\n1. 从东方财富获取基金最新报告期持仓数据（股票代码、名称、持仓占比）\n2. 从腾讯行情 API 获取持仓股票的实时涨跌幅\n3. 从基金估值接口获取基金盘中估值\n4. 从历史日线接口回溯最近一个已收盘交易日的涨跌\n\n## 核心口径\n\n### 主表\n\n- `净值`：使用基金净值接口返回的最近一个净值日涨跌幅，拿不到则显示 `-`。\n- `估值`：使用基金估值接口返回的涨跌幅。只要估值日期仍是对应市场的当天就展示，拿不到或日期不匹配时显示 `-`。\n\n### 明细\n\n- `收盘`：每只持仓股票“最近一个已收盘交易日”的日涨跌幅。展示规则：如果当前市场已经收盘，则展示最新收盘日；如果当前仍在交易中，则展示今天之前最近一个已收盘交易日。拿不到历史日线就直接显示 `-`。\n- `盘中`：表示持仓股票当前交易日的实时涨跌幅。只要行情数据日期仍是对应市场的当天就展示；但如果当日收盘涨跌已经可用，为避免和 `收盘` 重复，则这里显示 `-`。\n- `权重估值`：按“当前拿到盘中数据的持仓”做持仓占比加权汇总。\n- `覆盖`：当前拿到有效盘中数据的持仓权重占比。只有覆盖率达到 `60%` 时才展示 `权重估值`，否则显示 `-`。\n- `明细刷新`：只刷新当前基金持仓股的盘中价格，不刷新持仓结构；持仓结构按天缓存。\n\n## 安装\n\n```bash\nnpm i @cxxgo/fund-valuation-query -g\n```\n\n## 使用\n\n### 列出所有基金估值\n\n```bash\nfund list\n```\n\n按今日涨跌降序展示。\n\n### 查看单只基金持仓详情\n\n```bash\nfund detail <基金代码>\n```\n\n展示该基金最新报告期持仓股票及各自最近收盘、盘中涨跌。\n\n### Web 服务\n\n```bash\n# 启动 Web 服务，默认端口 8888\nfund serve\n\n# 指定端口\nfund serve -p 8080\n\n# 或通过环境变量\nPORT=8080 fund serve\n```\n\n启动后访问 `http://localhost:8888` 即可使用可视化界面，功能包括：\n\n- 首次访问需选择配置文件（上传 JSON 文件或粘贴内容），配置保存在浏览器 localStorage\n- 点击表头按基金代码、名称、上个交易日、估值排序\n- 点击基金名称，右侧抽屉展开持仓明细\n- 抽屉内支持按占比、盘中/收盘排序\n- 手动刷新按钮 + 30 秒自动刷新\n- 切换配置按钮可重新选择配置文件\n\n### 配置文件\n\n```bash\n# 设置配置文件路径\nfund config /path/to/fund.config.json\n\n# 查看当前配置文件路径\nfund config\n```\n\n配置文件为 JSON 格式，key 为基金代码，value 为基金名称：\n\n```json\n{\n  \"000001\": \"示例基金A\",\n  \"000002\": \"示例基金B\"\n}\n```\n\n配置文件路径保存在 `~/.fundrc.json` 中。\n\n## 技术栈\n\n- **数据源**：东方财富（持仓/净值）、天天基金（基金估值）、腾讯行情（实时股价）、Nasdaq（美股/ADR 历史日线）\n- **CLI**：Commander.js + cli-table3 + chalk\n- **Web**：Express 内嵌 HTML/JS/CSS\n- **HTML 解析**：cheerio\n- **HTTP**：axios\n\n## License\n\nISC\n","readmeFilename":"README.md"}