dwo/exchange_rate_adapter

grep foreign exchange reference rates from the ecb and openexchangerates.org

v1.0.0 2016-09-30 17:07 UTC

This package is not auto-updated.

Last update: 2024-04-13 17:35:27 UTC


README

Build Status Coverage Status

ExchangeRateAdapter

Grep the Euro foreign exchange reference rates from the ECB or openexchangerates.org

Installation

Installation with Composer

composer require dwo/exchange_rate_adapter

Usage with ECB

$adapter = new EcbExchangeRateAdapter();
$exchangeRates = $adapter->getAll();

Usage with openexchangerates.org

$adapter = new OpenExchangeRateAdapter($yourAppId);
$exchangeRates = $adapter->getAll();

You will receive an array with the available currencies

   array(31) {
     ["USD"]=>
     float(1.0711)
     ["JPY"]=>
     float(127.64)
     ...
   )