Skip to content

yahoofinancer

0.6.1Package record

Fetch Data from Yahoo Finance API

0packages dependsuggested by 1
9.4Kdownloads / year
92.8%test coverage
13/13flavors OK

Overview

About

Obtain historical and near real time data related to stocks, index and currencies from the Yahoo Finance API. This package is community maintained and is not officially supported by 'Yahoo'. The accuracy of data is only as correct as provided on https://finance.yahoo.com/.

Changes in 0.6.1

Bug Fixes & Architectural Improvements

  • **Financial Statements Restoration**: Added working $get_income_statement(), $get_balance_sheet(), and $get_cash_flow() methods on Ticker backed by Yahoo's fundamentals-timeseries endpoint with support for frequency = c("annual", "quarterly"). Updated yf_get_financials() to return tidy tibbles with line items. (#48, #2)
  • **Unified HTTP Request Engine**: Centralized all API communication into a unified internal api_request() helper with automatic retry, timeout, user agent header, and structured error reporting across all endpoints. (#49)
  • **Standardized Failure Contracts**: Multi-symbol routines (Tickers$aggregate_data(), yf_download_prices(), yf_get_financials(), yf_get_market_stats(), yf_get_index_quotes()) consistently warn on failed symbols and return empty tibbles matching documented schemas on full failure. currency_converter(), Ticker$recommendations, and Ticker$valuation_measures unified to standard failure returns. (#50, #61)
  • **Batch Symbol Validation & Offline Construction**: validate() vectorizes symbol queries into a single HTTP request. Added validate = TRUE option on Tickers$new(), Index$new(), and Index$set_index() to permit offline instantiation. (#51, #5, #61)
  • **Date Hygiene & Lookback Limit Enforcement**: get_history() validates dates client-side and enforces intraday lookback boundaries (1m <= 7d, 5m/15m/30m <= 60d, 1h <= 730d). Fixed period = NULL lookback crash. currency_converter() guards against NA date inputs. (#52, #60)
  • **Robust Parsing & Transport Resilience**: Handled transport-level network errors gracefully with informative warnings. Guarded against missing or mismatched adj_close series and invalid JSON payloads. (#60, #17)
  • **Hermetic & Live Smoke Testing**: Expanded offline mock coverage with recorded httptest2 fixtures for fundamentals-timeseries statements, migrated mock fixtures to short paths, and added an offline-guarded live smoke test suite. (#53, #62)
  • **Package Hygiene & Code Style**: Declared R (>= 4.1) floor, removed unused httptest Suggests, configured .lintr with zero remaining lints, added GitHub Actions lint workflow, updated User-Agent to yahoofinancer/<version>, and drafted the fundamental screening vignette. (#54, #57)

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 3.6 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK12 OK, 1 FAILURE2026-06-08
  • WARNING12 OK, 1 WARNING2026-06-07
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.6.1
READMEYes · 445 wordsVignettesYes · 8 · staticNEWSYes · 100% structured · mentions 0.6.1Citation fileNoWebsiteYes · pkgdown
Help pages
14 (3 internal)includes a package overview page
Examples that run
0%11 never run
Exported functions with examples
92%
Documented parameters
100%
Return-value docs
75%
Help pages citing references
0%

Downloads

9.4K
CRAN downloads in the past year
Rank #5,244 · ~26/day · ~784/mo
Daily download trend is not available in this view yet.
69530 days
1.6K90 days
9.4K1 year
Compare downloads with other packages →
Also on690 r2u4 autocran

Repository

19Stars
2Forks
20Open issues
0Open PRs
6Releases
273Commits
1Commit identities
apiapi-wrapperfinancemarket-datarstatsstock-marketyahoo-financeyahoo-finance-api
273 commits · Last activity 2026-10-17 · -5% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
2
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-10-11 · 172026-10-22 · 19
PracticesBeta

13 development-tooling and community-health practices detected across 7 families in the upstream repository

Checks run against github.com/rsquaredacademy/yahoofinancer on 2026-10-22.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (2)
Code of conductContributing guide
Docs source (3)
README.Rmdpkgdown

pkgdown site last built 2026-10-17

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 3 practices
CRAN release process (1)
cran-comments.md
Lint, format, editor (3)
lintrLint workflowRStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-04-24
    Named in .Rbuildignore: .claude
    Named in .gitignore: .claude
    Pull request it wrote: opened by a project member
    Commits: at least 7 crediting it in the message
  • Gemini CLIfirst seen 2026-05-15
    Seen in the repository: GEMINI.md
    Named in .Rbuildignore: .gemini, GEMINI.md
    Named in .gitignore: .gemini, GEMINI.md
Shared conventions any agent may read, so they name no particular tool.
Seen in the repository: AGENTS.md
Models named in its commits
  • Claude Opus 5.57 commits · Oct 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
19 external dependencies (excludes base and recommended)

Installing yahoofinancer adds 25 packages (17 with compiled code, 9.4 MB of source tarballs). Heaviest: openssl 1.1 MB, jsonlite 1.0 MB, vctrs 1.0 MB.

Depends (1)
R >= 4.1
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

People & History

People (1)
Author, Maintainer since 0.1.0 (2022)
Releases (6)

Pick two releases to compare their code metrics.

  • 0.6.1Latest
    record
    2026-10-16 · current release · diff ↗ ·
    added 4 exports
    yf_download_prices, yf_get_financials, yf_get_index_quotes, yf_get_market_stats
    ·
    listed once in CRAN's queue
    Seen in one reading of CRAN's incoming queue, at 2026-10-16 07:45 UTC, so it stayed less than the time between readings.
  • 0.5.0
    record
    2026-05-21 · diff ↗ ·
    added 1 export
    Tickers
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 0.4.0
    record
    2024-11-14 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 0.3.0
    record
    2024-02-03 · diff ↗
  • 0.2.0
    record
    2023-08-09 · diff ↗ ·
    removed 1 export
    currency_summary
  • R
    R 4.3.0 released · 2023-04-21
  • 0.1.0
    record
    2022-09-13
  • R
    R 4.2.0 released · 2022-04-22
Across CRAN, the median accepted release of the past year spent 26 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2022-09-13
Total releases
6 / 4 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1
Download size
496 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("yahoofinancer")
Hebbali, A. (2026). yahoofinancer: Fetch Data from Yahoo Finance API (Version 0.6.1) [Computer software]. https://doi.org/10.32614/CRAN.package.yahoofinancer

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for yahoofinancer version 0.6.1 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy