npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-etf-flow

v0.2.0

Published

DSH 插件:会话头部显示 A 股宽基 ETF 的净流入金额(日/周/月)

Readme

dsh-etf-flow

A DeepSeek Harness plugin that puts an A-share ETF fund-flow badge in the conversation header: click it to see the latest day / week / month net inflow of the main broad-based ETFs.

一个 DSH 插件:在会话头部放一个 A 股 ETF 资金流标签,点开看宽基 ETF 最近一日 / 一周 / 一月的净流入金额。自带数据采集,装了就能用。

  • 沪市:上交所接口(含历史)
  • 深市:深交所接口(xlsx,零依赖解析;仅当日快照,历史从安装当天开始累积)

What it shows

| Period | Meaning | | --- | --- | | 今日 / 上一日 | latest trading day vs previous trading day | | 上一周 | trailing 5 trading days | | 上一月 | trailing 20 trading days |

Each row's headline number is the whole market — every ETF, not just the five broad ones. The sub-line breaks it into three numbers that add up:

申购 +122 亿 · 非宽基 -148 亿 · 宽基 -84 亿        (net -232 亿)

申购 is the summed amount of the ETFs whose shares grew; 非宽基 and 宽基 split the net between the five broad index ETFs and everything else (行业主题 / 策略因子 …). A quiet net number often hides a large two-way flow: -232 net can be +122 in and -354 out.

The drawer also lists four derived factors (large amount / persistence / breadth concentration / multi-index families). They are inferences from share changes — the data itself cannot prove who the buyer is.

How the data works

The plugin is self-contained — no extra scripts, no Python, no API key:

Shanghai Stock Exchange public API   →  daily ETF share counts
Eastmoney public quote API           →  latest ETF prices
        ↓
<DSH_HOME>/etf-flow/history.json     (local history, last ~45 trading days)
        ↓ compute
<DSH_HOME>/etf-flow/summary.json     (what the badge renders)
  • refreshes once on startup, then polls every 15 minutes only between 19:00 and 23:00 (the observed publication window); outside it the timer does nothing
  • when the latest day is already stored it returns immediately — zero requests, zero writes
  • first start backfills ~26 trading days (a few seconds); the badge shows 「资金流 初始化中」 until ready
  • amounts = Σ(share change × price); shares come from the exchange, prices from a public quote API, so the numbers are deterministic and reproducible

Requirements

  • DSH ≥ 0.2.1 (dsh.bundle.patch + dsh.client supported)
  • Node ≥ 18.17 (global fetch + AbortSignal.timeout)
  • outbound HTTPS to query.sse.com.cn and push2.eastmoney.com

Install

// <DSH_HOME>/profiles/<profile>/package.json → dsh.profile.bundles
"dsh-etf-flow"

then restart DSH and refresh the page.

Optional: relocate the data directory in cordis.patch.yml:

- insert:
    - id: dsh-etf-flow
      name: 'dsh-etf-flow'
      config:
        dir: 'D:/some/dir/etf-flow'
        refreshMinutes: 30

Privacy & safety

  • reads/writes only its own directory under DSH_HOME
  • outbound calls (GET only, no credentials, no request bodies):
    • query.sse.com.cn — Shanghai ETF share counts
    • fund.szse.cn — Shenzhen ETF share counts (xlsx)
    • push2.eastmoney.com — ETF quotes
  • no telemetry, no analytics

Limits

  • Shenzhen funds (e.g. 159915 创业板ETF) come from a snapshot-only endpoint: no history, so their flows appear from the second trading day after install
  • amounts for historical days use the latest price (an approximation, not historical NAV)
  • "national-team" factors are heuristics, not facts

Disclaimer

Not investment advice. Numbers are derived from public exchange endpoints and public quote APIs and may be delayed, incomplete, or wrong. Use at your own risk.

数据来自交易所与行情公开接口,可能延迟/缺失/出错;仅供个人研究,不构成投资建议。

License

Proprietary — not open source. Free to install and use with DeepSeek Harness; copying, modifying, or redistributing is not permitted. See LICENSE.

本包为专有软件:可自由安装使用,但不允许复制、修改或再分发。源码不随包分发。