A Yahoo Finance wrapper for stock quotes and historical data
Project description
ystockQuery
A Yahoo Finance wrapper for stock quotes and historical data
Install:
pip install ystockQuery
Examples:
import ystockQuery
# init Ystock class for Square, Inc.
sq = ystockQuery.Ystock("SQ")
# return a list of history data between start date and end date
hist = sq.history("1-1-2019", "1-1-2020")
# return data for a specifc date from the history
data = hist.atDate("3-12-2019")
print(data.getVolume())
print(data.getLow())
print(data.getOpen())
print(data.getHigh())
print(data.getClose())
print(data.getAdjClose())
# format full history data to dict format
print(hist.toDict())
"""
{
1546439400:
{
'volume': 5273100,
'low': 36.0,
'open': 36.20000076293945,
'high': 36.75,
'close': 36.52000045776367,
'adjclose': 34.28937911987305
}
}
"""
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
ystockQuery-0.1.0.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for ystockQuery-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c447ebfe69a9f168efdbe4e2e61604422377cd8571a33663fab938eb1e1193ca |
|
MD5 | abf4f59e6ebdcd54d072366a7b3d5c1e |
|
BLAKE2b-256 | a284637e2de0dbf1b8035279a377e014afc740285e040121e63682e6e069facb |