{"id":37018938,"url":"https://github.com/sfuhrm/yahoofinance-api","last_synced_at":"2026-01-14T02:01:56.312Z","repository":{"id":78032021,"uuid":"245853092","full_name":"sfuhrm/yahoofinance-api","owner":"sfuhrm","description":"Java Client API for Yahoo Finance","archived":false,"fork":true,"pushed_at":"2024-06-26T09:50:11.000Z","size":4687,"stargazers_count":22,"open_issues_count":0,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-26T22:03:45.144Z","etag":null,"topics":["historical-data","java","stock-market","stock-prices","stocks","yahoo-finance","yahoo-finance-api","yahoo-finance-apis"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sstrickx/yahoofinance-api","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sfuhrm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-03-08T16:58:26.000Z","updated_at":"2024-06-26T09:50:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sfuhrm/yahoofinance-api","commit_stats":{"total_commits":199,"total_committers":17,"mean_commits":"11.705882352941176","dds":"0.35678391959798994","last_synced_commit":"774008dd8d56a67e64ff8ebb30a3de5078447edf"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/sfuhrm/yahoofinance-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfuhrm%2Fyahoofinance-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfuhrm%2Fyahoofinance-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfuhrm%2Fyahoofinance-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfuhrm%2Fyahoofinance-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sfuhrm","download_url":"https://codeload.github.com/sfuhrm/yahoofinance-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfuhrm%2Fyahoofinance-api/sbom","scorecard":{"id":814192,"data":{"date":"2025-08-11","repo":{"name":"github.com/sfuhrm/yahoofinance-api","commit":"b7e278f76b6514db24664971390af0ef1201b3ba"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/jacoco-badge.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/sfuhrm/yahoofinance-api/jacoco-badge.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/maven.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/sfuhrm/yahoofinance-api/maven.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/maven.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/sfuhrm/yahoofinance-api/maven.yml/master?enable=pin","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/jacoco-badge.yml:1","Warn: no topLevel permission defined: .github/workflows/maven.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T13:51:01.976Z","repository_id":78032021,"created_at":"2025-08-23T13:51:01.976Z","updated_at":"2025-08-23T13:51:01.976Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["historical-data","java","stock-market","stock-prices","stocks","yahoo-finance","yahoo-finance-api","yahoo-finance-apis"],"created_at":"2026-01-14T02:01:55.719Z","updated_at":"2026-01-14T02:01:56.304Z","avatar_url":"https://github.com/sfuhrm.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Finance Quotes API for Yahoo Finance (Java)\n\n[![Java CI with Maven](https://github.com/sfuhrm/yahoofinance-api/actions/workflows/maven.yml/badge.svg)](https://github.com/sfuhrm/yahoofinance-api/actions/workflows/maven.yml)\n[![Coverage](https://raw.githubusercontent.com/sfuhrm/yahoofinance-api/master/.github/badges/jacoco.svg)](https://github.com/sfuhrm/yahoofinance-api/actions)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/de.sfuhrm/YahooFinanceAPI/badge.svg)](https://maven-badges.herokuapp.com/maven-central/de.sfuhrm/YahooFinanceAPI)\n[![javadoc](https://javadoc.io/badge2/de.sfuhrm/YahooFinanceAPI/javadoc.svg)](https://javadoc.io/doc/de.sfuhrm/YahooFinanceAPI)\n[![ReleaseDate](https://img.shields.io/github/release-date/sfuhrm/yahoofinance-api)](https://github.com/sfuhrm/yahoofinance-api/releases)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\n### About this fork\n\nThis is a fork of sstrickx' yahoofinanceapi which can be found [here](https://github.com/sstrickx/yahoofinance-api).\n\nThe original repository seems to be no longer maintained. The intention of this fork is to provide a release with\nbugfixes, not new features.\n\nThe changes in this fork are:\n\n* Proper closing of input/output streams, thereby working properly with HTTPS sockets.\n* Several fixes of deprecation warnings.\n* Raise minimum Java required to JDK 8.\n* Adding/changing of some badges in the project README.md.\n* Change Maven group id to 'de.sfuhrm'.\n* Add Github actions for continuous integration.\n\nBesides these changes, the software can be used as a drop-in replacement for sstrickx' Maven artifacts.\n\n### About the library\n\nThis library provides some methods that should make it easy to communicate with the Yahoo Finance API. It allows you to request detailed information, some statistics and historical quotes on stocks. Separate functionality is available to request a simple FX quote.\nPlease check the javadoc (available in dist directory) to get a complete overview of the available methods and to get an idea of which data is available from Yahoo Finance.\n\n\u003e This project is not associated with nor sponsored by Yahoo! Inc. Yahoo! Inc. is the exclusive owner of all trademark and other intellectual property rights in and to the YAHOO! and Y! trademarks (the \"Trademarks\"), including the stylized YAHOO! and Y! logos. Yahoo! Inc. owns trademark registrations for the Trademarks.\n\n## Add to your project as a dependency\n### Maven\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ede.sfuhrm\u003c/groupId\u003e\n    \u003cartifactId\u003eYahooFinanceAPI\u003c/artifactId\u003e\n    \u003cversion\u003ex.y.z\u003c/version\u003e\n\u003c/dependency\u003e\n```\n### Gradle\n```groovy\ndependencies {\n    compile group: 'de.sfuhrm', name: 'YahooFinanceAPI', version: 'x.y.z'\n}\n```\n### Ivy\n```xml\n\u003cdependency org=\"de.sfuhrm\" name=\"YahooFinanceAPI\" rev=\"x.y.z\" /\u003e\n```\n\n# Examples\n## Single stock\n```java\nStock stock = YahooFinance.get(\"INTC\");\n\nBigDecimal price = stock.getQuote().getPrice();\nBigDecimal change = stock.getQuote().getChangeInPercent();\nBigDecimal peg = stock.getStats().getPeg();\nBigDecimal dividend = stock.getDividend().getAnnualYieldPercent();\n\nstock.print();\n```\nOutput:\n```\nINTC\n--------------------------------\nsymbol: INTC\nname: Intel Corporation\ncurrency: USD\nstockExchange: NasdaqNM\nquote: Ask: 32.25, Bid: 32.24, Price: 32.2485, Prev close: 33.62\nstats: EPS: 2.019, PE: 16.65, PEG: 1.74\ndividend: Pay date: Mon Dec 01 06:00:00 CET 2014, Ex date: Tue Aug 05 06:00:00 CEST 2014, Annual yield: 2.68%\nhistory: null\n--------------------------------\n```\n\n## Single stock, easy refresh\n```java\nStock stock = YahooFinance.get(\"INTC\");\ndouble price = stock.getQuote(true).getPrice();\n```\nThis will also automatically refresh the statistics and dividend data of the stock in a single request to Yahoo Finance.\nPlease be aware that it wouldn't be a good idea to call the getQuote(true), getStats(true) or getDividend(true) too much in a short timespan as this will cost too much delay without providing any added value. There's no problem to call the versions of those methods without argument or with the argument set to false.\n\n## Multiple stocks at once\n```java\nString[] symbols = new String[] {\"INTC\", \"BABA\", \"TSLA\", \"AIR.PA\", \"YHOO\"};\nMap\u003cString, Stock\u003e stocks = YahooFinance.get(symbols); // single request\nStock intel = stocks.get(\"INTC\");\nStock airbus = stocks.get(\"AIR.PA\");\n```\n\n## FX quote\n```java\nFxQuote usdeur = YahooFinance.getFx(FxSymbols.USDEUR);\nFxQuote usdgbp = YahooFinance.getFx(\"USDGBP=X\");\nSystem.out.println(usdeur);\nSystem.out.println(usdgbp);\n```\nOutput:\n```\nUSDEUR=X: 0.7842\nUSDGBP=X: 0.6253\n```\n\n## Single stock, include historical quotes (1)\n```java\nStock tesla = YahooFinance.get(\"TSLA\", true);\nSystem.out.println(tesla.getHistory());\n```\nOutput: (Symbol@Date: low-high, open-\u003eclose (adjusted close))\n```\n[TSLA@2014-10-01: 217.32-265.54, 242.2-\u003e229.7 (229.7), TSLA@2014-09-02: 240.12-291.42, 275.5-\u003e242.68 (242.68), ...]\n```\n\n## Single stock, include historical quotes (2)\n```java\nCalendar from = Calendar.getInstance();\nCalendar to = Calendar.getInstance();\nfrom.add(Calendar.YEAR, -5); // from 5 years ago\n\nStock google = YahooFinance.get(\"GOOG\", from, to, Interval.WEEKLY);\n```\n\n## Multiple stocks, include historical quotes\n```java\nString[] symbols = new String[] {\"INTC\", \"BABA\", \"TSLA\", \"AIR.PA\", \"YHOO\"};\n// Can also be done with explicit from, to and Interval parameters\nMap\u003cString, Stock\u003e stocks = YahooFinance.get(symbols, true);\nStock intel = stocks.get(\"INTC\");\nStock airbus = stocks.get(\"AIR.PA\");\n```\n\n## Alternatives for historical quotes\nIf the historical quotes are not yet available, the getHistory() method will automatically send a new request to Yahoo Finance.\n```java\nStock google = YahooFinance.get(\"GOOG\");\nList\u003cHistoricalQuote\u003e googleHistQuotes = google.getHistory();\n```\nOr you could explicitly define the from, to and Interval parameters to force a new request.\nCheck the javadoc for more variations on the getHistory method\n```java\nCalendar from = Calendar.getInstance();\nCalendar to = Calendar.getInstance();\nfrom.add(Calendar.YEAR, -1); // from 1 year ago\n\nStock google = YahooFinance.get(\"GOOG\");\nList\u003cHistoricalQuote\u003e googleHistQuotes = google.getHistory(from, to, Interval.DAILY);\n// googleHistQuotes is the same as google.getHistory() at this point\n// provide some parameters to the getHistory method to send a new request to Yahoo Finance\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfuhrm%2Fyahoofinance-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsfuhrm%2Fyahoofinance-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfuhrm%2Fyahoofinance-api/lists"}