PHPackages                             ilknur-dogan/exchange-rate - 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. ilknur-dogan/exchange-rate

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

ilknur-dogan/exchange-rate
==========================

Exchange rate transformation package

v1.0.1(1y ago)19MITPHPPHP &gt;=7.4

Since Aug 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ilknurdgn/laravel-exchange-rate-package)[ Packagist](https://packagist.org/packages/ilknur-dogan/exchange-rate)[ RSS](/packages/ilknur-dogan-exchange-rate/feed)WikiDiscussions main Synced 1mo ago

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

ExchangeRate PHP Library
========================

[](#exchangerate-php-library)

[ ![Latest Stable Version](https://camo.githubusercontent.com/a9bcc45d034cf3bd70df9256f071a9596c733b79cda4812d4234797d0537b699/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696c6b6e75722d646f67616e2f65786368616e67652d72617465)](https://packagist.org/packages/ilknur-dogan/exchange-rate)[ ![Total Downloads](https://camo.githubusercontent.com/246211e8b86b65c83ec1181d19a41432bd962151a18655cc2b6eaa81d7c48510/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696c6b6e75722d646f67616e2f65786368616e67652d72617465)](https://packagist.org/packages/ilknur-dogan/exchange-rate)[ ![Dependents](https://camo.githubusercontent.com/803956c9477b4c86870aaf93d8a8e046164cda8c3799589f3a3726745b7841f4/68747470733a2f2f706f7365722e707567782e6f72672f696c6b6e75722d646f67616e2f65786368616e67652d726174652f646570656e64656e74732e737667)](https://packagist.org/packages/ilknur-dogan/exchange-rate)[ ![License](https://camo.githubusercontent.com/004de6caeeebd02d9635c97958af075d88fc55eb9a6149689bac438f8075c2a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696c6b6e75722d646f67616e2f65786368616e67652d72617465)](https://packagist.org/packages/ilknur-dogan/exchange-rate)[ ![StyleCI](https://camo.githubusercontent.com/5e696c6a08d4d09689335bd14e82300c90ef6c691731e5749d0fdd66b15297ce/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3637323337393933302f736869656c643f6272616e63683d6d6173746572)](https://packagist.org/packages/ilknur-dogan/exchange-rate)

This library is designed to fetch exchange rates from the Central Bank of the Republic of Turkey (TCMB) and perform currency conversions for specific dates.

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

[](#installation)

You can install this library using Composer.

```
composer require ilknur-dogan/exchange-rate
```

Usage
-----

[](#usage)

### 1. Fetching Exchange Rates

[](#1-fetching-exchange-rates)

You can use the getRate method to retrieve exchange rates for a specific date.

```
getRate($date)
```

- Returns exchange rates for the specified date as an array.
- $date: The date for which exchange rates are to be retrieved (in YYYY-MM-DD format).

```
require 'vendor/autoload.php';

use IlknurDogan\ExchangeRate\ExchangeRate;

$exchangeRate = new ExchangeRate();
$rates = $exchangeRate->getRate('2024-08-01'); // Example date
print_r($rates);
```

### 2. Currency Conversion

[](#2-currency-conversion)

You can use the convert method to perform a currency conversion between two currencies for a specific date.

```
convert($date, $from, $to)
```

- Returns the conversion rate between the two currencies for the specified date (as a string).
- $date: The date for which the exchange rate is to be used (in YYYY-MM-DD format).
- $from: The currency to be converted from (e.g., USD).
- $to: The currency to be converted to (e.g., EUR).

```
require 'vendor/autoload.php';

use IlknurDogan\ExchangeRate\ExchangeRate;

$exchangeRate = new ExchangeRate();
$convertedAmount = $exchangeRate->convert('2024-08-01', 'USD', 'EUR'); // Example date and currencies
echo $convertedAmount;
```

License
-------

[](#license)

This package is open source software licensed under the MIT License.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Every ~2 days

Total

2

Last Release

641d ago

### Community

Maintainers

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

---

Top Contributors

[![ilknurdgn](https://avatars.githubusercontent.com/u/102380582?v=4)](https://github.com/ilknurdgn "ilknurdgn (12 commits)")

### Embed Badge

![Health badge](/badges/ilknur-dogan-exchange-rate/health.svg)

```
[![Health](https://phpackages.com/badges/ilknur-dogan-exchange-rate/health.svg)](https://phpackages.com/packages/ilknur-dogan-exchange-rate)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[pulkitjalan/ip-geolocation

IP Geolocation Wrapper with Laravel Support

89164.9k1](/packages/pulkitjalan-ip-geolocation)[adrianorosa/laravel-geolocation

Laravel Geo Location package to get details for a given IP Address

6593.3k1](/packages/adrianorosa-laravel-geolocation)[bakame/laravel-domain-parser

Laravel package to integrate PHP Domain parser.

26534.8k4](/packages/bakame-laravel-domain-parser)

PHPackages © 2026

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