Dev & Engineering stock-market-datatypescript-sdkclitechnical-analysismcp-server

Stock SDK

A zero-dependency JavaScript SDK for frontend and Node.js to fetch stock data for A-shares, HK, US, and funds, with CLI and MCP server included.

FollowAgents review · FARS-2.1
Use with care
71/ 100 5-point scale 3.6 / 5
1 2 3 4 5 6
1Trust14 / 29 · 2.4/5

Evidence: SDK is a pure client library, no backend, minimal permissions (least_privilege=2). No user confirmation mechanism (user_confirmation=0). Data flow transparent: docs state data sources are public Tencent/Eastmoney APIs and note latency (data_flow_transparency=2). Sensitive data handling: no collection/transmission of sensitive data found, but no explicit statement (sensitive_data_handling=1). Dependency security: zero runtime dependencies, devDependencies no known vulnerabilities (dependency_security=2). External effects: only network requests for public data, no destructive actions (external_effects=2). Rollback: v1 migration guide provided, but no automatic rollback (rollback=1). Source attribution: author and repo clear, but publisher unverified (source_attribution=2).

2Reliability9 / 14 · 3.2/5

Evidence: Code structure consistent, namespace API unified (self_consistency=2). Dependency availability: zero runtime deps, devDependencies pinned (dependency_availability=2). Failure messages: unified error system with SdkError and codes (failure_messages=2).

3Adaptability16 / 18 · 4.4/5

Evidence: Clear target audience (frontend engineers), scenarios cover dashboards, visualization, education (audience_and_scenarios=3). Capability boundaries clear: market support matrix details capabilities per market (capability_boundaries=3). Trigger precision: API design precise, symbol parsing tolerant (trigger_precision=2). Environment fit: supports browser and Node.js 18+, ESM/CJS (environment_fit=3).

4Convention15 / 18 · 4.2/5

Evidence: Clear information architecture, namespace grouping (information_architecture=3). Install notes detailed (install_notes=3). Naming stability: v2 breaking changes but migration guide provided (naming_stability=2). Examples and FAQ: README provides many examples, official docs (examples_and_faq=3). Known limitations: data latency and unsupported markets noted (known_limitations=2). License: ISC clear (license=3). Versioning/changelog: version number present, but no CHANGELOG file (versioning_changelog=2). Maintenance responsibility: author clear, but unverified (maintenance_responsibility=2).

5Effectiveness13 / 13 · 5.0/5

Evidence: Output formats unified, supports JSON/CSV/table (output_usability=3). Marginal value: provides zero-dependency stock data solution for frontend, fills gap (marginal_value=3). Cost-benefit: zero-dependency, lightweight, free (cost_benefit=3).

6Verifiability4 / 8 · 2.5/5

Evidence: Claims in README supported by code and tests (claim_traceability=2). Cross-source corroboration: relies on single data source, no comparison with others (cross_source_corroboration=1). Fact/inference separation: docs distinguish data sources and local calculations (fact_inference_separation=2).

Evidence confidence: Low Reviewed Aug 11, 2026 Reviewed revision 41f04c30e381
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
Safety controls not found in source: confirmation before acting
Before you use it
  • Publisher identity unverified; assess risk before use.
  • Data from third-party public APIs may have latency or instability; not suitable for high-frequency trading.
  • No CHANGELOG file provided; version history incomplete.
  • No explicit statement on user data collection; review code if concerned.
Review evidence [1][2][3][4][5][6][7][8]
See the full review method →

What does this agent do, and when should you use it?

Stock SDK is a zero-dependency JavaScript/TypeScript library for frontend and Node.js environments to retrieve real-time quotes and K-line data for A-shares, Hong Kong, US stocks, and public funds. It offers a namespaced API with tolerant symbol parsing, technical indicators, chip distribution, signal detection, screening, and backtesting. It provides a CLI (stock-sdk command) and a built-in MCP server for AI integration, supporting ESM, CommonJS, and subpath exports for tree-shaking. v2.0.0 is an architectural upgrade introducing namespaced APIs and a unified error system, but includes breaking changes. Data is sourced from public APIs like Tencent Finance and Eastmoney, with latency unsuitable for high-frequency trading.

Stock SDK fetches and parses stock market data from public APIs such as Tencent Finance and Eastmoney. It handles symbol normalization (e.g., sh600519, 600519.SH, 00700, AAPL), provides real-time quotes (sdk.quotes.cn()), K-line (sdk.kline.cn()), minute bars, intraday timelines, technical indicator calculations (MA, MACD, BOLL, etc.), chip distribution, fund flows, and dragon-tiger lists. Users can call these via namespaced async APIs in Node.js or browser, use the CLI (e.g., stock-sdk quote 600519), or start the built-in MCP server (npx stock-sdk mcp) to expose tools to AI clients like Cursor or Claude. Pure-computation subpath imports (stock-sdk/indicators) are also available for indicator and signal math.

  1. Frontend engineers building a stock dashboard or data visualization page who want to avoid maintaining a backend service or using Python.
  2. Developers needing to periodically fetch stock quotes in Node.js for quantitative strategy prototyping or analysis.
  3. Command-line users who want to quickly check a stock's price or K-line without writing a full application.
  4. Users of AI tools like Cursor or Claude who want the assistant to access stock data via the MCP server.
  5. Educators or students in finance courses who need a simple JavaScript library to demonstrate live market data.

What are this agent's strengths and limitations?

Pros
  • Zero dependencies, works in both browser and Node.js, simplifying integration.
  • Includes a CLI and built-in MCP server, enabling command-line use and AI integration.
  • Full TypeScript types, rich namespaced API, and IDE autocompletion friendly.
  • Subpath exports allow importing pure computation modules to keep bundles lean.
Limitations
  • Data comes from public APIs, not real-time matching, with latency unsuitable for high-frequency trading.
  • v2 is a breaking change; migrating from v1 requires reading the guide, no compatibility aliases.
  • Market coverage varies; futures and options have limited functionality, observe the support matrix.
  • Relies on upstream API stability; provider changes may require SDK updates.

How do you install or deploy this agent?

Install via npm: npm install stock-sdk. For the v1 legacy version, use npm install stock-sdk@legacy. Requires Node.js 18+. No API keys or credentials are needed.

How do you use this agent?

After installation, import the SDK and create an instance: import { StockSDK } from 'stock-sdk'; const sdk = new StockSDK(); Then call namespaced APIs, e.g., fetch A-share quotes: await sdk.quotes.cnSimple(['sh000001', 'sz000858', 'sh600519']). For CLI, use npx stock-sdk quote 600519. For MCP integration, run npx stock-sdk mcp to start the server, and configure mcpServers in your client.

FAQ

Is the data real-time?
The real-time quotes come from public APIs like Tencent Finance and Eastmoney, not exchange matching data. There is typically a delay of tens of seconds to minutes, so it is not suitable for high-frequency trading decisions.
Do I need an API key?
No. The SDK uses public finance APIs without registration or API keys.
Which markets are supported?
Mainly A-shares, Hong Kong stocks, US stocks, and public funds, with partial support for futures and options. Check the support matrix for details.
How can I use it with AI tools?
Start the MCP server with npx stock-sdk mcp, then configure mcpServers in MCP-compatible clients like Cursor or Claude Desktop to access data via tools.

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents