Skip to main content

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


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)

Uploaded Source

Built Distribution

ystockQuery-0.1.0-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page