Python 3 wrapper for Yahoo! Finance API
Project description
Stockex
=======
Python 3 wrapper for Yahoo! Finance API.
Requirements
------------
* Python 3
Install
-------
From PYPI:
::
pip install stockex
From Github:
::
git clone https://github.com/cttn/Stockex.git
cd Stockex
python setup.py install
Example Usage
-------------
```
from stockex import stockwrapper as sw
data = sw.YahooData()
# Print Current data of a Stock
print(data.get_current(['GOOG']))
# Print historical data of a Stock
print(data.get_historical("GOOG"))
# Trivial formatting
print("Google stock: Date and Price")
for item in data.get_historical("GOOG"):
print(item['Date'] + '\t' + item['Close'])
# Other methods:
# Do a custom YQL query to Yahoo! Finance YQL API:
data.enquire('select * from yahoo.finance.quotes where symbol in ("GOOG", "C")')
# Get news feed of a Company
data.get_news_feed("GOOG")
# Get options data
data.get_options_info("GOOG")
# Get industry ids
data.get_industry_ids()
# Get industry index from a given id
data.get_industry_index('914')
```
Credits
-------
Based on the Python2.7 (Public Domain) script StockScraper: Code_ and Docs_.
.. _https://github.com/gurch101/StockScraper
.. _http://www.gurchet-rai.net/dev/yahoo-finance-yql
License
-------
Public Domain.
=======
Python 3 wrapper for Yahoo! Finance API.
Requirements
------------
* Python 3
Install
-------
From PYPI:
::
pip install stockex
From Github:
::
git clone https://github.com/cttn/Stockex.git
cd Stockex
python setup.py install
Example Usage
-------------
```
from stockex import stockwrapper as sw
data = sw.YahooData()
# Print Current data of a Stock
print(data.get_current(['GOOG']))
# Print historical data of a Stock
print(data.get_historical("GOOG"))
# Trivial formatting
print("Google stock: Date and Price")
for item in data.get_historical("GOOG"):
print(item['Date'] + '\t' + item['Close'])
# Other methods:
# Do a custom YQL query to Yahoo! Finance YQL API:
data.enquire('select * from yahoo.finance.quotes where symbol in ("GOOG", "C")')
# Get news feed of a Company
data.get_news_feed("GOOG")
# Get options data
data.get_options_info("GOOG")
# Get industry ids
data.get_industry_ids()
# Get industry index from a given id
data.get_industry_index('914')
```
Credits
-------
Based on the Python2.7 (Public Domain) script StockScraper: Code_ and Docs_.
.. _https://github.com/gurch101/StockScraper
.. _http://www.gurchet-rai.net/dev/yahoo-finance-yql
License
-------
Public Domain.
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
Stockex-0.1.1.tar.gz
(3.2 kB
view hashes)
Built Distribution
Stockex-0.1.1.linux-x86_64.exe
(65.1 kB
view hashes)