Changelog
This page records the version update history of Stock SDK.
1.9.2 (2026-05-16)
Data-contract cleanup + business helper additions. All changes are non-breaking; existing code can upgrade without migration.
New Features
Unified time metadata (timestamp + tz)
- All time-bearing return types gain new
timestamp: number(UTC unix ms) andtz: MarketTz(IANA timezone name) fields. - Affected types:
FullQuote/HKQuote/USQuote/FundQuote/FundFlow/HistoryKline/MinuteTimeline/MinuteKline/TodayTimeline/TodayTimelineResponse/HKHistoryKline/USHistoryKline. - US daylight-saving transitions (EST UTC-5 ↔ EDT UTC-4) are handled automatically, no
dayjs/momentdependency. - The original
time/datestring fields are kept untouched. - New exports:
MARKET_TZ,MarketTz,TimeMeta,parseMarketTime,buildTimeMeta,buildTimeMetaFromDateAndTime(undersrc/core/time).
HK / US K-line type split
- New
HKHistoryKline: includescurrency: 'HKD',lotSize: number | null,tz: 'Asia/Hong_Kong'. - New
USHistoryKline: includescurrency: 'USD',tz: 'America/New_York'. getHKHistoryKlinenow returnsPromise<HKHistoryKline[]>,getUSHistoryKlinereturnsPromise<USHistoryKline[]>.- The legacy
HKUSHistoryKlineis now aHKHistoryKline | USHistoryKlineunion alias and marked@deprecated. Existing code keeps working without immediate migration.
A-share trading calendar helpers
isTradingDay(date?): check whether a date is an A-share trading day, reusing the existing 12-hour calendar cache.nextTradingDay(date?)/prevTradingDay(date?): jump to the next / previous trading day.getMarketStatus(market='A'): synchronous current market status —'pre_market' | 'open' | 'lunch_break' | 'after_hours' | 'closed'— for A-share / HK / US (US handles DST automatically). HK and US have no official calendar data source, so the helper falls back to "Mon–Fri + known trading sessions" and does not detect public holidays.- Inputs accept
'YYYY-MM-DD'/'YYYYMMDD'/Date; omit to use today inAsia/Shanghai. - New exports:
TradingCalendarService,MarketStatus,SupportedMarket.
Documentation
- New Dividend Adjustment guide spelling out that every K-line method's
adjustparameter defaults to'qfq', with concrete scenarios and pitfalls for forward / backward / no adjustment. getHistoryKline/getMinuteKline/getHKHistoryKline/getUSHistoryKlineJSDoc explicitly notes theadjustdefault and back-test caveats.- README now includes a market coverage matrix making each market's support level explicit, plus notes on real-time data delay and the v1.9.2 type split.
Compatibility
- Fully backward compatible: all changes are additive (new fields / new methods); no existing field names or return shapes change.
HKUSHistoryKlineremains exported; legacyPromise<HKUSHistoryKline[]>annotations still type-check.- Code that does not consume the new
timestamp/tzfields is unaffected.
1.9.1 (2026-05-15)
New Features
External Site Links
generateSearchExternalLinks(result)— Pure utility that converts aSearchResultfrom thesearchAPI into East Money and Xueqiu links; covers A-share (including indices), HK (auto zero-padded to 5 digits), US, and global indices, with site search pages used as a fallback for unrecognized markets- Added
ExternalLinktype ({ name, url }) and exported it from the main module
Improvements
- Documented
generateSearchExternalLinksusage in both the Chinese and English README and in the docs site's Search section - Added comprehensive unit tests for the new utility, covering A-share / A-share indices / HK with zero-padding / US / Tencent numeric market codes / global indices / fallback search scenarios
Compatibility
- Pure string-generation function; does not mutate
searchresults or issue any network request - No breaking changes; usage from 1.9.0 remains compatible
1.9.0 (2026-05-02)
New Features
Fund Flow (Deep)
getIndividualFundFlow— Per-stock fund flow history (daily/weekly/monthly)getMarketFundFlow— Market fund flow (SH + SZ indices)getFundFlowRank— Stock fund flow ranking (today / 3-day / 5-day / 10-day)getSectorFundFlowRank— Sector fund flow ranking (industry / concept / region)getSectorFundFlowHistory— Single sector's historical fund flow
Northbound / Stock Connect
getNorthboundMinute— Northbound / Southbound minute datagetNorthboundFlowSummary— Stock Connect market flow summarygetNorthboundHoldingRank— Northbound / SH-Connect / SZ-Connect holding rankgetNorthboundHistory— Northbound / Southbound capital historygetNorthboundIndividual— Per-stock northbound holding history
Limit-Up Pool / Stock Changes
getZTPool— 6 pools: limit-up / yesterday / strong / sub-new / broken / limit-downgetStockChanges— 22 change types (rocket launch, large buy, limit-up seal, etc.)getBoardChanges— Daily board change details
Dragon-Tiger List
getDragonTigerDetail— Dragon-tiger detail (by date range)getDragonTigerStockStats— Stock listing statistics (1m / 3m / 6m / 1y)getDragonTigerInstitution— Institution buy/sell statisticsgetDragonTigerBranchRank— Brokerage branch rankinggetDragonTigerStockSeatDetail— Per-stock seat detail (buy + sell sides)
Block Trade / Margin Trading
getBlockTradeMarketStat/getBlockTradeDetail/getBlockTradeDailyStat— Block trade market summary, detail, per-stock aggregatesgetMarginAccountInfo/getMarginTargetList— Margin trading account statistics and target securities
Improvements
- Extracted shared datacenter helpers
fetchDatacenter/fetchDatacenterListthat unify pagination, param building, and response parsing;dividend.tsandfuturesInventory.tsnow reuse them - Playground gained 23 interactive demos covering every new method
1.8.3 (2026-04-25)
This release does not add business APIs. It focuses on system architecture, request stability, type compatibility, and documentation tooling while keeping existing usage compatible.
Improvements
Architecture and Request Governance
- Split the
StockSDKfacade into quote, K-line, board, futures, options, and indicator services while preserving the public method surface - Split public types into domain files under
src/types/; the legacysrc/types.tsbarrel remains available for compatibility - Added Eastmoney host fallback and counted retry / fallback requests against the
rateLimitbudget
Type Compatibility
- Made
TodayTimelineResponse.preCloseoptional to avoid type breaks in existing mocks or manually constructed objects - Preserved the raw Tencent search
SearchResult.typestring and addedcategoryas the normalized asset classification, keeping checks such astype === 'GP-A'working - Kept legacy fields on
OptionLHBItemandComexInventory, with clearer replacement-field semantics
Documentation and Tooling
- Added documentation metadata generation, documentation consistency checks, and a CI workflow
- Updated Search, Options, Timeline, Retry, and Request Governance documentation, and fixed the GitHub Pages deployment workflow
Compatibility
- This release contains no breaking changes
- Existing
StockSDKinitialization, SDK method names, option shapes, and main return structures remain compatible
1.8.1 (2026-04-22)
Improvements
Request Governance
- Added optional
providerPoliciestoRequestClient, allowing provider-level overrides for timeout, retry, rate limiting, circuit breaker, headers, and UA strategy acrosstencent,eastmoney,sina, and other built-in providers - Preserved the existing global
timeout,retry,rateLimit, andcircuitBreakerbehavior, so legacy initialization code continues to work unchanged - Isolated circuit breaker and rate limiter runtime state by provider, preventing failures from one data source from affecting another
Technical Indicators
- Completed one-stop support for
OBV,ROC,DMI,SAR, andKCingetKlineWithIndicatorsandaddIndicators - Synchronized
IndicatorOptionsand lookback estimation logic for the newly exported indicators
Batch Query
- Whole-market batch APIs now preserve input order internally, so returned quote arrays stay aligned with the requested symbol order
- The public
asyncPoolexport remains backward compatible to avoid breaking existing external utility usage
Provider Refactor
- Introduced Eastmoney history-K-line and board provider factories to reduce duplicated logic across HK/US K-line and industry/concept board modules
- Public API names, parameters, and return types remain unchanged
1.8.0 (2026-03-13)
New Features
Options Data
- Added CFFEX index option T-quote API
getIndexOptionSpot, supporting SSE 50 (ho), CSI 300 (io), CSI 1000 (mo) - Added index option contract daily K-line API
getIndexOptionKline - Added all CFFEX option real-time quotes API
getCFFEXOptionQuotes(Eastmoney data source) - Added SSE ETF option expiration month list API
getETFOptionMonths, supporting 50ETF, 300ETF, 500ETF, STAR 50 - Added ETF option expiration date & remaining days API
getETFOptionExpireDay - Added ETF option intraday minute data API
getETFOptionMinute - Added ETF option historical daily K-line API
getETFOptionDailyKline - Added ETF option 5-day minute data API
getETFOption5DayMinute - Added commodity option T-quote API
getCommodityOptionSpot, covering 30 varieties (gold, silver, copper, soybean meal, sugar, etc.) - Added commodity option contract daily K-line API
getCommodityOptionKline - Added option leaderboard API
getOptionLHB
1.7.0 (2026-02-28)
New Features
Futures Data
- Added domestic futures history K-line API
getFuturesKline, supporting all domestic futures exchanges (SHFE, DCE, CZCE, INE, CFFEX, GFEX), main continuous contracts (e.g.RBM) and specific contracts (e.g.rb2510), with daily/weekly/monthly periods - Added global futures real-time quotes API
getGlobalFuturesSpot, covering major international exchanges including COMEX, NYMEX, CBOT, LME, etc., with 600+ instruments - Added global futures history K-line API
getGlobalFuturesKline, supporting daily/weekly/monthly periods - Added futures inventory symbol list API
getFuturesInventorySymbols - Added futures inventory data API
getFuturesInventoryfor querying historical inventory data of domestic futures varieties - Added COMEX gold/silver inventory API
getComexInventory
Improvements
Playground
- Added futures data API demonstrations
1.6.2 (2026-01-25)
New Features
Fund Data
- Added
getFundCodeListmethod: Get all fund codes (26000+ funds)
1.6.1 (2026-01-25)
New Features
Rate Limiting & Protection
- Added request rate limiter (
rateLimit): Token bucket algorithm with configurable requests per second and burst capacity - Added User-Agent rotation (
rotateUserAgent): Node.js only, reduces risk of being identified as the same client - Added circuit breaker (
circuitBreaker): Automatically pauses requests on consecutive failures to prevent cascade failures (disabled by default, requires explicit configuration)
Infrastructure
- Added general-purpose memory cache module with TTL expiration and LRU eviction
1.6.0 (2026-01-24)
New Features
Dividend Data
- Added A-share dividend details API
getDividendDetail, supporting historical dividend records covering 20+ dimensions including cash dividends, share transfers, financial indicators (EPS, BPS, net profit YoY, etc.), key dates, and distribution progress
1.5.0 (2026-01-18)
New Features
Technical Indicators
- Added 5 new technical indicators: OBV (On Balance Volume), ROC (Rate of Change), DMI/ADX (Directional Movement Index), SAR (Parabolic SAR), KC (Keltner Channel)
- Improved documentation and Playground demos for indicator functions
Batch Query Enhancements
getAShareCodeList,getUSCodeListparameters upgraded to options object for flexible filtering:simple: Remove exchange/market prefixmarket: Filter by market
getAllAShareQuotes,getAllUSShareQuotesnow supportmarketparameter for filtering quotes
1.4.5 (2026-01-15)
Changes
Default Adjustment Type Changed
- Default price adjustment for all K-line APIs changed from backward adjustment (
hfq) to forward adjustment (qfq) - Affected APIs:
getHistoryKline,getHKHistoryKline,getUSHistoryKline,getMinuteKline,getKlineWithIndicators
1.4.4 (2026-01-14)
Improvements
- Code optimizations to reduce bundle size
1.4.3 (2026-01-08)
Improvements
Request Method Optimization
- Support configuration of error retry policies, including retry count, retry interval, etc.
- Optimized error handling to provide more detailed error information.
- Support custom headers and userAgent.
Unit Test Structure Optimization
- Separation of integration/unit tests.
- Added MSW mock layer to intercept real requests for unit testing.
Cache Optimization
- In-memory caching for code lists/trading calendars: Reduces duplicate requests.
1.4.2 (2026-01-07)
New Features
Search Functionality
- Added stock search API
search, supporting search by code, name, and pinyin for A-shares, HK stocks, and US stocks
1.4.1 (2025-12-29)
New Features
Extended Data
- Added A-share trading calendar API
getTradingCalendar
1.4.0 (2025-12-26)
New Features
Board Data
- Added industry board APIs:
getIndustryList,getIndustrySpot,getIndustryConstituents,getIndustryKline,getIndustryMinuteKline - Added concept board APIs:
getConceptList,getConceptSpot,getConceptConstituents,getConceptKline,getConceptMinuteKline
Improvements
Playground
- Added board data API demonstrations
- Playground now supports local development mode, allowing direct reference to local source code for debugging
1.3.1 (2025-12-24)
Improvements
Documentation Improvements
- Official website launched: https://stock-sdk.linkdiary.cn/
- Improved API documentation introduction
- One bigfix
1.3.0 (2025-12-23)
New Features
K-Line Data
- Added HK and US stock history K-line APIs
getHKHistoryKline,getUSHistoryKline(daily/weekly/monthly) - Added APIs to get all US and HK stock real-time quotes
getAllUSShareQuotes,getAllHKShareQuotes(with concurrency control and progress callback)
Technical Indicators
- Added one-stop indicator API
getKlineWithIndicators(auto-fetch K-line and calculate indicators) - Added MA calculation functions
calcMA(supports SMA/EMA/WMA),calcSMA,calcEMA,calcWMA - Added indicator calculation functions
calcMACD,calcBOLL,calcKDJ,calcRSI,calcWR, etc.
Improvements
- Added i18n support for Chinese and English documentation
1.2.0 (2025-12-18)
New Features
K-Line Data
- Added A-Share history K-line API
getHistoryKline(daily/weekly/monthly, data source: East Money) - Added minute K-line API
getMinuteKline(1/5/15/30/60 minutes) - Added today's timeline API
getTodayTimeline
Improvements
- Completely restructured API documentation with clearer table format
1.1.0 (2025-12-12)
Features
Real-time Quotes
- A-Share/Index full quotes
getFullQuotes - A-Share/Index simple quotes
getSimpleQuotes - HK stock quotes
getHKQuotes - US stock quotes
getUSQuotes - Mutual fund quotes
getFundQuotes
Extended Data
- Fund flow
getFundFlow - Large order ratio
getPanelLargeOrder
Batch Query
- All A-Share code list
codeList - Get all A-Share real-time quotes
getAllAShareQuotes(with concurrency control and progress callback) - Batch get quotes by codes
getAllQuotesByCodes - Batch mixed query
batchRaw
Features
- Zero dependencies, lightweight
- Supports both browser and Node.js 18+
- Provides both ESM and CommonJS module formats
- Complete TypeScript type definitions
Version Specification
Stock SDK follows Semantic Versioning.
- Major: incompatible API changes
- Minor: backward-compatible new features
- Patch: backward-compatible bug fixes