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

leekfund

v1.0.0

Published

LeekFund 行情 CLI — 终端查询 A股/美股/期货实时行情与基金估值

Readme

LeekFund CLI

LeekFund 行情命令行工具。在终端查询 A 股、港股、美股、期货实时行情与基金估值,数据源与 LeekFund 扩展一致。

安装

npm install -g leekfund

安装后全局命令为 leekleekfund(两者等价)。

快速开始

# 查询上证指数(无参数时的默认标的)
leek

# 查询指定股票
leek sh600036 sh000001

# JSON 输出(适合脚本与 AI Agent)
leek sh600036 -f json

# 查询基金估值
leek fund 161725 110011 -f json

# 查询美股
leek usr_aapl

# 期货按昨结算价计算涨跌幅
leek nf_IF0 -b settle

命令

| 命令 | 说明 | |------|------| | leek [codes...] | 查询股票 / 指数 / 期货(leek stock 等价) | | leek fund <codes...> | 查询基金估值(必须指定 code) |

全局选项

| 选项 | 说明 | |------|------| | -f, --format table\|json | 输出格式,默认 table | | -v, --verbose | 输出详细字段(默认精简) | | -b, --basis close\|settle | 仅期货;涨跌幅基准,默认 close | | -h, --help | 显示帮助 |

默认行为

  • 不带 codes 时,查询内置默认 sh000001(上证指数)
  • leek fund 不带 code 会报错并提示用法

代码格式

| 类型 | 前缀 / 格式 | 示例 | |------|-------------|------| | A 股 / 指数 | sh / sz / bj | sh600036 | | 美股 | usr_ | usr_aapl | | 国内期货 | nf_(也可直接写 RB0 等大写代码) | nf_IF0 | | 海外期货 | hf_ | hf_OIL | | 港股 | hk + 数字 | hk00700 | | 基金 | 6 位数字 | 161725 |

也支持 600036.SH 形式的写法,会自动归一化为 sh600036

输出字段

默认输出精简字段;加 -v / --verbose 后输出详细字段(table 与 json 均生效)。

股票 / 期货

精简(默认)

| 字段 | 说明 | |------|------| | code | 代码 | | name | 名称 | | price | 最新价 | | updown | 涨跌额 | | percent | 涨跌幅 |

详细(-v — 在精简字段基础上追加:

| 字段 | 说明 | |------|------| | open / yestclose | 今开 / 昨收(期货可选结算价基准) | | high / low | 最高 / 最低 | | volume | 成交量(A 股为手,其余为股 / 张) | | amount | 成交额(仅 A 股) | | openInterest | 持仓量(仅期货) | | time | 更新时间 |

基金

精简(默认)

| 字段 | 说明 | |------|------| | code | 基金代码 | | name | 基金名称 | | gsz | 估算净值 | | gszzl | 估算涨跌幅(%) |

详细(-v — 在精简字段基础上追加:

| 字段 | 说明 | |------|------| | dwjz | 单位净值 | | gztime | 估值时间 | | jzrq | 净值日期 |

JSON 示例

精简(默认):

{
  "version": "v1",
  "quotes": [
    {
      "code": "sh000001",
      "name": "上证指数",
      "price": "3380.21",
      "updown": "+12.34",
      "percent": "+0.37"
    }
  ]
}

详细(-v):

{
  "version": "v1",
  "verbose": true,
  "quotes": [
    {
      "code": "sh000001",
      "name": "上证指数",
      "price": "3380.21",
      "updown": "+12.34",
      "percent": "+0.37",
      "open": "3368.00",
      "yestclose": "3367.87",
      "high": "3385.00",
      "low": "3365.00",
      "volume": "123456.00",
      "amount": "4567.89万",
      "time": "2026-06-17 15:00:03"
    }
  ]
}

无效 code 或无数据时,对应条目会包含 error 字段。

常用代码

| 代码 | 名称 | |------|------| | sh000001 | 上证指数 | | sh600036 | 招商银行 | | sz300059 | 东方财富 | | usr_nvda | 英伟达 | | usr_aapl | 苹果 | | nf_IF0 | 沪深 300 期指连续 | | hk00700 | 腾讯控股 |

声明

声明:本软件仅为数据辅助展示工具,不提供任何投资建议。数据均来自公开网络渠道,因网络延迟或第三方引起的行情误差,本软件不承担法律责任

LeekFund Pro

一套扩展,跑遍 VS Code 生态。实时行情贴在编辑器里,不打断编译、调试和 AI 对话。

https://leek.fund