chapsuk / currobber
There is no license information available for the latest version (v1.1.4) of this package.
Currency rates api clients lib
v1.1.4
2016-02-29 07:49 UTC
Requires
- php: >=5.5.0
- guzzlehttp/guzzle: 6.0.1
Requires (Dev)
- phpunit/phpunit: 4.4.*
This package is not auto-updated.
Last update: 2025-01-18 20:46:29 UTC
README
Yahoo currency rate client
use Currobber\Client\Yahoo\Client; $Client = new Client(); var_dump($Client->get('USDRUB')); ================= class Currobber\Result\PairRateData#393 (3) { private $pairName => string(7) "USDRUB" private $rate => double(73.5245) private $date => string(10) "2015-12-30" }
use Currobber\Client\Yahoo\Client; $Client = new Client(); var_dump($Client->getMulti(['USDRUB', 'EURRUB'])); ================= array(2) { [0] => class Currobber\Result\PairRateData#466 (3) { private $pairName => string(7) "USDRUB" private $rate => double(73.5245) private $date => string(10) "2015-12-30" } [1] => class Currobber\Result\PairRateData#458 (3) { private $pairName => string(7) "EURRUB" private $rate => double(80.3772) private $date => string(10) "2015-12-30" } }
Currencylayer api client
Free subscription support source USD only
use Currobber\Client\Currencylayer\Client; $accessKey = '<YOUR_API_KEY>'; $Client = new Client($accessKey); var_dump($Client->get('USD', 'RUB', '2015-10-10')); ================= class Currobber\Result\PairQuoteData#67 (3) { private $pairName => string(6) "USDRUB" private $quote => double(61.775002) private $date => string(10) "2015-10-10" }
use Currobber\Client\Currencylayer\Client; $accessKey = '<YOUR_API_KEY>'; $Client = new Client($accessKey); var_dump($Client->getMulti('USD', ['EUR', 'RUB'], '2015-10-10')); ================= array(2) { [0] => class Currobber\Result\PairQuoteData#67 (3) { private $pairName => string(6) "USDEUR" private $quote => double(0.880398) private $date => string(10) "2015-10-10" } [1] => class Currobber\Result\PairQuoteData#65 (3) { private $pairName => string(6) "USDRUB" private $quote => double(61.775002) private $date => string(10) "2015-10-10" } }
Grund Trunk api client
use Currobber\Client\GrandTrunk\Client; $Client = new Client(); var_dump($Client->get('USD', 'EUR', '2015-10-10')); ================= array(1) { [0] => class Currobber\Result\PairRateData#432 (3) { private $pairName => string(6) "USDEUR" private $rate => double(0.880365000003) private $date => string(10) "2015-10-10" } }
use Currobber\Client\GrandTrunk\Client; $Client = new Client(); var_dump($Client->getForPeriod('USD', 'EUR', '2015-10-10', '2015-10-15')); array(6) { [0] => class Currobber\Result\PairRateData#432 (3) { private $pairName => string(6) "USDEUR" private $rate => double(0.880365000003) private $date => string(10) "2015-10-10" } [1] => class Currobber\Result\PairRateData#434 (3) { private $pairName => string(6) "USDEUR" private $rate => double(0.880365000003) private $date => string(10) "2015-10-11" } [2] => class Currobber\Result\PairRateData#437 (3) { private $pairName => string(6) "USDEUR" private $rate => double(0.879275477007) private $date => string(10) "2015-10-12" } [3] => class Currobber\Result\PairRateData#430 (3) { private $pairName => string(6) "USDEUR" private $rate => double(0.879198171268) private $date => string(10) "2015-10-13" } [4] => class Currobber\Result\PairRateData#429 (3) { private $pairName => string(6) "USDEUR" private $rate => double(0.876424189308) private $date => string(10) "2015-10-14" } [5] => class Currobber\Result\PairRateData#433 (3) { private $pairName => string(6) "USDEUR" private $rate => double(0.87420229041) private $date => string(10) "2015-10-15" } }