在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:akshare开源软件地址:https://gitee.com/akshare/akshare开源软件介绍:本次发布 AKTools 作为 AKShare 的 HTTP API 版本,突破 Python 语言的限制,欢迎各位小伙伴试用并提出更好的意见或建议! 点击 AKTools 查看使用指南。另外提供 awesome-data 方便各位小伙伴查询各种数据源 OverviewAKShare requires Python(64 bit) 3.7 or greater, aims to make fetch financial data as convenient as possible. Write less, get more!
InstallationGeneralpip install akshare --upgrade Chinapip install akshare -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com --upgrade PRPlease check out documentation if you want to contribute to AKShare DockerPull imagesdocker pull registry.cn-hangzhou.aliyuncs.com/akshare/akdocker Run AKDockerdocker run -it registry.cn-hangzhou.aliyuncs.com/akshare/akdocker python Test AKDockerimport akshare as akak.__version__ UsageDataCode import akshare as akstock_zh_a_hist_df = ak.stock_zh_a_hist(symbol="000001", period="daily", start_date="20170301", end_date='20210907', adjust="")print(stock_zh_a_hist_df) Output 日期 开盘 收盘 最高 ... 振幅 涨跌幅 涨跌额 换手率0 2017-03-01 9.49 9.49 9.55 ... 0.84 0.11 0.01 0.211 2017-03-02 9.51 9.43 9.54 ... 1.26 -0.63 -0.06 0.242 2017-03-03 9.41 9.40 9.43 ... 0.74 -0.32 -0.03 0.203 2017-03-06 9.40 9.45 9.46 ... 0.74 0.53 0.05 0.244 2017-03-07 9.44 9.45 9.46 ... 0.63 0.00 0.00 0.17 ... ... ... ... ... ... ... ... ...1100 2021-09-01 17.48 17.88 17.92 ... 5.11 0.45 0.08 1.191101 2021-09-02 18.00 18.40 18.78 ... 5.48 2.91 0.52 1.251102 2021-09-03 18.50 18.04 18.50 ... 4.35 -1.96 -0.36 0.721103 2021-09-06 17.93 18.45 18.60 ... 4.55 2.27 0.41 0.781104 2021-09-07 18.60 19.24 19.56 ... 6.56 4.28 0.79 0.84[1105 rows x 11 columns] PlotCode import akshare as akimport mplfinance as mpf # Please install mplfinance as follows: pip install mplfinancestock_us_daily_df = ak.stock_us_daily(symbol="AAPL", adjust="qfq")stock_us_daily_df = stock_us_daily_df[["open", "high", "low", "close", "volume"]]stock_us_daily_df.columns = ["Open", "High", "Low", "Close", "Volume"]stock_us_daily_df.index.name = "Date"stock_us_daily_df = stock_us_daily_df["2020-04-01": "2020-04-29"]mpf.plot(stock_us_daily_df, type='candle', mav=(3, 6, 9), volume=True, show_nontrading=False) Output CommunicationPay attention to 数据科学家 Official Accounts to get more information about Quant, ML, DS and so on, please visit 数据科学家 for more information: Pay attention to 数据科学实战 WeChat Official Accounts to get the AKShare updated info: Features
TutorialsContributionAKShare is still under developing, feel free to open issues and pull requests:
Statement
Show your styleUse the badge in your project's README.md: [![Data: akshare](https://img.shields.io/badge/Data%20Science-AKShare-green)](https://github.com/akfamily/akshare) Using the badge in README.rst: .. image:: https://img.shields.io/badge/Data%20Science-AKShare-green :target: https://github.com/akfamily/akshare Looks like this: CitationPlease use this bibtex if you want to cite this repository in your publications: @misc{akshare, author = {Albert King}, title = {AKShare}, year = {2019}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/akfamily/akshare}},} AcknowledgementSpecial thanks FuShare for the opportunity of learning from the project; Special thanks TuShare for the opportunity of learning from the project; Thanks for the data provided by 生意社网站; Thanks for the data provided by 奇货可查网站; Thanks for the data provided by 中国银行间市场交易商协会网站; Thanks for the data provided by 99期货网站; Thanks for the data provided by 英为财情网站; Thanks for the data provided by 中国外汇交易中心暨全国银行间同业拆借中心网站; Thanks for the data provided by 金十数据网站; Thanks for the data provided by 和讯财经网站; Thanks for the data provided by 新浪财经网站; Thanks for the data provided by Oxford-Man Institute 网站; Thanks for the data provided by DACHENG-XIU 网站; Thanks for the data provided by 上海证券交易所网站; Thanks for the data provided by 深证证券交易所网站; Thanks for the data provided by 北京证券交易所网站; Thanks for the data provided by 中国金融期货交易所网站; Thanks for the data provided by 上海期货交易所网站; Thanks for the data provided by 大连商品交易所网站; Thanks for the data provided by 郑州商品交易所网站; Thanks for the data provided by 上海国际能源交易中心网站; Thanks for the data provided by Timeanddate 网站; Thanks for the data provided by 河北省空气质量预报信息发布系统网站; Thanks for the data provided by 南华期货网站; Thanks for the data provided by Economic Policy Uncertainty 网站; Thanks for the data provided by 微博指数网站; Thanks for the data provided by 百度指数网站; Thanks for the data provided by 谷歌指数网站; Thanks for the data provided by 申万指数网站; Thanks for the data provided by 真气网网站; Thanks for the data provided by 财富网站; Thanks for the data provided by 中国证券投资基金业协会网站; Thanks for the data provided by Expatistan 网站; Thanks for the data provided by 北京市碳排放权电子交易平台网站; Thanks for the data provided by 国家金融与发展实验室网站; Thanks for the data provided by IT桔子网站; Thanks for the data provided by 东方财富网站; Thanks for the data provided by 义乌小商品指数网站; Thanks for the data provided by 中国国家发展和改革委员会网站; Thanks for the data provided by 163网站; Thanks for the data provided by 丁香园网站; Thanks for the data provided by 百度新型肺炎网站; Thanks for the data provided by 百度迁徙网站; Thanks for the data provided by 新型肺炎-相同行程查询工具网站; Thanks for the data provided by 新型肺炎-小区查询网站; Thanks for the data provided by 商业特许经营信息管理网站; Thanks for the data provided by 慈善中国网站; Thanks for the data provided by 思知网站; Thanks for the data provided by Currencyscoop 网站; Thanks for the data provided by 新加坡交易所网站; Thanks for the tutorials provided by 微信公众号: Python大咖谈. Backer and Sponsor |
请发表评论