Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Fund Peek · 基金一瞥New to Visual Studio Code? Get it now.
Fund Peek · 基金一瞥

Fund Peek · 基金一瞥

Fund Peek

|
1 install
| (0) | Free
Peek at local mutual-fund holdings and returns without leaving VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Fund Peek · 基金一瞥

在 VS Code 状态栏和原生侧栏里查看基金持仓收益,不用解锁手机,也不需要登录基金账户。

Fund Peek shows locally entered mutual-fund holdings and returns in the VS Code status bar and a native sidebar—without a fund-account login.

功能 / Features

  • 状态栏显示今日收益;悬停查看持仓市值、今日收益、累计收益和数据时间。

  • 原生 Tree View 展示组合概览及每只基金,不使用 Webview。

  • 盘中优先显示估算净值,缺失时回退到正式净值;两者始终明确标注。

  • 交易日 9:30–11:30、13:00–15:00(北京时间)默认每 10 分钟批量刷新;其他时间不运行周期定时器。

  • 行情失败时继续显示加密缓存,并明确标记“陈旧”,不会把缺失行情显示成 0。

  • 持仓和含基金代码的行情缓存使用 VS Code SecretStorage;无遥测、无账户、无云同步。

  • 隐私模式会隐藏金额、暂停网络请求,并在重启后保持。

  • 简体中文界面,英文回退。

  • Today's profit in the status bar; hover for market value, daily/total profit, and data time.

  • Native Tree View portfolio—no Webview.

  • Intraday estimates when available, confirmed NAV fallback otherwise, always labeled.

  • Batched refresh every 10 minutes during mainland China weekday sessions; no periodic polling outside those hours.

  • Cache-first recovery with visible stale labels; missing data is never treated as zero.

  • Holdings and code-bearing quote cache use VS Code SecretStorage; no telemetry, account, or cloud sync.

  • Persistent privacy mode hides amounts and pauses all quote requests.

  • Simplified Chinese UI with English fallback.

使用方法 / Usage

  1. 点击活动栏中的折线图图标,或运行 Fund Peek: Add Holding。
  2. 输入 6 位基金代码、持有份额、每份平均成本和可选别名。
  3. 确认解析出的基金名称后保存。
  4. 点击状态栏收益可随时打开持仓侧栏。

Use the Activity Bar icon or run Fund Peek: Add Holding, enter a six-digit fund code, shares, per-share average cost, and an optional alias, then verify the resolved fund name before saving.

同一基金再次添加时,份额会合并,平均成本按成本金额加权计算。v1 记录的是当前持仓快照,不维护交易流水。

Adding the same code again combines shares using a cost-basis-weighted average. Version 1 stores a current position snapshot, not a transaction ledger.

支持范围 / Scope

首版面向以人民币单位净值计价的中国场外公募基金,包括普通人民币 QDII。它不提供交易所 ETF/LOF 行情、货币基金万份收益或美元份额的专用计算模型。

Version 1 targets RMB-denominated Chinese OTC mutual funds using unit NAV, including ordinary RMB QDII funds. It does not implement exchange-price models for ETF/LOF products, money-market per-10,000-unit yields, or USD share classes.

Desktop VS Code on macOS, Windows, and Linux is supported. The extension declares extensionKind: ["ui"], so it keeps holdings on the local VS Code side during SSH, WSL, and Dev Container sessions. vscode.dev, github.dev, Cursor, and Open VSX are not supported targets for v1.

行情、刷新与计算 / Data, refresh, and calculations

Fund Peek currently requests:

  • Batch valuation: https://fundcomapi.tiantianfunds.com/mm/newCore/FundValuationLast
  • Confirmed NAV history fallback: https://api.fund.eastmoney.com/f10/lsjz

These are third-party, undocumented endpoints and may change or become unavailable. Fund Peek does not silently switch to an unrelated provider.

Fund Peek is an independent open-source project and is not affiliated with, endorsed by, or sponsored by Eastmoney or Tiantian Fund.

发送到行情服务的内容只有基金代码;持有份额、成本、别名、市值与收益不会发送。开启隐私模式时不会发出行情请求。详见 PRIVACY.md。

Only requested fund codes are sent to the quote provider. Shares, costs, aliases, market values, and profits stay local. Privacy mode sends no quote requests. See PRIVACY.md.

Calculations use full-precision numbers and round only for display:

  • Estimated daily profit = shares × (estimated NAV − latest confirmed NAV)
  • Confirmed daily profit = shares × (latest confirmed NAV − prior confirmed NAV)
  • Total profit = shares × (current displayed value − average cost)
  • Market value = shares × current displayed value

The refresh interval is configurable from 5 to 60 minutes. Failed requests use silent exponential backoff up to 60 minutes. Manual refresh is always available unless privacy mode is active.

导入与导出 / Import and export

JSON uses this versioned shape:

{
  "schemaVersion": 1,
  "exportedAt": "2026-08-14T00:00:00.000Z",
  "positions": [
    {
      "code": "001632",
      "shares": 1000,
      "averageCost": 1.5,
      "alias": "食品饮料"
    }
  ]
}

Import validates the entire file and previews codes before offering Merge or Replace. Export is explicit and plaintext; store exported files securely.

Privacy and security

  • No telemetry or diagnostic upload.
  • No portfolio values in logs.
  • Holdings and quote cache are stored through SecretStorage.
  • A corrupt encrypted holding record is not silently overwritten.
  • Plaintext exists only when the user explicitly exports it.

免责声明 / Disclaimer

行情和估算仅供参考,可能延迟、不完整或不准确,不构成投资建议。请以基金管理人、销售机构和正式净值公告为准。投资有风险,决策及损失由用户自行承担。

Quotes and estimates are for reference only and may be delayed, incomplete, or inaccurate. Nothing in this extension is investment advice. Verify against the fund manager, distributor, and official NAV disclosures. You are solely responsible for investment decisions and losses.

Development

npm install
npm run check
npm run test:integration
npm run package

License: MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft