This Laravel package simplifies the usage of Finnhub.io's API for getting stock, forex and crypto data. Currently only the Stock Price, Forex and Crypto endpoints are supported.
You can install the package via composer:
composer require davidgrzyb/laravel-finnhubio
You will need to add an API key for Finnhub in your .env
file with the key FINNHUB_API_KEY
. Get your API key here.
// Quote endpoint:
Finnhubio::stock()->getQuote('AAPL');
// Candles endpoint:
Finnhubio::stock()->getCandles('AAPL', '1', now()->subDay(1), now());
// Dividends endpoint:
Finnhubio::stock()->getDividends('AAPL', now()->subMonth(10), now());
// Splits endpoint:
Finnhubio::stock()->getSplits('AAPL', now()->subYear(10), now());
// Exhanges endpoint:
Finnhubio::forex()->getExchanges();
// Symbols endpoint:
Finnhubio::forex()->getSymbols('oanda');
// Candles endpoint:
Finnhubio::forex()->getCandles('OANDA:EUR_USD', 'D', now()->subDays(1), now());
// All rates endpoint:
Finnhubio::forex()->getRates();
// Exchanges endpoint:
Finnhubio::crypto()->getExchanges();
// Symbols endpoint:
Finnhubio::crypto()->getSymbols('binance');
// Candles endpoint:
Finnhubio::crypto()->getCandles('BINANCE:BTCUSDT', 'D', now()->subDays(1), now());
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.