PHPackages                             slonline/exchangerates - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. slonline/exchangerates

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

slonline/exchangerates
======================

Exchange rates - Module for SilverStripe 6

6.0.5(2mo ago)017proprietaryPHP

Since Oct 30Pushed 2mo agoCompare

[ Source](https://github.com/SLONline/exchangerates)[ Packagist](https://packagist.org/packages/slonline/exchangerates)[ RSS](/packages/slonline-exchangerates/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Exchange Rates for Silverstripe 6
=================================

[](#exchange-rates-for-silverstripe-6)

### Requirements

[](#requirements)

- **silverstripe/framework** ~6.0

### Installation

[](#installation)

Add the following code to the `require` key in `composer.json` file:

```
composer require slonline/exchangerates
```

Add configuration into yml, like this:

```
SLONline\ExchangeRates\ExchangeRates:
  registered_processor: SLONline\ExchangeRates\Processor\ECB
  supported_currencies:
    - EUR
    - USD
```

Loading data
------------

[](#loading-data)

Data can be loaded via sake command

```
php vendor/silverstripe/framework/bin/sake process:exchangerates
```

or in script by calling

```
SLONline\ExchangeRates\ExchangeRates::create()->process();
```

or

```
SLONline\ExchangeRates\ExchangeRates::singleton()->process();
```

Converting amount from the basic currency to the second
-------------------------------------------------------

[](#converting-amount-from-the-basic-currency-to-the-second)

1. Getting the latest value

```
SLONline\ExchangeRates\ExchangeRates::singleton()->getExchangeRate('EUR','USD');
```

2. Getting the value for specific date if exists

```
SLONline\ExchangeRates\ExchangeRates::singleton()->getExchangeRate('EUR','USD', '2025-10-30');
```

Calling it via singleton is recommended to avoid multiple loading of rates from database.

### Conversion is available on DBMoney field via extension

[](#conversion-is-available-on-dbmoney-field-via-extension)

First method for getting converted value from base currency to target currency.

```
$money = DBMoney::create('money')->setAmount( 100)->setCurrency('EUR');
Debug::dump($money->getAmountInCurrency('USD')); // will output amount converted to USD

Debug::dump($money->getInAllSupportedCurrencies()); // will output ArrayList with amounts in all supported currencies
```

Processors
----------

[](#processors)

Processor is main class for downloading, parsing and writing exchange rates from some source. Processed data are stored into data objects ExchangeRate

### Available processors

[](#available-processors)

1. ECB - European Central Bank

```
SLONline\ExchangeRates\ExchangeRates:
  registered_processor: SLONline\ExchangeRates\Processor\ECB
```

2. CNB - Czech National Bank

```
SLONline\ExchangeRates\ExchangeRates:
  registered_processor: SLONline\ExchangeRates\Processor\CNB
```

### Adding new processor

[](#adding-new-processor)

If you want to add new source of rates, you can create new processor. Each processor should implement ProcessorInterface.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance83

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~28 days

Total

6

Last Release

88d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4aadb774b5fa6a31dd242a822c365c00e6ce8f1ed3cd1739a379b130d4af3b9f?d=identicon)[odraska](/maintainers/odraska)

---

Top Contributors

[![odraska](https://avatars.githubusercontent.com/u/775571?v=4)](https://github.com/odraska "odraska (6 commits)")

---

Tags

silverstripecmsexchange rates

### Embed Badge

![Health badge](/badges/slonline-exchangerates/health.svg)

```
[![Health](https://phpackages.com/badges/slonline-exchangerates/health.svg)](https://phpackages.com/packages/slonline-exchangerates)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
