.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/mcp-servers/zhangxiangliang/stock-api
zhangxiangliang avatar

stock-api

byzhangxiangliang· 1 MCP server

Installs

2.2k

Stars

1.8k

Forks

203

Category

Finance & Trading

View on GitHub

TL;DR

stock-api 是一个零运行时依赖的股票行情工具,支持 Node.js、浏览器、CLI 和 MCP。默认使用 stocks.auto,自动从可用数据源获取行情。

How to install stock-api?

zhangxiangliang/stock-api
$git clone https://github.com/zhangxiangliang/stock-api

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Install & use

Install stock-api by running `git clone https://github.com/zhangxiangliang/stock-api`, then use it for the current task and follow its documentation at https://github.com/zhangxiangliang/stock-api.

Files · 1

View on GitHub
README.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
Repozhangxiangliang/stock-api
TypeMCP Servers
CategoryFinance & Trading
UpdatedJul 2026
LicenseMIT
First seenJul 27, 2026

Tags

MCPbrowsermcp

Related

6 picks
Type
  1. jerbouma avatarfinancetoolkit200+ transparent financial metrics calculated from raw statements, not third-party endpoints.MCP ServersJul 202661k5.2k
  2. financial-datasets avatarmcp-serverAn MCP server for interacting with the Financial Datasets stock market API.MCP ServersJun 202556k2.2k
  3. quantconnect avatarmcp-serverPython MCP server for local interactions with the QuantConnect API.MCP ServersMay 202656k78
  4. alpacahq avataralpaca-mcp-serverAlpaca Trading API integration for Model Context Protocol (MCP). V2 generates 60+ tools directly from Alpaca's OpenAPI specs using FastMCP.MCP ServersJul 202643k891
  5. getnable avatarfinopsmcpSee where your cloud and AI bills go, and spend less. Local-first, in your terminal or editor.MCP ServersJul 202616k14
  6. xeroapi avatarxero-mcp-serverMCP server implementation for Xero integrationMCP ServersJun 202614k342