tomwright/currency-php-yahoo-rate-fetcher

There is no license information available for the latest version (1.0.0) of this package.

An extension to fetch exchange rates from the Yahoo API.

1.0.0 2017-04-13 14:52 UTC

This package is auto-updated.

Last update: 2024-12-15 07:35:11 UTC


README

Build Status Latest Stable Version Total Downloads Monthly Downloads Daily Downloads License

Installation

Install CurrencyPHP.

composer require tomwright/currency-php
composer require tomwright/currency-php-yahoo-rate-fetcher

Usage

YahooRateFetcher is just a RateFetcher for CurrencyPHP.

$rateFetcher = new YahooRateFetcher();

$gbp = new Currency('GBP', $rateFetcher);
$usd = new Currency('USD', $rateFetcher);

$priceInGBP = 100;
$priceInUSD = $gbp->convertTo($usd, $priceInGBP);
echo $priceInUSD; // 126