PHPackages                             evolutionscript/currency\_api - 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. [API Development](/categories/api)
4. /
5. evolutionscript/currency\_api

ActiveLibrary[API Development](/categories/api)

evolutionscript/currency\_api
=============================

Get currency rates from free APIs.

1.0.0(4y ago)0241MITPHPPHP &gt;=7.4

Since Jul 5Pushed 4y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

Free Currency API
=================

[](#free-currency-api)

The Free Currency API connects with some exchangers to get the current currency rate.

This library works with cache to prevent exceeding the API usage limit.

**Installation:**

```
composer require evolutionscript/currency_api
```

**Usage:**

```
use EvolutionScript\CurrencyAPI as CurrencyAPI;

$currencyAPI = new CurrencyAPI\Rate();
//Specify cache directory to save data and make a request once per day. It is optional but prevents exceeding the API usage limit.
$currencyAPI->cacheDirectory(__DIR__.'/cache');

//Connect with Currency Layer and as optional connect with OpenExchangeRates. The optional provider is useful if the primary provider fails.
$currencyAPI->provider(
	new CurrencyAPI\Providers\CurrencyLayer('CURRENCY_LAYER_API'),
	new CurrencyAPI\Providers\OpenExchangeRates('OPEN_EXCHANGE_RATES_API')
);
//Free Api accepts as base currency USD symbol, you can change it if you are using paid version
$rate = $currencyAPI->getRate('USD', 'PEN');
echo "The USDPEN rate is: ".$rate."";

//Calculate how much is 10 USD to PEN and return result with 2 decimals
$result = $currencyAPI->exchangeFrom($rate, 10, 2);
echo "10 USD is equivalent to ".$result." PEN";

//Calculate how much is 100 PEN to USD and result result with 2 decimals
$result = $currencyAPI->exchangeTo($rate, 100, 2);
echo "100 PEN is equivalent to ".$result." USD";
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

1460d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3aeae2c8231781b231277221556561812f4361aa8f749b0a18fa4ab8b6ebc898?d=identicon)[evolutionscript](/maintainers/evolutionscript)

---

Top Contributors

[![evolutionscript](https://avatars.githubusercontent.com/u/11525334?v=4)](https://github.com/evolutionscript "evolutionscript (3 commits)")

---

Tags

currencyRateexchange

### Embed Badge

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

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M45](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[florianv/swap-bundle

Drop-in Symfony bundle for currency conversion: configurable services, multi-provider exchange rates with fallback and caching.

64431.5k1](/packages/florianv-swap-bundle)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1943.1k5](/packages/aimeos-prisma)[maciej-sz/nbp-php

API for accessing Polish National Bank (NBP - Narodowy Bank Polski) currency and commodities exchange rates

1447.4k1](/packages/maciej-sz-nbp-php)

PHPackages © 2026

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