Search by

apie / exchange-rate

pjordaan

Composer package of the apie library: exchange rate

Package info

github.com/apie-lib/exchange-rate

pkg:composer/apie/exchange-rate

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-10-01 07:09 UTC

This package is auto-updated.

Last update: 2026-10-01 07:11:40 UTC


README

exchange-rate

Latest Stable Version Total Downloads Latest Unstable Version License PHP Composer

PHP Composer

This package is part of the Apie library. The code is maintained in a monorepo, so PR's need to be sent to the monorepo

Documentation

Looks up currency exchange rates for use in Apie domain objects (e.g. money value objects).

Standalone usage

Install it with:

composer require apie/exchange-rate

Create an ExchangeRateService and pass ISO 4217 currency codes as strings:

use Apie\ExchangeRate\ExchangeRateService;

$service = new ExchangeRateService();
$rate = $service->calculateConversionRate('USD', 'EUR');

Rates are retrieved from the public Frankfurter API.

Symfony integration

Via apie/apie-bundle, exchangerate.yaml is loaded automatically and registers Apie\ExchangeRate\ExchangeRateService, using the Symfony http_client service if one is configured.

Laravel integration

Via apie/laravel-apie, the generated Apie\ExchangeRate\ExchangeRateServiceProvider is auto-registered and binds ExchangeRateService into the Laravel container.