Python module to get stock data from Yahoo! Finance
Project description
Python module to get stock data from Yahoo! Finance
Install
From PyPI with pip:
$ pip install yahoo-finance
From development repo (requires git)
$ git clone git://github.com/lukaszbanasiak/yahoo-finance.git
$ cd yahoo-finance
$ python setup.py install
Usage examples
Get currency data
Example: EUR/PLN (EURPLN=X)
>>> from yahoo_finance import Currency
>>> eur_pln = Currency('EURPLN')
>>> print eur_pln.get_bid()
'4.2007'
>>> print eur_pln.get_ask()
'4.2091'
>>> print eur_pln.get_rate()
'4.2049'
>>> print eur_pln.get_trade_datetime()
'2014-03-05 11:23:00 UTC+0000'
Refresh data from market
>>> eur_pln.refresh()
>>> print eur_pln.get_rate()
'4.2052'
>>> print eur_pln.get_trade_datetime()
'2014-03-05 11:27:00 UTC+0000'
Avalible methods
get_bid()
get_ask()
get_rate()
get_trade_datetime()
refresh()
Requirements
See requirements.txt
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
yahoo-finance-1.1.4.zip
(12.2 kB
view details)
File details
Details for the file yahoo-finance-1.1.4.zip.
File metadata
- Download URL: yahoo-finance-1.1.4.zip
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2f1ca516fa67a9fa50e960f98aa7a253d40b5fde6cdf2532194cbaefa4fcccb
|
|
| MD5 |
1778c7078789a528751e45ca4e2b39ed
|
|
| BLAKE2b-256 |
9e9b77799f9f4fa9578e5a6f52e8cfad7e1ae22a59dc4934d651ace4433fbc60
|