PHPackages                             cryonighter/currency-converter - 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. cryonighter/currency-converter

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

cryonighter/currency-converter
==============================

This package allows you to convert exchange rates according to the rate of the Central Bank of Russia (but you can use any other sources of exchange rates)

1.0.0(4y ago)0657MITPHPPHP &gt;=8.1.0

Since Feb 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/cryonighter/currency-converter)[ Packagist](https://packagist.org/packages/cryonighter/currency-converter)[ RSS](/packages/cryonighter-currency-converter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Currency Converter
==================

[](#currency-converter)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fb5c1d0bb32ace79a41f4ccc86b4eb1c9e5bc379b7757394b880a11456af14c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6372796f6e6967687465722f63757272656e63792d636f6e7665727465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cryonighter/currency-converter)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/2d35c74e4027104b9ddb5ea65191655c36b0cb0dad569e3b0a7fe62e1cd3896d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6372796f6e6967687465722f63757272656e63792d636f6e7665727465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cryonighter/currency-converter)[![Build Status](https://github.com/cryonighter/currency-converter/workflows/Tests/badge.svg?branch=master)](https://github.com/cryonighter/currency-converter)

This package allows you to convert exchange rates according to the rate of the Central Bank of Russia (but you can use any other sources of exchange rates)

Highlights
----------

[](#highlights)

- Simple API
- Framework Agnostic
- Composer ready, [PSR-2](http://www.php-fig.org/psr/psr-2/) and [PSR-4](http://www.php-fig.org/psr/psr-4/) compliant

System Requirements
-------------------

[](#system-requirements)

You need:

- **PHP &gt;= 8.1.0** but the latest stable version of PHP is recommended

Install
-------

[](#install)

Via Composer

```
$ composer require cryonighter/currency-converter
```

Usage
-----

[](#usage)

```
use Cryonighter\CurrencyConverter\CurrencyCodeConverter;
use Cryonighter\CurrencyConverter\CurrencyConverter;
use Cryonighter\CurrencyConverter\Provider\CbrCurrencyRateProvider;

// Get a list of exchange rates. By default, the package provides a service for receiving rates from the server of the Central Bank of Russia.
// However, you can use any source of currency rates, you only need to form an array of instances of the CurrencyRate class.
$currencyRates = CbrCurrencyRateProvider::getCurrencyRates();

// Build the converter object
$currencyConverter = new CurrencyConverter(new CurrencyCodeConverter(), $currencyRates);

// To convert 100 USD to EUR
$amount = $currencyConverter->convert(100, 'USD', 'EUR');

// You can also use numeric currency codes
$amount = $currencyConverter->convert(100, '840', '978');

// You can mix and match :)
$amount = $currencyConverter->convert(100, '840', 'EUR');
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ php vendor/phpunit/phpunit/phpunit tests
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email `cryonighter@yandex.ru` instead of using the issue tracker.

Credits
-------

[](#credits)

- [Andrey Reshetchenko](https://github.com/cryonighter)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1561d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/640fd5daf250ddc27926b04a4fa74e2d8239c777475a783f155a6c9d47e1df78?d=identicon)[cryonighter](/maintainers/cryonighter)

---

Top Contributors

[![cryonighter](https://avatars.githubusercontent.com/u/20028293?v=4)](https://github.com/cryonighter "cryonighter (5 commits)")

---

Tags

currencyconvertercbrexchanger

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cryonighter-currency-converter/health.svg)

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

###  Alternatives

[brick/money

Money and currency library

1.9k37.9M102](/packages/brick-money)[matthiasmullie/path-converter

Relative path converter

10229.6M7](/packages/matthiasmullie-path-converter)[ujjwal/currency-converter

Currency Converter Class with features of caching and identifying currency from country Code

49225.4k](/packages/ujjwal-currency-converter)[tkaratug/tcmb_currency_converter

TCMB Currenct Converter

221.0k](/packages/tkaratug-tcmb-currency-converter)[jimmerioles/bitcoin-currency-converter-php

A simple and lightweight bitcoin to currency converter and vice versa based on current exchange rates from your chosen provider: Coinbase, Coindesk, Bitpay and etc.

132.7k](/packages/jimmerioles-bitcoin-currency-converter-php)

PHPackages © 2026

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