# zhangxiangliang/stock-api

查询 A 股、美股、港股与场内基金行情，并通过 Node.js、浏览器、CLI 或 MCP 快速接入。

Repository: https://github.com/zhangxiangliang/stock-api
Canonical: https://ross.abutalabs.com/products/stock-api
Homepage: https://zhangxiangliang.github.io/stock-api/
Language: TypeScript
License: MIT
License Family: permissive
Topics: browser, mcp, nodejs, stocks
Last push: 2026-08-26T18:18:39+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 90, longevity 100
- inputs: {"age_days": 2234, "days_push": 7, "days_rel": 70, "gap_med": 0, "n_releases_24m": 14}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1831, forks 208 (observed 2026-08-28T04:05:41.811818+00:00)

## What it is
A zero-runtime-dependency TypeScript library for querying stock quotes, K-line data, and stock search across A-share, Hong Kong, US markets, and exchange-traded funds. It can be used from Node.js, browsers via CDN, a CLI, or as an MCP server for AI clients, with automatic fallback across Tencent, Sina, and Eastmoney data sources.

## Use cases
- fetch current stock quotes for A-share, HK, and US markets
- get historical K-line candlestick data for a stock
- search stocks by name or code
- batch query multiple stock quotes
- expose stock market data to AI assistants via MCP
- query exchange-traded fund prices from the command line

## When to choose
- you need a lightweight, zero-dependency stock quote library in TypeScript
- you want unified access to Chinese, Hong Kong, and US market data with automatic source fallback
- you want to give MCP-compatible AI clients stock data tools
- you need both a programmatic API and a CLI for quick lookups

## When to avoid
- you need real-time tick-level or streaming market data
- you require trading/order execution, not just quotes
- you need markets outside A-share, Hong Kong, and US exchanges
- you depend on officially licensed market data feeds with SLAs

## Facets
- artifact type: library
- maturity: active
- function: sdk, cli, mcp, http-client
- domain: fintech, apis, developer-tools
- platform: browser, cli
- tags: stock-market-data, quotes, klines, a-share, hong-kong-stock, us-stock, zero-dependency, mcp-server, nodejs, typescript

## Member repositories
- zhangxiangliang/stock-api (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:41.811818+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:19:13.878878+00:00, confidence not recorded.
  - readme: https://github.com/zhangxiangliang/stock-api (fetched 2026-08-28T04:05:41.811818+00:00, sha 6a464f9e8f48)
  - homepage: https://zhangxiangliang.github.io/stock-api/ (fetched 2026-08-29T10:58:05.060877+00:00, sha 5a2105b57b04)
  - registry_npm: https://registry.npmjs.org/stock-api (fetched 2026-08-29T10:58:05.063387+00:00, sha 9ec859b4b99a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
