{"id":13449003,"url":"https://github.com/akfamily/akshare","last_synced_at":"2026-04-06T08:02:59.647Z","repository":{"id":36952641,"uuid":"212037775","full_name":"akfamily/akshare","owner":"akfamily","description":"AKShare is an elegant and simple financial data interface library for Python, built for human beings! 开源财经数据接口库","archived":false,"fork":false,"pushed_at":"2025-05-13T08:41:03.000Z","size":3921,"stargazers_count":11691,"open_issues_count":0,"forks_count":2223,"subscribers_count":220,"default_branch":"main","last_synced_at":"2025-05-13T11:08:07.308Z","etag":null,"topics":["academic","akshare","asset-pricing","bond","currency","data","data-analysis","data-science","datasets","economic-data","economics","finance","finance-api","financial-data","fundamental","futures","option","quant","stock"],"latest_commit_sha":null,"homepage":"https://akshare.akfamily.xyz","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akfamily.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-01T07:34:12.000Z","updated_at":"2025-05-13T08:40:05.000Z","dependencies_parsed_at":"2023-12-31T10:24:20.377Z","dependency_job_id":"45e5bd18-190a-4108-b90c-225206f70891","html_url":"https://github.com/akfamily/akshare","commit_stats":{"total_commits":4071,"total_committers":65,"mean_commits":62.63076923076923,"dds":"0.22844509948415626","last_synced_commit":"abf34d58700ce73af628cf2cf6d6cc1386b6b123"},"previous_names":["jindaxiang/akshare"],"tags_count":2206,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akfamily%2Fakshare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akfamily%2Fakshare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akfamily%2Fakshare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akfamily%2Fakshare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akfamily","download_url":"https://codeload.github.com/akfamily/akshare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253929367,"owners_count":21985802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["academic","akshare","asset-pricing","bond","currency","data","data-analysis","data-science","datasets","economic-data","economics","finance","finance-api","financial-data","fundamental","futures","option","quant","stock"],"created_at":"2024-07-31T06:00:28.236Z","updated_at":"2026-04-02T11:53:36.341Z","avatar_url":"https://github.com/akfamily.png","language":"Python","funding_links":[],"categories":["Data Sources","Python","下载器","Data Source","开发工具\u0026框架","金融数据","Open Data Tools","Data Analysis","📚 书单与资源：书、社区、数据源、研报和竞赛","Tools and Platforms","精选文章","Utilities"],"sub_categories":["General","Stocks and General","A 股数据源","On-Chain / DeFi Quantitative Strategies","AI金融与量化投资"],"readme":"**资源分享**：对于想了解更多财经数据与量化投研的小伙伴，推荐一个专注于财经数据和量化研究的知识社区。\n该社区提供相关文档和视频学习资源，汇集了各类财经数据源和量化投研工具的使用经验。\n有兴趣深入学习的朋友可点此[了解更多](https://t.zsxq.com/ZCxUG)，也推荐大家关注微信公众号【数据科学实战】。\n\n**重磅推荐**：AKQuant 是一款专为 **量化投研 (Quantitative Research)** 打造的高性能量化回测框架。它以 Rust 铸造极速撮合内核，\n以 Python 链接数据与 AI 生态，旨在为量化投资者提供可靠高效的量化投研解决方案。参见[AKQuant](https://github.com/akfamily/akquant)\n\n**工具推荐**：期魔方是一款本地化期货量化分析工具，适合数据分析爱好者使用。无需复杂部署，支持数据分析和机器学习功能，研究功能免费开放。\n如需了解更多信息可访问[期魔方](https://qmfquant.com)。\n\n![AKShare Logo](https://github.com/akfamily/akshare/blob/main/assets/images/akshare_logo.jpg)\n\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/akshare.svg)](https://pypi.org/project/akshare/)\n[![PyPI](https://img.shields.io/pypi/v/akshare.svg)](https://pypi.org/project/akshare/)\n[![PyPI Downloads](https://static.pepy.tech/personalized-badge/akshare?period=total\u0026units=INTERNATIONAL_SYSTEM\u0026left_color=BLACK\u0026right_color=GREEN\u0026left_text=downloads)](https://pepy.tech/projects/akshare)\n[![Documentation Status](https://readthedocs.org/projects/akshare/badge/?version=latest)](https://akshare.readthedocs.io/?badge=latest)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![akshare](https://img.shields.io/badge/Data%20Science-AKShare-green)](https://github.com/akfamily/akshare)\n[![Actions Status](https://github.com/akfamily/akshare/actions/workflows/release_and_deploy.yml/badge.svg)](https://github.com/akfamily/akshare/actions)\n[![MIT Licence](https://img.shields.io/badge/license-MIT-blue)](https://github.com/akfamily/akshare/blob/main/LICENSE)\n[![](https://img.shields.io/github/forks/jindaxiang/akshare)](https://github.com/akfamily/akshare)\n[![](https://img.shields.io/github/stars/jindaxiang/akshare)](https://github.com/akfamily/akshare)\n[![](https://img.shields.io/github/issues/jindaxiang/akshare)](https://github.com/akfamily/akshare)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\n## Overview\n\n[AKShare](https://github.com/akfamily/akshare) requires Python(64 bit) 3.9 or higher and\naims to simplify the process of fetching financial data.\n\n**Write less, get more!**\n\n- Documentation: [中文文档](https://akshare.akfamily.xyz/)\n\n## Installation\n\n### General\n\n```shell\npip install akshare --upgrade\n```\n\n### China\n\n```shell\npip install akshare -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com  --upgrade\n```\n\n### PR\n\nPlease check out [Documentation](https://akshare.akfamily.xyz/contributing.html) if you\nwant to contribute to AKShare\n\n### Docker\n\n#### Pull images\n\n```shell\ndocker pull registry.cn-shanghai.aliyuncs.com/akfamily/aktools:jupyter\n```\n\n#### Run Container\n\n```shell\ndocker run -it registry.cn-shanghai.aliyuncs.com/akfamily/aktools:jupyter python\n```\n\n#### Test\n\n```python\nimport akshare as ak\n\nprint(ak.__version__)\n```\n\n## Usage\n\n### Data\n\nCode:\n\n```python\nimport akshare as ak\n\nstock_zh_a_hist_df = ak.stock_zh_a_hist(symbol=\"000001\", period=\"daily\", start_date=\"20170301\", end_date='20231022', adjust=\"\")\nprint(stock_zh_a_hist_df)\n```\n\nOutput:\n\n```\n      日期          开盘   收盘    最高  ...  振幅   涨跌幅  涨跌额  换手率\n0     2017-03-01   9.49   9.49   9.55  ...  0.84  0.11  0.01  0.21\n1     2017-03-02   9.51   9.43   9.54  ...  1.26 -0.63 -0.06  0.24\n2     2017-03-03   9.41   9.40   9.43  ...  0.74 -0.32 -0.03  0.20\n3     2017-03-06   9.40   9.45   9.46  ...  0.74  0.53  0.05  0.24\n4     2017-03-07   9.44   9.45   9.46  ...  0.63  0.00  0.00  0.17\n          ...    ...    ...    ...  ...   ...   ...   ...   ...\n1610  2023-10-16  11.00  11.01  11.03  ...  0.73  0.09  0.01  0.26\n1611  2023-10-17  11.01  11.02  11.05  ...  0.82  0.09  0.01  0.25\n1612  2023-10-18  10.99  10.95  11.02  ...  1.00 -0.64 -0.07  0.34\n1613  2023-10-19  10.91  10.60  10.92  ...  3.01 -3.20 -0.35  0.61\n1614  2023-10-20  10.55  10.60  10.67  ...  1.51  0.00  0.00  0.27\n[1615 rows x 11 columns]\n```\n\n### Plot\n\nCode:\n\n```python\nimport akshare as ak\nimport mplfinance as mpf  # Please install mplfinance as follows: pip install mplfinance\n\nstock_us_daily_df = ak.stock_us_daily(symbol=\"AAPL\", adjust=\"qfq\")\nstock_us_daily_df = stock_us_daily_df.set_index([\"date\"])\nstock_us_daily_df = stock_us_daily_df[\"2020-04-01\": \"2020-04-29\"]\nmpf.plot(stock_us_daily_df, type=\"candle\", mav=(3, 6, 9), volume=True, show_nontrading=False)\n```\n\nOutput:\n\n![KLine](https://jfds-1252952517.cos.ap-chengdu.myqcloud.com/akshare/readme/home/AAPL_candle.png)\n\n## Features\n\n- **Easy of use**: Just one line code to fetch the data;\n- **Extensible**: Easy to customize your own code with other application;\n- **Powerful**: Python ecosystem.\n\n## Tutorials\n\n1. [Overview](https://akshare.akfamily.xyz/introduction.html)\n2. [Installation](https://akshare.akfamily.xyz/installation.html)\n3. [Tutorial](https://akshare.akfamily.xyz/tutorial.html)\n4. [Data Dict](https://akshare.akfamily.xyz/data/index.html)\n5. [Subjects](https://akshare.akfamily.xyz/topic/index.html)\n\n## Contribution\n\n[AKShare](https://github.com/akfamily/akshare) is still under developing, feel free to open issues and pull requests:\n\n- Report or fix bugs\n- Require or publish interface\n- Write or fix documentation\n- Add test cases\n\n\u003e Notice: We use [Ruff](https://github.com/astral-sh/ruff) to format the code\n\n## Statement\n\n1. All data provided by [AKShare](https://github.com/akfamily/akshare) is just for academic research purpose;\n2. The data provided by [AKShare](https://github.com/akfamily/akshare) is for reference only and does not constitute any investment proposal;\n3. Any investor based on [AKShare](https://github.com/akfamily/akshare) research should pay more attention to data risk;\n4. [AKShare](https://github.com/akfamily/akshare) will insist on providing open-source financial data;\n5. Based on some uncontrollable factors, some data interfaces in [AKShare](https://github.com/akfamily/akshare) may be removed;\n6. Please follow the relevant open-source protocol used by [AKShare](https://github.com/akfamily/akshare);\n7. Provide HTTP API for the person who uses other program language: [AKTools](https://aktools.readthedocs.io/).\n\n## Show your style\n\nUse the badge in your project's README.md:\n\n```markdown\n[![Data: akshare](https://img.shields.io/badge/Data%20Science-AKShare-green)](https://github.com/akfamily/akshare)\n```\n\nUsing the badge in README.rst:\n\n```\n.. image:: https://img.shields.io/badge/Data%20Science-AKShare-green\n    :target: https://github.com/akfamily/akshare\n```\n\nLooks like this:\n\n[![Data: akshare](https://img.shields.io/badge/Data%20Science-AKShare-green)](https://github.com/akfamily/akshare)\n\n## Citation\n\nPlease use this **bibtex** if you want to cite this repository in your publications:\n\n```markdown\n@misc{akshare,\n    author = {Albert King and Yaojie Zhang},\n    title = {AKShare},\n    year = {2022},\n    publisher = {GitHub},\n    journal = {GitHub repository},\n    howpublished = {\\url{https://github.com/akfamily/akshare}},\n}\n```\n\n## Acknowledgement\n\nSpecial thanks [FuShare](https://github.com/LowinLi/fushare) for the opportunity of learning from the project;\n\nSpecial thanks [TuShare](https://github.com/waditu/tushare) for the opportunity of learning from the project;\n\nThanks for the data provided by [东方财富网站](http://data.eastmoney.com);\n\nThanks for the data provided by [新浪财经网站](https://finance.sina.com.cn);\n\nThanks for the data provided by [金十数据网站](https://www.jin10.com/);\n\nThanks for the data provided by [生意社网站](http://www.100ppi.com/);\n\nThanks for the data provided by [中国银行间市场交易商协会网站](http://www.nafmii.org.cn/);\n\nThanks for the data provided by [99期货网站](http://www.99qh.com/);\n\nThanks for the data provided by [中国外汇交易中心暨全国银行间同业拆借中心网站](http://www.chinamoney.com.cn/chinese/);\n\nThanks for the data provided by [和讯财经网站](http://www.hexun.com/);\n\nThanks for the data provided by [DACHENG-XIU 网站](https://dachxiu.chicagobooth.edu/);\n\nThanks for the data provided by [上海证券交易所网站](http://www.sse.com.cn/assortment/options/price/);\n\nThanks for the data provided by [深证证券交易所网站](http://www.szse.cn/);\n\nThanks for the data provided by [北京证券交易所网站](http://www.bse.cn/);\n\nThanks for the data provided by [中国金融期货交易所网站](http://www.cffex.com.cn/);\n\nThanks for the data provided by [上海期货交易所网站](http://www.shfe.com.cn/);\n\nThanks for the data provided by [大连商品交易所网站](http://www.dce.com.cn/);\n\nThanks for the data provided by [郑州商品交易所网站](http://www.czce.com.cn/);\n\nThanks for the data provided by [上海国际能源交易中心网站](http://www.ine.com.cn/);\n\nThanks for the data provided by [Timeanddate 网站](https://www.timeanddate.com/);\n\nThanks for the data provided by [河北省空气质量预报信息发布系统网站](http://110.249.223.67/publish/);\n\nThanks for the data provided by [Economic Policy Uncertainty 网站](http://www.nanhua.net/nhzc/varietytrend.html);\n\nThanks for the data provided by [申万指数网站](http://www.swsindex.com/idx0120.aspx?columnid=8832);\n\nThanks for the data provided by [真气网网站](https://www.zq12369.com/);\n\nThanks for the data provided by [财富网站](http://www.fortunechina.com/);\n\nThanks for the data provided by [中国证券投资基金业协会网站](http://gs.amac.org.cn/);\n\nThanks for the data provided by [Expatistan 网站](https://www.expatistan.com/cost-of-living);\n\nThanks for the data provided by [北京市碳排放权电子交易平台网站](https://www.bjets.com.cn/article/jyxx/);\n\nThanks for the data provided by [国家金融与发展实验室网站](http://www.nifd.cn/);\n\nThanks for the data provided by [义乌小商品指数网站](http://www.ywindex.com/Home/Product/index/);\n\nThanks for the data provided by [百度迁徙网站](https://qianxi.baidu.com/?from=shoubai#city=0);\n\nThanks for the data provided by [思知网站](https://www.ownthink.com/);\n\nThanks for the data provided by [Currencyscoop 网站](https://currencyscoop.com/);\n\nThanks for the data provided by [新加坡交易所网站](https://www.sgx.com/zh-hans/research-education/derivatives);\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakfamily%2Fakshare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakfamily%2Fakshare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakfamily%2Fakshare/lists"}