All Projects → scheb → Yahoo Finance Api

scheb / Yahoo Finance Api

Licence: mit
PHP client for Yahoo Finance API 📈

Projects that are alternatives of or similar to Yahoo Finance Api

fundamentos
Download Bovespa Stock Market fundamentals with Python.
Stars: ✭ 80 (-55.31%)
Mutual labels:  finance, stock-market, stocks
stockscore
A python project to fetch stock financials/statistics and perform preliminary screens to aid in the stock selection process
Stars: ✭ 54 (-69.83%)
Mutual labels:  finance, stock-market, stocks
pyEX
Python interface to IEX and IEX cloud APIs
Stars: ✭ 407 (+127.37%)
Mutual labels:  finance, stock-market, stocks
Mop
Stock market tracker for hackers.
Stars: ✭ 1,534 (+756.98%)
Mutual labels:  finance, stock-market, stocks
Pyex
Python interface to IEX and IEX cloud APIs
Stars: ✭ 311 (+73.74%)
Mutual labels:  finance, stock-market, stocks
Ta Rs
Technical analysis library for Rust language
Stars: ✭ 248 (+38.55%)
Mutual labels:  finance, stock-market, stocks
Finance-Robinhood
Trade stocks and ETFs with free brokerage Robinhood and Perl
Stars: ✭ 42 (-76.54%)
Mutual labels:  finance, stock-market, stocks
Beibo
🤖 Predict the stock market with AI 用AI预测股票市场
Stars: ✭ 46 (-74.3%)
Mutual labels:  finance, stock-market, stocks
AIPortfolio
Use AI to generate a optimized stock portfolio
Stars: ✭ 28 (-84.36%)
Mutual labels:  finance, stock-market, stocks
tuneta
Intelligently optimizes technical indicators and optionally selects the least intercorrelated for use in machine learning models
Stars: ✭ 77 (-56.98%)
Mutual labels:  finance, stock-market, stocks
Algobot
A C++ stock market algorithmic trading bot
Stars: ✭ 78 (-56.42%)
Mutual labels:  finance, stock-market, stocks
Tiingo Python
Python REST Client for interacting with the Tiingo Financial Data API
Stars: ✭ 152 (-15.08%)
Mutual labels:  finance, stock-market, stocks
Tradestation
EasyLanguage indicators and systems for TradeStation
Stars: ✭ 65 (-63.69%)
Mutual labels:  finance, stock-market, stocks
cira
Cira algorithmic trading made easy. A Façade library for simpler interaction with alpaca-trade-API from Alpaca Markets.
Stars: ✭ 21 (-88.27%)
Mutual labels:  finance, stock-market, stocks
Finance
Here you can find all the quantitative finance algorithms that I've worked on and refined over the past year!
Stars: ✭ 194 (+8.38%)
Mutual labels:  finance, stock-market, stocks
investbook
Оценка эффективности инвестиций с учетом комиссий, налогов (удержанных и ожидающихся), дивидендов и купонов.
Stars: ✭ 83 (-53.63%)
Mutual labels:  finance, stock-market, stocks
Iex Api
The IEX API provides any individual or academic, public or private institution looking to develop applications that require stock market data to access near real-time quote and trade data for all stocks trading on IEX.
Stars: ✭ 683 (+281.56%)
Mutual labels:  finance, stock-market, stocks
Sec Edgar Downloader
Download SEC filings from the EDGAR database using Python
Stars: ✭ 146 (-18.44%)
Mutual labels:  finance, stock-market, stocks
Robinhood
Unofficial Documentation of Robinhood Trade's Private API
Stars: ✭ 1,569 (+776.54%)
Mutual labels:  stock-market, stocks
Pandas Ta
Technical Analysis Indicators - Pandas TA is an easy to use Python 3 Pandas Extension with 130+ Indicators
Stars: ✭ 962 (+437.43%)
Mutual labels:  finance, stock-market

scheb/yahoo-finance-api

This is a PHP client for Yahoo Finance API.

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads License

Logo

Since YQL APIs have been discontinued in November 2017, this client is using non-official API endpoints for quotes, search and historical data.

⚠️ WARNING: These non-official APIs cannot be assumed stable and might break any time. Also, you might violate Yahoo's terms of service. So use them at your own risk.

Installation

Download via Composer:

composer require scheb/yahoo-finance-api

Alternatively you can also add the package directly to composer.json:

{
    "require": {
        "scheb/yahoo-finance-api": "^4.0"
    }
}

and then tell Composer to install the package:

composer update scheb/yahoo-finance-api

Usage

use Scheb\YahooFinanceApi\ApiClient;
use Scheb\YahooFinanceApi\ApiClientFactory;
use GuzzleHttp\Client;

// Create a new client from the factory
$client = ApiClientFactory::createApiClient();

// Or use your own Guzzle client and pass it in
$options = [/*...*/];
$guzzleClient = new Client($options);
$client = ApiClientFactory::createApiClient($guzzleClient);

// Returns an array of Scheb\YahooFinanceApi\Results\SearchResult
$searchResult = $client->search("Apple");

// Returns an array of Scheb\YahooFinanceApi\Results\HistoricalData
$historicalData = $client->getHistoricalQuoteData(
    "AAPL",
    ApiClient::INTERVAL_1_DAY,
    new \DateTime("-14 days"),
    new \DateTime("today")
);

// Retrieve dividends history, returns an array of Scheb\YahooFinanceApi\Results\DividendData
$dividendData = $client->getHistoricalDividendData(
    "AAPL",
    new \DateTime("-5 years"),
    new \DateTime("today")
);

// Retrieve stock split history, returns an array of Scheb\YahooFinanceApi\Results\SplitData
$splitData = $client->getHistoricalSplitData(
    "AAPL",
    new \DateTime("-5 years"),
    new \DateTime("today")
);

// Returns Scheb\YahooFinanceApi\Results\Quote
$exchangeRate = $client->getExchangeRate("USD", "EUR");

// Returns an array of Scheb\YahooFinanceApi\Results\Quote
$exchangeRates = $client->getExchangeRates([
    ["USD", "EUR"],
    ["EUR", "USD"],
]);

// Returns Scheb\YahooFinanceApi\Results\Quote
$quote = $client->getQuote("AAPL");

// Returns an array of Scheb\YahooFinanceApi\Results\Quote
$quotes = $client->getQuotes(["AAPL", "GOOG"]);

Version Guidance

Version Status PHP Version
1.x EOL >= 5.3.0
2.x EOL >= 5.6.0
3.x EOL >= 5.6.0
4.x Maintained >= 7.1.3

License

This library is available under the MIT license.

Contributing

Want to contribute to this project? See CONTRIBUTING.md.

Support Me

I'm developing this library since 2014. I love to hear from people using it, giving me the motivation to keep working on my open source projects.

If you want to let me know you're finding it useful, please consider giving it a star ⭐ on GitHub.

If you love my work and want to say thank you, you can help me out for a beer 🍻️ via PayPal.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].