PHP code example of mschindler83 / alpha-vantage
1. Go to this page and download the library: Download mschindler83/alpha-vantage 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/ */
mschindler83 / alpha-vantage example snippets
$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();
[...]