akfamily/akshare
44.4
Weak · 19 September 2026
193.2k
lines of production code
Python
with JavaScript
1
measurement over time
What this system is
AKShare is a Python library that aggregates and provides access to a wide variety of public financial and economic data sources, including stock, bond, fund, futures, and macroeconomic indicators. It enables users to retrieve, search, and analyze this data through a standardized interface registry, supporting both synchronous and specific asynchronous workflows. The system continuously adapts to changes in upstream data providers by updating API endpoints, handling anti-bot measures, and maintaining data accuracy across diverse markets such as China, the US, and Hong Kong.
Features
Add Bank of China conversion rate column to currency\_boc\_sina
The currency\_boc\_sina function now includes a new '中行折算价' (Bank of China conversion rate) column in its output. This column is parsed from the source data and converted to numeric values, providing users with an additional currency metric alongside the existing buy/sell and central bank middle rates.
akshare/currency · high confidence
Introduce interface registry search and TapTap game rankings
Users can now discover AKShare interfaces using a new natural-language search function powered by a lazy-loaded registry system, and can retrieve game ranking data from TapTap via the new \game\_hot\_rank\_taptap\ function. Additionally, the library now includes a robust HTTP retry utility for handling transient network errors, and the legacy cost-of-living data module has been removed.
akshare · high confidence
New HK/China industry comparison and Tencent A-share spot data sources
This update introduces new interfaces for comparing Hong Kong and Chinese A-share stocks by industry growth, valuation, and scale (stock\_hk\_comparison\_em.py, stock\_zh\_comparison\_em.py), adds Tencent-based real-time A-share spot data (stock\_zh\_a\_spot\_tx), and provides Hong Kong company profiles and financial indicators (stock\_profile\_em.py). It also refactors the Sina HK spot data source to use a paginated JSON API instead of the previous JSONP/demjson method, and improves reliability in the concept board interface by retrying multiple Eastmoney API endpoints.
akshare/stock · high confidence
New IPO and equity data endpoints; Xueqiu API login handling and Sina financial scraping fixes
This update introduces several new data sources for IPO and equity analysis: \stock\_zh\_a\_gbjg\_em\ for A-share capital structure from Eastmoney, \stock\_ipo\_review\_em\ for IPO review status, \stock\_ipo\_tutor\_em\ for IPO tutoring records, \stock\_ipo\_ths\ and \stock\_ipo\_hk\_ths\ for IPO subscription data from Tonghuashun, and \stock\_financial\_analysis\_indicator\_em\ for A-share financial indicators. It also adds \stock\_individual\_notice\_report\ for individual stock announcements. On the maintenance side, the Xueqiu basic info interface (\stock\_individual\_basic\_info\_xq\) now requires a valid \xq\_a\_token\ or login session, raising explicit errors for anonymous access, while the Sina financial analysis scraper (\stock\_financial\_analysis\_indicator\) has been hardened to handle missing containers and empty year lists. Additionally, the Eastmoney HK financial report interface (\stock\_financial\_hk\_report\_em\) now correctly maps currencies to report dates, and the Sina recommendation scraper (\stock\_institute\_recommend\) uses a timeout and a helper function for HTML parsing.
_akshare/stock\fundamental · high confidence
New bond data sources and enhanced ChinaBond index capabilities
Users can now access new bond datasets including Shanghai and Shenzhen pledge-style repo rates via \bond\_sh\_buy\_back\_em\ and \bond\_sz\_buy\_back\_em\, as well as Chinese and US treasury yield curves from Sina Finance via \bond\_gb\_zh\_sina\ and \bond\_gb\_us\_sina\. The ChinaBond index module has been significantly expanded with new functions \bond\_index\_general\_cbond\ and \bond\_treasury\_index\_cbond\ to query specific index categories and treasury indices, supported by a comprehensive \INDEX\_MAPPING\ in the configuration file. Additionally, the Jisilu convertible bond scraper has been updated to use the new \www.jisilu.cn\ domain with dynamic anti-bot tokens, and several existing functions have been patched to handle data coercion errors more robustly.
akshare/bond · high confidence
New build, release, and documentation tooling
Added scripts/build\_registry.py to generate interface metadata from documentation and the package init file, scripts/check\_punctuation.py to enforce consistent Chinese punctuation in source and docs, scripts/check\_release.py to validate version consistency across tags and files before publishing, and scripts/registry\_baseline.json to track known orphaned and undocumented interfaces.
scripts · high confidence
New fund announcement, scale, and overview interfaces; AMAC pagination fix
Added new interfaces for fund announcements (dividend, report, personnel) from Eastmoney, ETF scale data from SSE and SZSE, fund basic info from THS, and fund overview from Eastmoney. The AMAC (Asset Management Association of China) interfaces were fixed to use the correct pagination parameters (page 0, size 20) to resolve parsing errors. The fund manager interface now includes a 'current fund code' column. The ETF history interface switched to a new market ID detection method and updated the Sina ETF history URL path.
akshare/fund · high confidence
New futures commission data source and updated exchange endpoints
Added a new \futures\_comm\_js\ function to fetch futures commission data from Jin10, alongside a new \futures\_contract\_detail\_em\ function for contract details from Eastmoney. Updated multiple exchange data sources to reflect new URLs and formats: Shanghai Futures Exchange (SHFE) and Dalian Commodity Exchange (DCE) now use new portal URLs and JSON-based APIs for daily and rank data; Zhengzhou Commodity Exchange (CZCE) rank table now supports Excel files for recent dates. Fixed integer overflow in global futures history data and corrected the roll yield calculation logic.
akshare/futures · high confidence
New offline interface registry and Python 3.14 support
AKShare now includes an offline interface registry accessible via \ak.search()\, \ak.interface\_info()\, and \ak.list\_categories()\, allowing users and LLM agents to locate and inspect public financial data functions without network requests. The project has also upgraded its supported Python version to 3.11+ and added explicit support for Python 3.14, reflected in the new \uv.lock\ resolver markers and updated Dockerfiles.
(repo-wide) · high confidence
New option data sources and DCE API migration
This update introduces three new data sources for option contract information: the openctp interface via \option\_contract\_info\_ctp\, the Shanghai Stock Exchange (SSE) daily contracts via \option\_current\_day\_sse\, and the Shenzhen Stock Exchange (SZSE) daily contracts via \option\_current\_day\_szse\. It also adds a new function \option\_margin\ to retrieve commodity option margin data from iweiai. Additionally, the Dalian Commodity Exchange (DCE) daily option data function has been renamed from \option\_dce\_daily\ to \option\_hist\_dce\ and migrated to a new JSON-based API endpoint, while the Zhengzhou Commodity Exchange (CZCE) yearly history function was renamed from \option\_czce\_hist\ to \option\_hist\_yearly\_czce\.
akshare/option · high confidence
Removals
Removal of Olympic sports data module
The \akshare/sport\ package and its \sport\_olympic.py\ module, which previously provided historical Olympic medal data via the \sport\_olympic\_hist\ function, have been removed. Users relying on this specific endpoint for Olympic statistics will no longer have access to this feature.
akshare/sport · high confidence
Removal of experimental async stock data functions
The \akshare/stock\_a\ module has removed several experimental asynchronous functions that previously fetched A-share market data using \aiohttp\. Specifically, the module no longer provides \stock\_board\_concept\_name\_em\ (concept board names), \stock\_individual\_fund\_flow\_rank\ (individual stock fund flow rankings), and \stock\_zh\_a\_spot\ (real-time A-share spot data). Users relying on these specific async interfaces will need to migrate to the synchronous equivalents or other available data sources within the library.
_akshare/stock\a · high confidence
Behavioural changes
Documentation and minor code cleanup in crypto modules
Updated docstrings in the CME Bitcoin report module to explicitly declare the 'date' parameter type and description, and removed an unnecessary blank line in the crypto hold report module.
akshare/crypto · medium confidence
Fixes for Chinese macroeconomic data interfaces and documentation standardization
This update fixes several Chinese macroeconomic data interfaces that were failing due to source website changes. The \macro\_china\_urban\_unemployment\ function now uses the new National Bureau of Statistics (NBS) API endpoints and \curl\_cffi\ for request impersonation, replacing the deprecated legacy query method. The \macro\_china\_shrzgm\ (social financing) interface has been updated to use HTTPS and a custom TLS adapter to ensure compatibility with the Ministry of Commerce's server. Additionally, docstrings across multiple economic modules (including US, Eurozone, and Germany data) have been standardized to use correct Chinese punctuation, and output DataFrames in the Tonghuashun finance module are now sorted by month to ensure consistent ordering.
akshare/economic · high confidence
Index data source updates and new CSIndex list
This release adds a new \index\_csindex\_all\ function to fetch the list of indices from the CSIndex website. Several existing index functions have been updated to fix data retrieval issues: \index\_all\_cni\ and \index\_detail\_cni\ now use HTTPS endpoints and simplified column mapping for CNI data; \index\_yw\ switches to direct JSON APIs for Yiwu index data; \stock\_zh\_index\_daily\_tx\ now supports custom start and end dates; and \stock\_zh\_index\_daily\_em\ adds support for Beijing Stock Exchange (BSE) indices. Additionally, \index\_global\_spot\_em\ and \index\_zh\_a\_hist\_min\_em\ have been corrected to return the correct price fields (latest price and average price, respectively), and \index\_research\_sw\ now handles empty responses gracefully for real-time SW index data.
akshare/index · high confidence
New BSE margin data and US valuation tools; East Money API and parsing fixes
Users can now access Beijing Stock Exchange (BSE) margin trading data via new functions in stock\_margin\_bse.py, and retrieve US stock valuation metrics from Baidu via stock\_us\_valuation\_baidu.py. Several existing East Money (EM) interfaces have been updated to fix data retrieval and parsing issues: stock\_comment\_em now handles JSONP responses and returns a wider set of market sentiment columns, while stock\_cyq\_em no longer requires manual JSONP stripping. Additionally, stock\_gpzy\_em adds a new function to query individual stock pledge details, and stock\_dxsyl\_em now includes exchange and board information in its IPO data. The legacy stock\_wencai.py module has been removed, and date parsing in several Legulegu-based modules (stock\_a\_pe\_and\_pb, stock\_all\_pb, stock\_buffett\_index\_lg) has been simplified to remove explicit millisecond unit handling.
_akshare/stock\feature · high confidence
New C-Swap curve function and improved Baidu FX quote reliability
Users can now access the China Foreign Exchange Trade System C-Swap benchmark curve via the new \fx\_c\_swap\_cm\ function, which handles legacy SSL requirements for the source site. Additionally, the Baidu stock market FX quote function (\fx\_quote\_baidu\) has been refactored to use the \requests\ library instead of low-level HTTP clients, adding support for an optional \token\ parameter (for anti-bot protection) and implementing explicit error checking and pagination termination to prevent silent failures or infinite loops when data is exhausted.
akshare/fx · high confidence
Standardizes docstrings and fixes deprecated pandas API usage in QHKC web modules
The QHKC web modules (fund, index, and tool) now provide clearer documentation with explicit return types (pandas.DataFrame) and Chinese descriptions in their docstrings, alongside standardized Chinese punctuation. Additionally, the code in qhkc\_index.py has been updated to use the non-deprecated pandas.\_append method instead of the removed DataFrame.append, ensuring compatibility with newer pandas versions.
_akshare/qhkc\web · high confidence
Updated data sources and fixed parsing for Shanghai and Dalian futures contract info
The Shanghai Futures Exchange (SHFE) contract info function now fetches data from the new \shfe.com.cn\ domain instead of the previous \tsite.shfe.com.cn\ endpoint, and the Dalian Commodity Exchange (DCE) function has been rewritten to consume a JSON API response rather than parsing HTML tables. Additionally, the SHFE output no longer includes a per-row 'Update Time' column, replacing it with a single timestamp for the entire dataset, while Chinese punctuation in docstrings and constants across the module has been standardized.
_akshare/futures\derivative · high confidence
Fixes
Fix REITs realtime data retrieval by correcting import order
The \reits\_realtime\_em\ function now correctly retrieves REITs market data. This change fixes a potential runtime error caused by incorrect import ordering in \reits\_basic.py\, ensuring that \pandas\ and \requests\ are properly loaded before use.
akshare/reits · high confidence
Fix air quality watch point API parameter encoding
The \air\_quality\_watch\_point\ function in \akshare/air/air\_zhenqi.py\ has been corrected to properly encode API parameters. Previously, the function made redundant calls to \encode\_param\ and \encode\_secret\ that are no longer required; the updated logic now correctly passes the city, method, start\_date, and end\_date to the underlying JavaScript engine to generate the request payload, ensuring the API call succeeds. Other changes in this diff are limited to punctuation normalization in docstrings.
akshare/air · high confidence
Fix forex\_spot\_em data accuracy and pagination
The forex\_spot\_em function now correctly retrieves and formats foreign exchange spot data by switching to a paginated fetch mechanism, correcting column mappings (swapping 'latest price' and 'open' fields), and removing incorrect numeric scaling factors that previously distorted values like price and change amounts.
akshare/forex · high confidence
Fixes data accuracy and ordering in Shanghai Gold Exchange spot quotations
The \spot\_quotations\_sge\ function now filters out data entries that are at or after the current update time and sorts the remaining results chronologically. This ensures that users receive a clean, time-ordered dataset without stale or future-dated entries, correcting previous behavior where extra or unsorted data was returned.
akshare/spot · high confidence
Fixes for Baidu and Eastmoney news data retrieval
Resolves failures in Baidu financial calendar and Eastmoney stock news interfaces by updating request mechanisms. The Baidu module now dynamically fetches required cookies via a multi-step session process using curl\_cffi to bypass anti-bot checks, while the Eastmoney stock news function updates its API endpoint to HTTPS, switches to the curl\_cffi library for request handling, and adjusts parameter structures to match current server expectations.
akshare/news · high confidence
Test coverage
Added test coverage for release validation, API error handling, and registry search logic
Added new test suites to verify release consistency (ensuring tag, version file, changelog, and init history align), robust error handling for the LeguLegu CSRF token retrieval (catching 403s and connection errors without crashing), and the accuracy of the interface registry search scoring and whitespace normalization. Also updated existing tests to remove a placeholder no-op test.
tests · high confidence
Dependencies
Migration to pyproject.toml and modernization of documentation tooling
The project has consolidated its dependency management into pyproject.toml, removing legacy requirements.txt files and switching to PEP 735 dependency groups for development and linting tools. This update raises the minimum Python version to 3.11, upgrades core dependencies like pandas to \>=2.0.0, and replaces the deprecated recommonmark with myst-parser for documentation generation. Additionally, the ruff-lsp tool has been removed in favor of the built-in ruff server, and the ruff linter version is pinned to 0.16.4.
(dependencies) · high confidence
Housekeeping
Standardized Chinese punctuation in documentation
Updated docstrings and comments across multiple modules (including EPU index, bank data, migration, fortune rankings, interest rates, and API initialization) to replace half-width commas with full-width Chinese punctuation, ensuring consistent formatting in user-facing documentation.
(repo-wide) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 44.
Lenses
- Code Health 38
- Architecture 98
- Maturity 56
- Readiness 59
- Security 37
Changes since last survey
- 300 commits — 208 feature/other, 92 fixes
By area
- akshare/init.py — 88 commits
- docs/introduction.md — 57 commits
- akshare/futures — 23 commits
- (root) — 22 commits
- docs/data — 16 commits
- akshare/stock — 15 commits
- (repo) — 14 commits
- akshare/news — 12 commits
- akshare/fund — 11 commits
- akshare/stock_feature — 9 commits
- .github/workflows — 5 commits
- akshare/option — 4 commits
- docs/tutorial.md — 4 commits
- akshare/economic — 3 commits
- akshare/index — 3 commits
- akshare/stock_fundamental — 3 commits
- akshare/bond — 2 commits
- akshare/currency — 2 commits
- .github/ISSUE_TEMPLATE — 1 commit
- akshare/crypto — 1 commit
Notable commits
- fix: Fix stock_zh_a_sina to have a different source for share amounts (#… (#6913)
- fix: fix(fund): 修复 fund_value_estimation_em 接口返回空结果 (#7369)
- fix: fix(fund): 修复fund_money_fund_info_em接口字段不匹配问题 (#7405)
- fix: fix(fund_amac): 修复amac系列接口分页参数变更导致的解析错误 (#7365)
- fix: fix(fund_portfolio_em): 修复 Python 3.9 兼容性回归问题 (#7358)
- fix: fix(futures_inventory_99): 修复99期货网大宗商品库存数据接口 (#7360)
- fix: fix(index): 修复index_all_cni和sw_index_third_cons接口 (#7379)
- fix: fix(index_realtime_sw): 修复申万实时指数接口的数据处理与文档 (#7342)
- fix: fix(interface): 修复 fund_portfolio_hold_em 接口 (#7383)
- fix: fix(stock): 修复 stock_zh_a_hist_tx 及股票财务指标接口 (#7343)
- fix: fix(stock): 修复两个A股接口并更新版本至1.18.70 (#7344)
- fix: fix(stock): 修复雪球股票接口的异常处理与登录态问题 (#7368)
- fix: fix(stock): 更新雪球token并完善接口登录态说明 (#7398)
- fix: fix(stock/cninfo): 修复巨潮资讯两个信息披露接口 (#7341)
- fix: fix(stock_board_concept_hist_em): 优化错误处理与空数据兜底逻辑 (#7406)
- fix: fix(stock_cg_lawsuit_cninfo): 修复巨潮资讯公司诉讼接口及相关配置文档 (#7350)
- fix: fix(stock_gdfx_free_holding_detail_em): 修复接口并优化分页参数 (#7355)
- fix: fix(stock_yysj_em): 修复stock_yysj_em接口 (#7340)
- fix: fix(stock_zh_a_spot): 修复接口超时阻塞问题 (#7425)
- fix: fix(tools&docs): 统一全库中文标点规范,优化标点检查工具 (#7382)
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
akfamily/akshare was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 2e13a5f2fb003d299b5c299289c318b7979986e8 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.