PHP code example of davidgrzyb / laravel-finnhubio

1. Go to this page and download the library: Download davidgrzyb/laravel-finnhubio library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

davidgrzyb / laravel-finnhubio example snippets

 php
// 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());
 php
// 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();
 php
// Exchanges endpoint:
Finnhubio::crypto()->getExchanges();
// Symbols endpoint:
Finnhubio::crypto()->getSymbols('binance');
// Candles endpoint:
Finnhubio::crypto()->getCandles('BINANCE:BTCUSDT', 'D', now()->subDays(1), now());