PHPackages                             ksaveras/lb-fx-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ksaveras/lb-fx-rates

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

ksaveras/lb-fx-rates
====================

LB Fx Rates client

v0.1.1(2mo ago)02[8 PRs](https://github.com/ksaveras/lb-fx-rates/pulls)MITPHPPHP ^8.3CI passing

Since Sep 14Pushed 1mo ago1 watchersCompare

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

READMEChangelog (2)Dependencies (9)Versions (17)Used By (0)

LB FxRates Client
=================

[](#lb-fxrates-client)

More information:

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

[](#installation)

```
composer require ksaveras/lb-fx-rates

```

Use cases
---------

[](#use-cases)

### Basic example

[](#basic-example)

Fetch FX rates from LB API. Using Symfony HttpClient to fetch data.

```
use Ksaveras\LBFxRates\PsrClient;
use Symfony\Component\HttpClient\Psr18Client;

// Psr18Client implements all three required interfaces
$psr18Client = new Psr18Client();

$fxRatesClient = new PsrClient(
    $psr18Client,
    $psr18Client,
    $psr18Client,
);

$fxRates = $fxRatesClient->currentFxRates();

foreach ($fxRates as $fxRate) {
    echo sprintf(
        "%s: %.4f %s == %.4f %s\n",
        $fxRate->date()->format('Y-m-d'),
        $fxRate->currencyAmount()->amount(),
        $fxRate->currencyAmount()->currency()->value,
        $fxRate->targetCurrencyAmount()->amount(),
        $fxRate->targetCurrencyAmount()->currency()->value,
    );
}
```

This will output something like:

```
2024-08-31: 1.0000 EUR == 1.6542 AUD
2024-08-31: 1.0000 EUR == 1.9558 BGN
2024-08-31: 1.0000 EUR == 6.2147 BRL
2024-08-31: 1.0000 EUR == 1.5061 CAD
2024-08-31: 1.0000 EUR == 0.9387 CHF
2024-08-31: 1.0000 EUR == 7.8634 CNY
2024-08-31: 1.0000 EUR == 25.1470 CZK

```

Tests
-----

[](#tests)

```
composer test

```

Code Quality
------------

[](#code-quality)

```
composer static-analysis

```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.3% 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 ~537 days

Total

2

Last Release

68d ago

PHP version history (2 changes)v0.1.0PHP ^8.2

v0.1.1PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/654934f82b6b26fb089607ff8b3fd69837706fe81ae8355c97923f09f2c66741?d=identicon)[ksaveras](/maintainers/ksaveras)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (88 commits)")[![ksaveras](https://avatars.githubusercontent.com/u/485111?v=4)](https://github.com/ksaveras "ksaveras (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![release-automaton[bot]](https://avatars.githubusercontent.com/in/341347?v=4)](https://github.com/release-automaton[bot] "release-automaton[bot] (1 commits)")

---

Tags

currencyfx\_ratescurrency-exchangeLietuvos Bankas

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ksaveras-lb-fx-rates/health.svg)

```
[![Health](https://phpackages.com/badges/ksaveras-lb-fx-rates/health.svg)](https://phpackages.com/packages/ksaveras-lb-fx-rates)
```

###  Alternatives

[brick/money

Money and currency library

1.9k37.9M102](/packages/brick-money)[florianv/swap

Exchange rates library for PHP

1.3k6.4M16](/packages/florianv-swap)[cknow/laravel-money

Laravel Money

1.0k4.3M22](/packages/cknow-laravel-money)[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[webpatser/laravel-countries

Modern Laravel Countries package providing ISO 3166-2, ISO 3166-3, currency, capital and more for all countries. Compatible with Laravel 11.x and 12.x.

8272.8M8](/packages/webpatser-laravel-countries)[kwn/number-to-words

Multi language standalone PHP number to words converter. Fully tested, open for extensions and new languages.

4235.0M21](/packages/kwn-number-to-words)

PHPackages © 2026

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