Skip to main content

Minimal Yahoo! Finance API

A minimal library for downloading stock data from Yahoo! Finance into a Pandas DataFrame.

Since I am using this functionality for some time now, I thought I might as well write up this code nicely into a library and make it available.

Example

from mini_yahoo_finance import get_stock_df

df = get_stock_df('ADS.DE',
		  '01-01-2018',
		  end_date='31-01-2018',
		  interval='1d',
		  max_retries=3)

Usage

Accepted values for interval are:

  • 1d (default)
  • 1wk
  • 1mo

If no end_date is provided, the current date will be used.

Installation

git clone https://github.com/lucaionescu/mini-yahoo-finance-api.git
cd mini-yahoo-finance-api/
pip install .

Requirements

  • BeautifulSoup
  • Pandas
  • Requests

Possible future to-dos

  • remove BeautifulSoup dependency
  • bulk download of multiple stocks using multithreading

Suggestions or problems? Don't hesitate to contact me or open a pull request!

Metadata

Release files for mini-yahoo-finance 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mini-yahoo-finance 0.0.7
File Size Uploaded
mini_yahoo_finance-0.0.7.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mini-yahoo-finance 0.0.7
File Interpreter ABI Platform
mini_yahoo_finance-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / mini_yahoo_finance-0.0.7.tar.gz

Download URL mini_yahoo_finance-0.0.7.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3d19d37b3e0cf3178ce5988a9fc9901243feda4a5eb5f427aa87f91147d34eed
BLAKE2b-256 checksum
How to use checksums
1d6d14adc1ae3c71757ff8a27e4a916dc82aaf93cc083482dd2cde36f1512a30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.7

Release files / mini_yahoo_finance-0.0.7-py3-none-any.whl

Download URL mini_yahoo_finance-0.0.7-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
878049afd34f68f582aae1263d383d4523ab3568d01c023274b75387a433abc7
BLAKE2b-256 checksum
How to use checksums
45322f9293c954a7d49463d4ff50cf6e61d970631fa08e377a50af16bc779398
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page