Client for work with CurrencyScoop API
Via composer
composer require dasauser/currency-scoop-client
use \Dasauser\CurrencyScoop\CurrencyCode;
use \Dasauser\CurrencyScoop\ClientBuilder;
$client = (new ClientBuilder())->buildClient('yourApiKey');
$currency = $client->historical(
CurrencyCode::USD,
new \DateTimeImmutable('2015-06-15'),
[CurrencyCode::EUR, CurrencyCode::GBP]
);
echo $currency->getCode()->value; // USD
echo $currency->getRate(CurrencyCode::EUR); // 0.88835713
echo $currency->getRate(CurrencyCode::GBP); // 0.6426023
echo $currency->getRate(CurrencyCode::BRL); // 0
composer test
The MIT License (MIT). Please see License File for more information.