Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fuermosi777/china-stock
Python module to get stock info from Chinese SH & SZ stock exchanges
https://github.com/fuermosi777/china-stock
Last synced: about 1 month ago
JSON representation
Python module to get stock info from Chinese SH & SZ stock exchanges
- Host: GitHub
- URL: https://github.com/fuermosi777/china-stock
- Owner: fuermosi777
- License: other
- Archived: true
- Created: 2015-06-04T22:26:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-01T12:40:58.000Z (over 9 years ago)
- Last Synced: 2024-10-12T20:38:19.050Z (2 months ago)
- Language: Python
- Size: 195 KB
- Stars: 20
- Watchers: 7
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-fintech - china-stock - Python module to get stock info from Chinese SH & SZ stock exchanges. (Libraries / Python)
README
china-stock
===========.. image:: https://travis-ci.org/fuermosi777/china-stock.svg?branch=master
Author: `Hao Liu `_
~~~~~~~
Install
~~~~~~~::
$ pip install china-stock
~~~
Use
~~~Import china-stock module:
::
>>> import chinastock as csGet stock prices information on nearest trading day:
::
>>> cs.get_stock_today(code='000001', exchange='SZ')
Get historical stock close prices:
::
>>> cs.get_stock_history(code='000001', exchange='SZ')
Get stock's adjusted close prices, open, high, low, volume, and change:
::
>>> cs.get_stock_history_adj(code='000001', exchange='SZ')
~~~~~~
Update
~~~~~~07/14/2015:
* Add :code:`get_stock_history` and :code:`get_stock_history_adj` methods
* :code:`get_stock_today` method return strings, not :code:`datetime`