googlefinance.client is a python client library for google finance.
Project description
googlefinance.client is a python client library for google finance.
Installation
execute:
$ pip install googlefinance.client
Usage
from googlefinance.client import getprices
from datetime import datetime
query = {
'q': "7203", # Stock symbol (ex: "AAPL")
'i': "86400", # Interval size in seconds ("86400" = 1 day intervals)
'x': "TYO", # Stock exchange symbol on which stock is traded (ex: "NASD")
'p': "1Y", # Period (Ex: "1Y" = 1 year)
'ts': datetime.now().timestamp() # Starting timestamp (Unix format). If blank, it uses today.
}
df = getprices(query) # return pandas dataframe
print(df)
# DATE CLOSE HIGH LOW OPEN VOLUME
# 0 2016/05/02 15:00:00 5442 5468 5375 5404 12275800
# 1 2016/05/06 15:00:00 5478 5527 5418 5496 8986000
# 2 2016/05/09 15:00:00 5554 5575 5501 5528 7481300
# 3 2016/05/10 15:00:00 5677 5693 5516 5600 9782500
# 4 2016/05/11 15:00:00 5634 5776 5626 5716 8838100
# 5 2016/05/12 15:00:00 5553 5593 5380 5380 18599200
# .. ... ... ... ... ... ...
Contributing
Fork it
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am 'Add some feature')
Push to the branch (git push origin my-new-feature)
Create new Pull Request
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
Close
Hashes for googlefinance.client-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a315880f322018adc7812820552235e05835a5b7b042e0127433a6546b7023e |
|
MD5 | 2e678654481a64d447ef5995efdffa41 |
|
BLAKE2b-256 | 284e3e9d29c103d3f38fcc4bfe9d683ae223b9aa7f5951220cab1f43c77393cb |