Skip to content

Stock SDKStock Market SDK for Browser and Node.js

Zero dependencies, Lightweight distribution, and a single API for quotes, K-line, indicators, futures, options, and AI / MCP workflows

Stock SDK

Get Quotes in 10 Lines

ts
import { StockSDK } from 'stock-sdk';

const sdk = new StockSDK();
const quotes = await sdk.getSimpleQuotes(['sh000001', 'sz000858', 'sh600519']);

quotes.forEach((item) => {
  console.log(`${item.name}: ${item.price} (${item.changePercent}%)`);
});

Apply Provider-level Governance

ts
const sdk = new StockSDK({
  timeout: 8000,
  providerPolicies: {
    eastmoney: {
      timeout: 12000,
      rateLimit: {
        requestsPerSecond: 3,
        maxBurst: 3,
      },
    },
    tencent: {
      rateLimit: {
        requestsPerSecond: 8,
        maxBurst: 16,
      },
    },
  },
});

Good Fits

  • Frontend quote dashboards and charting
  • Node.js scheduled jobs and trading-day workflows
  • Quant prototypes and indicator analysis
  • Futures, options, and dividend event dashboards
  • AI agents that need live market data through MCP

Continue Reading

Released under the ISC License.