PHPackages                             mibo/currency-rates - 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. mibo/currency-rates

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

mibo/currency-rates
===================

PHP Library that provides currency rates and conversions

1.2.0(1y ago)07.4k↓50%[1 issues](https://github.com/4513/currency-rates/issues)MITPHPPHP ^8.2

Since Jun 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/4513/currency-rates)[ Packagist](https://packagist.org/packages/mibo/currency-rates)[ RSS](/packages/mibo-currency-rates/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (12)Versions (9)Used By (0)

Currency Rates
==============

[](#currency-rates)

[![codecov](https://camo.githubusercontent.com/13d1f44c7d39cc10c215349b3e619ba45683eab416c883261dd1d6c607711ba1/68747470733a2f2f636f6465636f762e696f2f67682f343531332f63757272656e63792d72617465732f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d6b736b61515435774852)](https://codecov.io/gh/4513/currency-rates)

Online currency rate provider.

The library comes with `\MiBo\Currency\Rates\ExchangerInterface` interface, which provides the following methods:

- `getDefaultCurrency()` - returns default currency code of the Exchanger (e.g. USD)
- `getRateFor()` - returns rate for the given currency code. Comparing the default currency of the Exchanger if no 'fromCurrency' parameter is provided.
- `getExchangeRates()` - list of all exchange rates of the Exchanger. The result is an array where a key is a currency code and a value of 'rate' sub key is a rate for the given currency code. Comparing the default currency of the Exchanger. If 'amount' sub key is present, the rate is calculated for the given amount.
- `getAvailableCurrencies()` - returns list of available currencies of the Exchanger. The result is an array of currency codes.

The library comes with a few implementations of the Exchangers:

- ECB - European Central Bank (since 1.0)
- CNB - Czech National Bank (since 1.0)
- BoE - Bank of England (since 1.1)
- CF - Currency Freaks (since 1.2)
- OXR - Open Exchange Rates (since 1.2) - Experimental
- *more to come...*

All implementations load the rates from publicly available resources. All resources are located on official websites of the banks, thus the rates are trustworthy and up to date.

---

### Installation

[](#installation)

```
composer require mibo/currency-rates
```

### Usage

[](#usage)

```
$price = 100; // EUR
$exchanger = new \MiBo\Currency\Rates\Exchangers\ECB();
$newPrice = $exchanger->getRateFor('USD') * $price; // USD
```

---

### Future of the library

[](#future-of-the-library)

The library will contain more implementations of the Exchangers. The goal is to provide a simple way to get currency rates from various sources. The main focus is on the banks that are globally recognized.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~58 days

Total

8

Last Release

653d ago

PHP version history (2 changes)1.0.0PHP ^8.1

1.1.3PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0866c3280ed62cfc74feb086241ec9ee56bab89b4fa2b8c8a3dbd62508761b6a?d=identicon)[MiBo](/maintainers/MiBo)

---

Top Contributors

[![4513](https://avatars.githubusercontent.com/u/25705559?v=4)](https://github.com/4513 "4513 (26 commits)")

---

Tags

phpmoneycurrencypackagelibraryBankpricesratescurrenciespricelibcnbbanksMiBocurrency ratenbsOpen Exchange RatesoxrCurrency Freaks

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mibo-currency-rates/health.svg)

```
[![Health](https://phpackages.com/badges/mibo-currency-rates/health.svg)](https://phpackages.com/packages/mibo-currency-rates)
```

###  Alternatives

[cartalyst/converter

A framework agnostic measurement conversion and formatting package featuring multiple types of measurements and currency conversion.

88434.4k7](/packages/cartalyst-converter)[niiknow/bayes

a machine learning lib

6950.0k](/packages/niiknow-bayes)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

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