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

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

chandachewe/currency
====================

A PHP Package to convert amount from one currency to the other

v1.0.1(3y ago)115MITPHP

Since Mar 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/chandachewe10/currency)[ Packagist](https://packagist.org/packages/chandachewe/currency)[ RSS](/packages/chandachewe-currency/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (3)Versions (13)Used By (0)

Currency
========

[](#currency)

A PHP Package to convert Amount from one currency to the other.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.3

Installation
------------

[](#installation)

Install currency using `composer require`:

```
composer require chandachewe/currency
```

Enter the currency directory and run the following code

```
composer install
```

Add the namespaces and vendor/autoload in the file you will be doing your conversions from. Am assuming the file and the vendor are both in the root directory. In your file include the following on top:

```
 require 'vendor/autoload.php';
 use Chandachewe\Currency\DriverAccessKeys\ExchangeRateDriverAccessKey;
 use Chandachewe\Currency\Drivers\ExchangeConverter;
 use Chandachewe\Currency\Drivers\ExchangeRate;
 use Chandachewe\Currency\CurrencyConverted;
 use Chandachewe\Currency\CurrencyFormats;

```

Usage
-----

[](#usage)

### Convert Amount from One Currency to the other

[](#convert-amount-from-one-currency-to-the-other)

You can convert the amount from one currency to the other using the following code:

```
ExchangeRateDriverAccessKey::$exchangerate_access_key = 'YOUR ACCESS KEY HERE';
ExchangeConverter::convert('amount', 'from this currency', 'to this currency');
```

> **Important**: See the supported currency formats below. Use of unsupported formats will throw an exception

Suppose I want to convert 10 USD to GBP then my code will be:

```
ExchangeRateDriverAccessKey::$exchangerate_access_key = 'YOUR ACCESS KEY HERE';
echo ExchangeConverter::convert(10, 'USD', 'GBP');
```

Then you can retrieve the result as follows:

```
echo CurrencyConverted::$currency_conversion
```

### Obtain the Exchange rate between two currencies

[](#obtain-the-exchange-rate-between-two-currencies)

You can also obtain the exchange rates between two currencies as follows:

```
ExchangeRateDriverAccessKey::$exchangerate_access_key = 'YOUR ACCESS KEY HERE';
ExchangeRate::exchange('from this currency', 'to this currency');
```

Suppose I want to obtain the exchange rate between 1 USD and the GBP then my code will be as follows:

```
ExchangeRateDriverAccessKey::$exchangerate_access_key = 'YOUR ACCESS KEY HERE';
echo ExchangeRate::exchange('USD', 'GBP');
```

Then you can retrieve the result as follows:

```
echo CurrencyConverted::$currency_rate;
```

Drivers
-------

[](#drivers)

### Available Drivers

[](#available-drivers)

- [Exchangerates](https://exchangerate.host/)

Versioning
----------

[](#versioning)

Releases will be numbered with the following format:

```
..
```

Supported Currency Formats
--------------------------

[](#supported-currency-formats)

- AED
- AFN
- ALL
- AMD
- ANG
- AOA
- ARS
- AUD
- AWG
- AZN
- BAM
- BBD
- BDT
- BGN
- BHD
- BIF
- BMD
- BND
- BOB
- BRL
- BSD
- BTC
- BTN
- BWP
- BYN
- BZD
- CAD
- CDF
- CHF
- CLF
- CLP
- CNH
- CNY
- COP
- CRC
- CUC
- CUP
- CVE
- CZK
- DJF
- DKK
- DOP
- DZD
- EGP
- ERN
- ETB
- EUR
- FJD
- FKP
- GBP
- GEL
- GGP
- GHS
- GIP
- GMD
- GNF
- GTQ
- GYD
- HKD
- HNL
- HRK
- HTG
- HUF
- IDR
- ILS
- IMP
- INR
- IQD
- IRR
- ISK
- JEP
- JMD
- JOD
- JPY
- KES
- KGS
- KHR
- KMF
- KPW
- KRW
- KWD
- KYD
- KZT
- LAK
- LBP
- LKR
- LRD
- LSL
- LYD
- MAD
- MDL
- MGA
- MKD
- MMK
- MNT
- MOP
- MRU
- MUR
- MVR
- MWK
- MXN
- MYR
- MZN
- NAD
- NGN
- NIO
- NOK
- NPR
- NZD
- OMR
- PAB
- PEN
- PGK
- PHP
- PKR
- PLN
- PYG
- QAR
- RON
- RSD
- RUB
- RWF
- SAR
- SBD
- SCR
- SDG
- SEK
- SGD
- SHP
- SLL
- SOS
- SRD
- SSP
- STD
- STN
- SVC
- SYP
- SZL
- THB
- TJS
- TMT
- TND
- TOP
- TRY
- TTD
- TWD
- TZS
- UAH
- UGX
- USD
- UYU
- UZS
- VES
- VND
- VUV
- WST
- XAF
- XAG
- XAU
- XCD
- XDR
- XOF
- XPD
- XPF
- XPT
- YER
- ZAR
- ZMW
- ZWL

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.2% 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 ~0 days

Total

2

Last Release

1213d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/676eb212f5dc38c0267b9e1b75c0024950e91329f80f3f862e2b64fb975a9e41?d=identicon)[chandachewe10](/maintainers/chandachewe10)

---

Top Contributors

[![chandachewe10](https://avatars.githubusercontent.com/u/82529756?v=4)](https://github.com/chandachewe10 "chandachewe10 (52 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (9 commits)")

---

Tags

currencycurrency-convertercurrency-exchange-ratescurrency-rates

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.4k](/packages/blair2004-nexopos)[oat-sa/tao-core

TAO core extension

66143.7k122](/packages/oat-sa-tao-core)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

40252.8k34](/packages/ec-europa-toolkit)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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