PHPackages                             yavuz/exchange-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. [API Development](/categories/api)
4. /
5. yavuz/exchange-rates

ActiveLibrary[API Development](/categories/api)

yavuz/exchange-rates
====================

Exchange rates API library

1.0.0(1y ago)05MITPHPPHP ^8.1

Since Sep 18Pushed 1y ago1 watchersCompare

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

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

PHP Currency Library
====================

[](#php-currency-library)

[![Latest Stable Version](https://camo.githubusercontent.com/08b2cb9b23de38c0e5dc87fb240a22ac472b3f5d2b83f5d9c789be4d5b1b9331/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76312e302e302d626c7565)](https://packagist.org/packages/yavuz/exchange-rates)

Exchange rates API built using Dependency Injection.

This library requires PHP &gt;= 8.1

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

[](#installation)

The recommended way to install the Exchange Rates library is through [Composer](https://getcomposer.org):

```
$ composer require yavuz/exchange-rates
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Usage
-----

[](#usage)

### Usage Example TCMB Driver

[](#usage-example-tcmb-driver)

```
use Yavuz\ExchangeRates\ExchangeRate\ExchangeRate;
use Yavuz\ExchangeRates\ExchangeRate\Services\Tcmb;

require_once 'vendor/autoload.php';
require_once 'src/Config/Config.php';
require_once 'src/Helper/Helper.php';

try {
    $exchangeRatesTCMB = (new ExchangeRate(new Tcmb()))
        ->setBaseCurrency('TRY')
        ->setCurrencies(['USD', 'EUR'])
        ->setCacheTime(1800)
        ->getResult();

    dump($exchangeRatesTCMB);
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### Usage Example CurrencyAPI Driver

[](#usage-example-currencyapi-driver)

```
use Yavuz\ExchangeRates\ExchangeRate\ExchangeRate;
use Yavuz\ExchangeRates\ExchangeRate\Services\CurrencyAPI;

require_once 'vendor/autoload.php';
require_once 'src/Config/Config.php';
require_once 'src/Helper/Helper.php';

try {
    $exchangeRatesCurrencyAPI = (new ExchangeRate(new CurrencyAPI()))
        ->setAPIKey('api-key')
        ->setBaseCurrency('TRY')
        ->setCurrencies('GBP')
        ->getResult();

    dump($exchangeRatesCurrencyAPI);
} catch (Exception $e) {
    echo $e->getMessage();
}
```

License
-------

[](#license)

Exchange Rates library is released under the MIT License. See [`LICENSE`](https://github.com/yavuzahmet89/exchange-rates/blob/main/LICENSE) for details.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

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

600d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3c30a190d4d8ef8f7431e52f83eb5da227fc952cedcbbf16147e480ea363e4d?d=identicon)[yavuzahmet89](/maintainers/yavuzahmet89)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/yavuz-exchange-rates/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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