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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file ystockQuery-0.1.0.tar.gz.

File metadata

  • Download URL: ystockQuery-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for ystockQuery-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4cb9aefc8d188d2392ece6896d5d7accc97a7b22d770a08f805329efb0392293
MD5 14189dacb8a9ad0a3911bb6a17624f53
BLAKE2b-256 7560e31990484e7ab73f44f42f501754e914de4084409ba4bde28a54b979be13

See more details on using hashes here.

File details

Details for the file ystockQuery-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ystockQuery-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for ystockQuery-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c447ebfe69a9f168efdbe4e2e61604422377cd8571a33663fab938eb1e1193ca
MD5 abf4f59e6ebdcd54d072366a7b3d5c1e
BLAKE2b-256 a284637e2de0dbf1b8035279a377e014afc740285e040121e63682e6e069facb

See more details on using hashes here.

Supported by

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