.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/zhangxiangliang/stock-api
home/skills/zhangxiangliang/stock-api
zhangxiangliang avatar

stock-api

byzhangxiangliang· 1 skill

Stars

1.8k

Forks

203

Category

Finance & Trading

View on GitHub

TL;DR

Fetch real-time stock quotes, K-line (candlestick) history, and search symbols for China A-shares, Hong Kong, and US markets. Use when the user asks for a stock price, a quote, market data, candlestick/K-line data, or to look up a stock code by company name.

How to install stock-api?

zhangxiangliang/stock-api
$npx -y skills add zhangxiangliang/stock-api --skill stock-api

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Use this skill

Run `npx skills use "https://github.com/zhangxiangliang/stock-api" --skill "zhangxiangliang/stock-api"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.

Use the whole pack

Use the skills in "https://github.com/zhangxiangliang/stock-api" that are relevant to the current task. Run `npx skills add "https://github.com/zhangxiangliang/stock-api"` and select the relevant skills, then follow their instructions.

Files · 1

View on GitHub
SKILL.md
1<h1 align="center">stock-api</h1>
2 
3<p align="center">
4 支持 A 股、港股、美股行情查询的 TypeScript 股票数据工具。
5</p>
6 
7<p align="center">
8 <a href="./README.EN.md">English</a> |
9 <a href="./README.md">简体中文</a>
10</p>
11 
12<p align="center">
13 <a href="https://npmcharts.com/compare/stock-api?minimal=true"><img src="https://img.shields.io/npm/dm/stock-api.svg?sanitize=true" alt="Downloads"></a>
14 <a href="https://www.npmjs.com/package/stock-api"><img src="https://img.shields.io/npm/v/stock-api.svg?sanitize=true" alt="Version"></a>
15 <a href="https://www.npmjs.com/package/stock-api"><img src="https://img.shields.io/npm/l/stock-api.svg?sanitize=true" alt="License"></a>
16 <a href="https://www.npmjs.com/package/stock-api"><img src="https://img.shields.io/badge/language-typescript-blue" alt="TypeScript"></a>
17</p>
18 
19<p align="center">
20 <img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fzhangxiangliang%2Fstock-api%2Fapi-status%2Findex.zh-CN.json&cacheSeconds=300" alt="接口状态">
21 <img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fzhangxiangliang%2Fstock-api%2Fapi-status%2Ftencent.zh-CN.json&cacheSeconds=300" alt="腾讯状态">
22 <img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fzhangxiangliang%2Fstock-api%2Fapi-status%2Fsina.zh-CN.json&cacheSeconds=300" alt="新浪状态">
23 <img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fzhangxiangliang%2Fstock-api%2Fapi-status%2Feastmoney.zh-CN.json&cacheSeconds=300" alt="东方财富状态">
24</p>
25 
26<p align="center">
27 <a href="https://zhangxiangliang.github.io/stock-api/web-demo/">
28 <img src="https://img.shields.io/badge/%E5%9C%A8%E7%BA%BF%E4%BD%93%E9%AA%8C-WEB%20DEMO-3b82f6?style=for-the-badge" alt="在线体验">
29 </a>
30 <a href="https://zhangxiangliang.github.io/stock-api/">
31 <img src="https://img.shields.io/badge/%E9%A1%B9%E7%9B%AE%E4%B8%BB%E9%A1%B5-HOME%20PAGE-24292f?style=for-the-badge" alt="项目主页">
32 </a>
33</p>
34 
35`stock-api` 是一个零运行时依赖的股票行情工具,支持 Node.js、浏览器、CLI 和 MCP。默认使用 `stocks.auto`,自动从可用数据源获取行情。
36 
37## 支持使用方式
38 
39<p>
40 <img src="https://img.shields.io/badge/Node.js-TypeScript%20API-22c55e?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js">
41 <img src="https://img.shields.io/badge/Browser-CDN%20%2F%20Bundler-38bdf8?style=for-the-badge&logo=googlechrome&logoColor=white" alt="Browser">
42 <img src="https://img.shields.io/badge/CLI-npx%20stock--api-f97316?style=for-the-badge&logo=gnubash&logoColor=white" alt="CLI">
43 <img src="https://img.shields.io/badge/MCP-AI%20Tools-a855f7?style=for-the-badge&logo=openai&logoColor=white" alt="MCP">
44</p>
45 
46## 特性
47 
48- Node.js / Browser bundler API + TypeScript 类型
49- CLI 查询股票行情、K 线和搜索股票
50- MCP tools 给 AI 客户端直接调用股票接口
51- 默认自动兜底:`tencent -> sina -> eastmoney`
52- 指定数据源:`stocks.tencent` / `stocks.sina` / `stocks.eastmoney`
53- 支持 A 股、港股、美股代码格式
54- 零运行时依赖
55 
56## Node.js
57 
58### 安装
59 
60Node.js 环境要求 `>=18`。
61 
62```shell
63npm install stock-api
64```
65 
66### 使用
67 
68```typescript
69import { stocks } from "stock-api";
70 
71const stock = await stocks.auto.getStock("SH510500");
72const list = await stocks.auto.getStocks(["SH510500", "SZ000651"]);
73const klines = await stocks.auto.getKlines("SH600519", { period: "day" });
74const results = await stocks.auto.searchStocks("格力电器");
75```
76 
77股票代码使用 `SH` / `SZ` / `HK` / `US` 前缀,例如 `SH510500`、`SZ000651`。
78 
79## 浏览器
80 
81### 引用
82 
83```html
84<script src="https://cdn.jsdelivr.net/npm/stock-api/dist/browser/stock-api.iife.min.js"></script>
85```
86 
87### 使用
88 
89```html
90<script>
91 StockApi.stocks.auto.getStock("SH510500").then(console.log);
92 StockApi.stocks.auto.getStocks(["SH510500", "SZ000651"]).then(console.log);
93 StockApi.stocks.auto.getKlines("SH600519", { period: "day" }).then(console.log);
94 StockApi.stocks.auto.searchStocks("格力电器").then(console.log);
95</script>
96```
97 
98浏览器示例:[GitHub Pages](https://zhangxiangliang.github.io/stock-api/web-demo/)
99 
100## CLI
101 
102```shell
103npx stock-api get-stock SH510500
104npx stock-api get-stocks SH510500 SZ000651
105npx stock-api get-klines SH600519 --period day --count 120
106np

Preview

zhangxiangliang/stock-apizhangxiangliang/stock-api

$ npx -y skills add zhangxiangliang/stock-api --skill stock-api

▸ installing to .claude/skills…

✓ stock-api ready

Repozhangxiangliang/stock-api
TypeSkills
CategoryFinance & Trading
ForFinanceAnalyst
UpdatedJul 2026
License—
First seenJul 27, 2026

Tags

Skill

Related

6 picks
Type
  1. stripe avatarstripe-best-practicesGuides Stripe integration decisions across API selection (Checkout Sessions vs PaymentIntents), Connect platform setup (Accounts v2, controller properties),…SkillsJul 202664k1.7k
  2. jakubkrehel avatarmake-interfaces-feel-betterDesign engineering principles for making interfaces feel polished.SkillsJul 202647k2.6k
  3. clerk avatarclerkClerk authentication router. Use when user asks about Clerk CLI operations,SkillsJul 202620k63
  4. okx avatarokx-dex-marketHARD BLOCK — never use for prediction-market/Polymarket UpDown queries; route to okx-dapp-discovery when a named DApp…SkillsJul 202614k315
  5. franalgaba avatargrimoire-polymarketQueries Polymarket market data and CLOB state, and manages CLOB orders via the Grimoire venue CLI wrapper backed by the official Polymarket CLI.SkillsMay 202612k6
  6. clerk avatarclerk-billingClerk Billing for subscription management - render Clerk's PricingTableSkillsJul 20269.3k63