Skip to main content

A tool for downloading financial data!

Project description

PyPI - Python Version PyPI Downloads Documentation Status Code style: black akshare Actions Status MIT Licence code style: prettier

Overview

AkShare support Python 3.6+, aims to make fetch financial data as convenient as possible.

Write less, get more!

Installation

General

pip install akshare --ugrade

China

pip install akshare -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com  --upgrade

Docker

docker pull registry.cn-hangzhou.aliyuncs.com/akshare/akdocker

Usage

Code

import akshare as ak
hist_df = ak.stock_us_daily(symbol="AMZN")  # Get U.S. stock Amazon's price info
print(hist_df)

Output

               open     high      low    close   volume
date                                                   
1997-05-15    29.25    30.00    23.13    23.50  6013000
1997-05-16    23.63    23.75    20.50    20.75  1225000
1997-05-19    21.13    21.25    19.50    20.50   508900
1997-05-20    20.75    21.00    19.63    19.63   455600
1997-05-21    19.63    19.75    16.50    17.13  1571100
             ...      ...      ...      ...      ...
2020-02-24  2003.18  2039.30  1987.97  2009.29  6546997
2020-02-25  2026.42  2034.60  1958.42  1972.74  6219094
2020-02-26  1970.28  2014.67  1960.45  1979.59  5240402
2020-02-27  1934.38  1975.00  1882.76  1884.30  8143993
2020-02-28  1814.63  1889.76  1811.13  1883.75  9493797
[5731 rows x 5 columns]

Communication

Pay attention to 数据科学实战 WeChat Official Accounts to get the AkShare updated info:

Application to add AkShare-官方 QQ group and talk about AkShare issues, QQ group number: 326900231

Features

  • Easy: Just one line to fetch the data;
  • Fast: Just copy and paste;
  • Extensible: Easy to customize your own code;
  • Powerful: Python ecosystem.

Tutorials

  1. Overview
  2. Installation
  3. Tutorial
  4. Data Dict
  5. Subjects

Contribution

AkShare is still under developing, feel free to open issues and pull requests:

  • Report or fix bugs
  • Require or publish interface
  • Write or fix documentation
  • Add test cases

Notice: We use Black to format the code

Statement

  1. The data provided by AkShare is for reference only and does not constitute any investment proposal;

  2. Any investor based on AkShare research should pay more attention to data risk;

  3. AkShare will insist on providing open-source financial data;

  4. Based on some uncontrollable factors, some data interfaces in AkShare may be removed;

  5. Please follow the relevant open-source protocol used by AkShare

Show your style

Use the badge in your project's README.md:

[![Data: akshare](https://img.shields.io/badge/Data%20Science-AkShare-green)](https://github.com/jindaxiang/akshare)

Using the badge in README.rst:

.. image:: https://img.shields.io/badge/Data%20Science-AkShare-green
    :target: https://github.com/jindaxiang/akshare

Looks like this:

Data: akshare

Citation

Please 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/jindaxiang/akshare}},
}

Acknowledgement

Special 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 中国银行间市场交易商协会网站;

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 新浪财经网站;

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 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 猫眼电影网站;

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 data provided by 中国期货市场监控中心;

Thanks for the data provided by 宽客在线;

Thanks for the tutorial provided by 微信公众号: Python大咖谈.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akshare-0.4.75.tar.gz (291.5 kB view details)

Uploaded Source

Built Distribution

akshare-0.4.75-py3-none-any.whl (369.5 kB view details)

Uploaded Python 3

File details

Details for the file akshare-0.4.75.tar.gz.

File metadata

  • Download URL: akshare-0.4.75.tar.gz
  • Upload date:
  • Size: 291.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for akshare-0.4.75.tar.gz
Algorithm Hash digest
SHA256 ec4bb069ed2f0f2b433ab49dbf0e2b098adee8ef167434df932883fa441f68cf
MD5 72321e4e620260f1c5d4000b53ebfe30
BLAKE2b-256 dbdcf44c425e985525a853eba1c1173f1b82b6d07ebaf1badd4f6684a86a47d1

See more details on using hashes here.

File details

Details for the file akshare-0.4.75-py3-none-any.whl.

File metadata

  • Download URL: akshare-0.4.75-py3-none-any.whl
  • Upload date:
  • Size: 369.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for akshare-0.4.75-py3-none-any.whl
Algorithm Hash digest
SHA256 3995046c22a4c46bd97cd24addbf592d7eaf3838e2bbb7fa6efa44a4132c2260
MD5 0b2da83b920006deb550083f7210a1e7
BLAKE2b-256 fcccce8b24e31f5d086126ab03058ad7a47f3f87d0e30ce8ba6c0698299cd02c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page