Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Yahoo Finance

Yahoo Finance Laravel Package

dejwcake/yahoo-finance

dejwcake/yahoo-finance is a Laravel/PHP package for integrating Yahoo Finance market data into your applications. Use it to retrieve stock quotes and financial information through a simple API, making it easier to add market data features to your projects.

View on GitHub
Deep Wiki
Context7

dejwcake/yahoo-finance is a lightweight Laravel package for retrieving market data from Yahoo Finance. It offers a simple, expressive API for adding quotes and historical pricing to your application without maintaining a custom HTTP client or scraper.

  • Laravel service provider and facade integration
  • Quote lookup by ticker symbol
  • Historical price data retrieval
  • Configurable caching and endpoints
Frequently asked questions about Yahoo Finance
How do I install dejwcake/yahoo-finance in a Laravel app?
Run composer require dejwcake/yahoo-finance and let Composer resolve the 2.x line. Nothing else is required in a standard Laravel application: the 2.0.1 release notes describe no service provider, config publish step, or migration. Commit the composer.json and composer.lock changes, then call the client from a controller, job, or console command.
What data can I retrieve with this package?
It wraps Yahoo Finance endpoints for stock quotes, company information, and historical prices. That covers typical dashboard needs: last price and daily movement, profile and fundamentals for a detail page, and a time series for charting or simple analysis. Check the README for exact method names and return shapes before wiring responses into views.
Which PHP and Laravel versions does it support?
The 2.x line is exercised in CI on PHP 8.2, 8.3, and 8.4, so those are the defensible targets. PHP 8.5 appears only in dev tooling such as Docker services and phpunit.xml, which is not a runtime support statement. The package is framework-agnostic and does not pin a Laravel version in its overview, so confirm the require constraints in its composer.json before planning a Laravel major upgrade.
Do I need a Yahoo Finance API key or account?
The package overview documents no API key, account, or token, which is consistent with Yahoo Finance's public endpoints. Those endpoints are unofficial and undocumented, so treat availability and response shape as best effort rather than a contract. If you need guaranteed uptime and support, an authenticated data vendor is the safer choice.
Is this a Laravel package with a service provider and config file?
No. It is a plain Composer package you instantiate and call from your own code, with no facade, service provider, or publishable config described. That helps portability: the same client works in Laravel, Lumen, or a standalone PHP script. Wrap it in your own application service if you want it injected or swapped out in tests.
How do I upgrade from 1.x to 2.x, and is 2.0.1 a breaking change?
From any 2.0.x, update the constraint to ^2.0.1, run composer update dejwcake/yahoo-finance, run your test suite, and ship; the publisher states there is nothing to do on upgrade. Moving from 1.x is a separate, scoped migration, because the breaking changes introduced in 2.0.0 are not described in the 2.0.1 notes. Pull the 2.0.0 changelog and diff the public methods before migrating an existing integration.
Is it safe to use in production for stock quotes and historical prices?
It can be used in production, but design for the failure modes of a public scraped API: timeouts, throttling, and occasional response changes. Cache quotes for a short TTL and historical prices for much longer, and wrap calls in try/catch so a finance widget cannot take down a page. For customer-facing or contractual data, put a fallback provider behind your own interface.
How do I mock or test code that calls Yahoo Finance?
No fakes or test doubles are documented, so isolate the client behind your own class or interface and mock that in your test suite. If you want assertions at the HTTP layer, use Guzzle's MockHandler or Laravel's Http::fake only after confirming which HTTP client the package actually uses. Keep tests offline so a flaky Yahoo endpoint cannot fail your CI pipeline.
How does dejwcake/yahoo-finance compare to alternatives?
Use it when you want a small dependency for a Laravel dashboard or internal tool and you accept Yahoo's public endpoints as they are. Choose a vendor API such as Alpha Vantage, Finnhub, Twelve Data, or Polygon.io when you need documented rate limits, SLAs, and support channels. Writing a thin Guzzle wrapper around the same endpoints is also reasonable if you only need one or two calls.
Is the package actively maintained, and how should I track releases?
The 2.x line ships with a PHP 8.2 to 8.4 CI matrix plus phpstan, phpcs, and phpmd gates, which is a reasonable signal of quality discipline. An AGENTS.md file in the repo hints at AI-assisted contributions, so it is fair to ask the maintainer about review policy and whether a SECURITY.md exists. Pin to ^2.0 and read release notes before bumping, since maintainer count and cadence are not published.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core