PHPackages                             flexmind-software/currency-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. [Database &amp; ORM](/categories/database)
4. /
5. flexmind-software/currency-rate

ActiveLibrary[Database &amp; ORM](/categories/database)

flexmind-software/currency-rate
===============================

Library download currency rate and save in database, It's designed to be extended by any available data source.

0.1.1(4y ago)2151MITPHPPHP ^7.4CI passing

Since Sep 14Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/flexmind-software/currency-rate)[ Packagist](https://packagist.org/packages/flexmind-software/currency-rate)[ Docs](https://github.com/flexmind-software/currency-rate)[ GitHub Sponsors](https://github.com/flexmind-software)[ RSS](/packages/flexmind-software-currency-rate/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (14)Used By (0)

Currency Rate Downloader
========================

[](#currency-rate-downloader)

[![Laravel Version Support](https://camo.githubusercontent.com/1aadb0b808f86dcf5347c367776fb08e0163ba81fc0874c3473cd6a41a00067b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d382e782d6f72616e67653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/1aadb0b808f86dcf5347c367776fb08e0163ba81fc0874c3473cd6a41a00067b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d382e782d6f72616e67653f7374796c653d666c61742d737175617265)[![Packagist PHP Version Support](https://camo.githubusercontent.com/36b9cb41a8426f563182a321df9b0041077756a2f33e6026795d97709f685e2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f666c65786d696e642d736f6674776172652f63757272656e63792d726174653f6c6162656c3d504850267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/36b9cb41a8426f563182a321df9b0041077756a2f33e6026795d97709f685e2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f666c65786d696e642d736f6674776172652f63757272656e63792d726174653f6c6162656c3d504850267374796c653d666c61742d737175617265)[![Latest Version on Packagist](https://camo.githubusercontent.com/c4d35aa835de2f7e9af6b709227ed7a899e2c92dd4795095e8f0be835cd5b6f4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666c65786d696e642d736f6674776172652f63757272656e63792d726174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/flexmind-software/currency-rate)[![GitHub Tests Action Status](https://camo.githubusercontent.com/524fbae7b31f9241d64774119f7518d7c3eb0a7e05dc31f764c9e0c962970b3a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f666c65786d696e642d736f6674776172652f63757272656e63792d726174652f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/flexmind-software/currency-rate/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/cb64ce2616f858153f01916323289c01bf89e7da5e2df1e8bcc6380fad5ea775/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f666c65786d696e642d736f6674776172652f63757272656e63792d726174652f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/flexmind-software/currency-rate/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/d1e5cb8ee2ca16e2793fd90bad3da15792dff7d8f53b488c1876ec4dcbc5341e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666c65786d696e642d736f6674776172652f63757272656e63792d726174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/flexmind-software/currency-rate)

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

[](#installation)

You can install the package via composer:

```
composer require flexmind-software/currency-rate
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="FlexMindSoftware\CurrencyRate\CurrencyRateProvider" --tag="currency-rate-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="FlexMindSoftware\CurrencyRate\CurrencyRateProvider" --tag="currency-rate-config"
```

This is the contents of the published config file:

```
return [
    'driver' => env('FLEXMIND_CURRENCY_RATE_DRIVER', 'european-central-bank'),
    'drivers' => [
        'albania',
        'armenia',
        'australia',
        'azerbaijan',
        'bceao',
        'belarus',
        'bosnia-and-herzegovina',
        'botswana',
        'bulgaria',
        'canada',
        'china',
        'croatia',
        'czech-republic',
        'denmark',
        'england',
        'european-central-bank',
        'fiji',
        'georgia',
        'hungary',
        'iceland',
        'israel',
        'macedonia',
        'moldavia',
        'norway',
        'poland',
        'romania',
        'russia',
        'serbia',
        'sweden',
        'switzerland',
        'turkey',
        'ukraine',
    ],
    'table-name' => env('FLEXMIND_CURRENCY_RATE_TABLENAME', 'currency_rates'),
    'cache-ttl' => env('FLEXMIND_CURRENCY_RATE_CACHE_TTL', 3600),
];
```

The `drivers` array defines which currency rate providers are available when running the command with `--driver=all`. Add or remove entries from this list to customise the drivers used in your application. See [config/currency-rate.php](config/currency-rate.php) for additional configuration options, including the cache TTL for HTTP requests.

### Available Drivers

[](#available-drivers)

Country / SourceDriverAlbania`albania`Armenia`armenia`Australia`australia`Azerbaijan`azerbaijan`BCEAO`bceao`Belarus`belarus`Bosnia and Herzegovina`bosnia-and-herzegovina`Botswana`botswana`Bulgaria`bulgaria`Canada`canada`China`china`Croatia`croatia`Czech Republic`czech-republic`Denmark`denmark`England`england`European Central Bank`european-central-bank`Fiji`fiji`Georgia`georgia`Hungary`hungary`Iceland`iceland`Israel`israel`Macedonia`macedonia`Moldavia`moldavia`Norway`norway`Poland`poland`Romania`romania`Russia`russia`Serbia`serbia`Sweden`sweden`Switzerland`switzerland`Turkey`turkey`Ukraine`ukraine`Usage
-----

[](#usage)

```
php artisan flexmind:currency-rate [options] [--] []

Arguments:
  date               Date to download currency rate, if empty is today

Options:
  --queue[=QUEUE]    Queue name, if set "none" cmd run without add job to queue [default: "none"]
  --driver[=DRIVER]  Driver to download rate [default: "all"]
```

Events
------

[](#events)

The `CurrencyRate::saveIn` method dispatches a `CurrencyRateSaved` event once rates are persisted. Consumers may listen for this event to trigger downstream actions:

```
use FlexMindSoftware\CurrencyRate\Events\CurrencyRateSaved;
use Illuminate\Support\Facades\Event;

Event::listen(CurrencyRateSaved::class, function (CurrencyRateSaved $event) {
    // $event->rates contains the saved records
});

### Examples

Run for today's rates using all configured drivers:

```bash
php artisan flexmind:currency-rate
```

Fetch rates for a specific date:

```
php artisan flexmind:currency-rate 2023-09-15
```

Use a specific driver:

```
php artisan flexmind:currency-rate --driver=canada
```

Dispatch the job to a queue:

```
php artisan flexmind:currency-rate --queue=default
```

Execute immediately without queueing:

```
php artisan flexmind:currency-rate --queue=none
```

Testing
-------

[](#testing)

```
composer test
```

Sources
-------

[](#sources)

   Country name Central Bank Driver name     Europe    [European Central Bank](https://ecb.europa.eu) european-central-bank   Albania [Bankës së Shqipërisë](https://www.bankofalbania.org/home) albania   Armenia [Hayastani Hanrapetut’yan Kentronakan Bank](https://www.cba.am/en/sitepages/default.aspx) armenia   Azerbaijan [Azərbaycan Mərkəzi Bankı](https://www.cbar.az) azerbaijan   Belarus [Нацыянальны банк Рэспублікі Беларусь](https://www.nbrb.by/engl/) belarus   Bosnia and Herzegovina [Централна банка Босне и Херцеговине](https://www.cbbh.ba/?lang=en) bosnia-and-herzegovina   Bulgaria [Bŭlgarska narodna banka](https://www.bnb.bg/?toLang=_EN) bulgaria   Croatia [Hrvatska Narodna Banka](https://www.hnb.hr/home) croatia   Czech Republic [Česká národní banka](https://www.cnb.cz/en/index.html) czech-republic   Danmark [Danmarks Nationalbanks](https://www.nationalbanken.dk) denmark   Georgia [Sakartvelos Erovnuli Bank’i](https://www.nbg.gov.ge) georgia   United Kingdom [Bank of England](https://www.bankofengland.co.uk/) england   Hungary [Magyar Nemzeti Bank](https://www.mnb.hu/en/) hungary   Iceland [Seðlabanki Íslands](https://cb.is) iceland   Macedonia [Narodna Banka na Republika Severna Makedonija](https://www.nbrm.mk/) macedonia   Moldavia [Banca Naţională a Moldovei](https://www.bnm.md/) moldavia   Norway [Norges Bank](https://www.norges-bank.no/en/) norway   Poland [Narodowy Bank Polski](https://www.nbp.pl/) poland   Russia [Tsentral'nyy bank Rossiyskoy Federatsii](https://cbr.ru/) russia   Romania [Banca Națională a României](https://www.bnro.ro/) romania   Serbia [Narodna banka Srbije](https://www.nbs.rs/) serbia   Switzerland [Banca naziunala svizra](https://www.snb.ch/) switzerland   Sweden [Sveriges Riksbank](https://www.riksbank.se/en-gb/) sweden   Turkey [Türkiye Cumhuriyet Merkez Bankası](https://www.tcmb.gov.tr/) turkey   Ukraine [Natsionalʹnyy bank Ukrayiny](https://www.bank.gov.ua/) ukraine   Africa   Benin [Central Bank of West African States (BCEAO)](https://www.bceao.int) bceao   Botswana [Bank of Botswana](https://www.bankofbotswana.bw) botswana   Burkina Faso [Central Bank of West African States (BCEAO)](https://www.bceao.int) bceao   Guinea-Bissau [Central Bank of West African States (BCEAO)](https://www.bceao.int) bceao   Ivory Coast [Central Bank of West African States (BCEAO)](https://www.bceao.int) bceao   Mali [Central Bank of West African States (BCEAO)](https://www.bceao.int) bceao   Niger [Central Bank of West African States (BCEAO)](https://www.bceao.int) bceao   Senegal [Central Bank of West African States (BCEAO)](https://www.bceao.int) bceao   Togo [Central Bank of West African States (BCEAO)](https://www.bceao.int) bceao   Asia   China [CFETS - China Foreign Exchange Trade System](http://www.chinamoney.com.cn/english/bmkcpr/) china   Israel [בנק ישראל](https://www.boi.org.il/) israel   North America   Canada [Banqueu du Canada](https://www.bankofcanada.ca/) canada   Oceania   Australia [Reserve Bank of Australia](https://www.rba.gov.au/) australia   Fiji [Reserve Bank of Fiji](https://www.rbf.gov.fj/) fiji  Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

### Adding new locales

[](#adding-new-locales)

Translations for driver descriptions live in `resources/langs/{locale}/description.php`. To contribute a new locale:

1. Create a new directory for the locale under `resources/langs` (for example `es` for Spanish).
2. Copy `resources/langs/en/description.php` into that directory and translate the strings.
3. Submit a pull request with the new translation file.

Credits
-------

[](#credits)

- [Krzysztof Bielecki](https://github.com/qwerkon)
- [All Contributors](https://github.com/flexmind-software/currency-rate/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance42

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.9% 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 ~1 days

Total

11

Last Release

1697d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d1309f681c1a04cf5a71e00b95223561e6edcce9d9df441e27218f8a5c695ad?d=identicon)[systemy-flexmind](/maintainers/systemy-flexmind)

---

Top Contributors

[![qwerkon](https://avatars.githubusercontent.com/u/5518662?v=4)](https://github.com/qwerkon "qwerkon (91 commits)")[![systemy-flexmind](https://avatars.githubusercontent.com/u/51311340?v=4)](https://github.com/systemy-flexmind "systemy-flexmind (45 commits)")

---

Tags

currency-convertercurrency-exchange-ratescurrency-rateflexmindlaravellaravel-packagemysqlphppostgresqlphplaravelmysqlmongocurrency-convertercurrency ratecurrency-exchangecurrency ratespostresqlflexmindpachagesforeign exchange rates

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/flexmind-software-currency-rate/health.svg)

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

###  Alternatives

[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[outerweb/settings

Application wide settings stored in your database

4899.2k5](/packages/outerweb-settings)[io238/laravel-iso-countries

Ready-to-use Laravel models and relations for country (ISO 3166), language (ISO 639-1), and currency (ISO 4217) information with multi-language support.

5462.3k](/packages/io238-laravel-iso-countries)[awssat/laravel-sync-migration

Laravel tool helps to sync migrations without refreshing the database

10923.2k](/packages/awssat-laravel-sync-migration)[kiwilan/typescriptable-laravel

PHP package for Laravel to type Eloquent models, routes, Spatie Settings with autogenerated TypeScript. If you want to use some helpers with Inertia, you can install associated NPM package.

3920.9k](/packages/kiwilan-typescriptable-laravel)

PHPackages © 2026

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