Wrapper library for the Alpha Vantage API Requires PHP >= 7.4
composer require mschindler83/alpha-vantage
- Get forex exchange rates
- Search for symbol
- Get global quote
- [...] More to come soon
$alphaVantage = \Mschindler83\AlphaVantage\Client::instance($apiKey)
$request = ForexExchangeRateRequest::convert('EUR', 'USD');
$exchangeRate = $alphaVantage->forexExchangeRate($request);
echo $exchangeRate->exchangeRate();
$request = SearchRequest::queryString('MSCI World');
$searchResults = $alphaVantage->search($request);
$allResultsArray = $searchResults->items();
echo $allResultsArray[0]->symbol();
$request = GlobalQuoteRequest::symbol('IWDA.LON');
$globalQuote = $alphaVantage->globalQuote($request);
echo $globalQuote->open();
echo $globalQuote->high();
echo $globalQuote->low();
[...]