PHPackages                             centrex/laravel-open-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. centrex/laravel-open-exchange-rates

ActiveLibrary[API Development](/categories/api)

centrex/laravel-open-exchange-rates
===================================

This is my package laravel-open-exchange-rates

v1.2.0(1y ago)02.2k[4 PRs](https://github.com/centrex/laravel-open-exchange-rates/pulls)MITPHPPHP ^8.2|^8.3|^8.4CI failing

Since Mar 14Pushed 1mo agoCompare

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

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

Laravel Open Exchange Rates
===========================

[](#laravel-open-exchange-rates)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fcdc6175f709900d359d22ffc5c2b7b7ebb79d50d1979bb963f892ad6c6ba285/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63656e747265782f6c61726176656c2d6f70656e2d65786368616e67652d72617465732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/centrex/laravel-open-exchange-rates)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1dfa3b649e5b53b91993c5225ca227abcf673e72c200381990840c8b8e599ff0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63656e747265782f6c61726176656c2d6f70656e2d65786368616e67652d72617465732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/centrex/laravel-open-exchange-rates/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/6180f582eac0d996c7ae803151d3db24c5e52d3d04769efa5d6c861633e029ea/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63656e747265782f6c61726176656c2d6f70656e2d65786368616e67652d72617465732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/centrex/laravel-open-exchange-rates/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/adff4b6cc866b1cc175cc8d44736a2d6ae3245a27bd24f62754d72f814dce5c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63656e747265782f6c61726176656c2d6f70656e2d65786368616e67652d72617465733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/centrex/laravel-open-exchange-rates)

Laravel client for the [Open Exchange Rates API](https://openexchangerates.org). Provides access to latest rates, historical rates, currency conversion, OHLC data, time-series, and account usage.

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

[](#installation)

```
composer require centrex/laravel-open-exchange-rates
php artisan vendor:publish --tag="laravel-open-exchange-rates-config"
```

Add your App ID to `.env`:

```
OPEN_EXCHANGE_RATES_APP_ID=your_app_id_here
```

Usage
-----

[](#usage)

```
use Centrex\LaravelOpenExchangeRates\Facades\OpenExchangeRates;

// Latest rates (all currencies)
$rates = OpenExchangeRates::latest();

// Latest rates for specific currencies
$rates = OpenExchangeRates::latest('USD,EUR,BDT,GBP');

// Historical rates for a date
$rates = OpenExchangeRates::historical('2024-01-01');
$rates = OpenExchangeRates::historical('2024-01-01', 'USD,EUR');

// Convert a value between currencies
$result = OpenExchangeRates::convert(100, 'USD', 'BDT');

// Full list of available currencies
$currencies = OpenExchangeRates::currencies();
$currencies = OpenExchangeRates::currencies(showAlternative: '1');

// Time-series rates between two dates
$series = OpenExchangeRates::timeSeries('2024-01-01', '2024-01-31', 'USD,EUR');

// OHLC (Open, High, Low, Close) for a period
// Allowed periods: 1m, 5m, 15m, 30m, 1h, 12h, 1d, 1w, 1mo
$ohlc = OpenExchangeRates::ohlc('2024-01-01T00:00:00Z', '1d', 'USD,EUR');

// Account usage stats
$usage = OpenExchangeRates::usage();
```

All methods return a decoded array. An `OpenExchangeRatesResponseException` is thrown on API errors.

Testing
-------

[](#testing)

```
composer test        # full suite
composer test:unit   # pest only
composer test:types  # phpstan
composer lint        # pint
```

Changelog
---------

[](#changelog)

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

Credits
-------

[](#credits)

- [centrex](https://github.com/centrex)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance71

Regular maintenance activity

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 56.4% 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 ~109 days

Total

4

Last Release

462d ago

Major Versions

v0.0.1 → v1.0.02024-03-14

PHP version history (2 changes)v0.0.1PHP ^8.1|^8.2

v1.2.0PHP ^8.2|^8.3|^8.4

### Community

Maintainers

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

---

Top Contributors

[![rochi88](https://avatars.githubusercontent.com/u/29769944?v=4)](https://github.com/rochi88 "rochi88 (22 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")

---

Tags

laravelcentrexlaravel-open-exchange-rates

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/centrex-laravel-open-exchange-rates/health.svg)

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

###  Alternatives

[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[alibori/laravel-api-resource-generator

Package to generate API resources from models.

222.6k](/packages/alibori-laravel-api-resource-generator)

PHPackages © 2026

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