stock-api
View on GitHub查询 A 股、美股、港股与场内基金行情,并通过 Node.js、浏览器、CLI 或 MCP 快速接入。
Zero-dependency TypeScript library that fetches A-share, HK and US stock quotes, K-lines and search results from Tencent/Sina/Eastmoney. Ships as a Node.js/browser API, CLI, an MCP server (get_stock, get_klines, ...), and a SKILL.md for agents.
Use Cases
Give AI clients real-time A-share, HK and US stock quotes via MCP toolsFetch daily/intraday K-line candles for a tickerSearch stocks by name or codeQuery quotes from a CLI with npx stock-apiEmbed quote lookups in a browser app via CDN bundleLet coding agents use SKILL.md instructions to answer stock questionsBatch-fetch quotes for multiple symbols with automatic provider fallback (tencent/sina/eastmoney)
Built With
- Language
- TypeScript
- Frameworks
- Node.js · TypeScript · Jest · ESLint
Tags
stocks · finance · market-data · a-share · us-stock · hk-stock · mcp-server · cli · nodejs · browser · typescript · zero-dependency · klines · skill