PHPackages                             harrygr/open-exchange-rater - 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. harrygr/open-exchange-rater

ActiveLibrary[API Development](/categories/api)

harrygr/open-exchange-rater
===========================

A PHP client for the Open Exchange Rates API

v0.1.1(10y ago)222MITPHP

Since Oct 2Pushed 10y ago1 watchersCompare

[ Source](https://github.com/harrygr/OpenExchangeRater)[ Packagist](https://packagist.org/packages/harrygr/open-exchange-rater)[ RSS](/packages/harrygr-open-exchange-rater/feed)WikiDiscussions master Synced 2d ago

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

[![Build Status](https://camo.githubusercontent.com/47ca19d6a8628d2b92d233539da03e22c8ab47731f92d873ea9c2d99404e1b60/68747470733a2f2f7472617669732d63692e6f72672f686172727967722f4f70656e45786368616e676552617465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/harrygr/OpenExchangeRater) [![Latest Stable Version](https://camo.githubusercontent.com/075225a1e02c81b922e0daca16677b17859d9f4d030603e175c5c2ab71237d68/68747470733a2f2f706f7365722e707567782e6f72672f686172727967722f6f70656e2d65786368616e67652d72617465722f762f737461626c65)](https://packagist.org/packages/harrygr/open-exchange-rater) [![License](https://camo.githubusercontent.com/80f880a2646be242bc16733e21608cf2aeeb1c3f6a8fc990e7d6422180e0efec/68747470733a2f2f706f7365722e707567782e6f72672f686172727967722f6f70656e2d65786368616e67652d72617465722f6c6963656e7365)](https://packagist.org/packages/harrygr/open-exchange-rater)

Open Exchange Rater Client
==========================

[](#open-exchange-rater-client)

This is a simple client to consume the [openexchangerate.org](https://openexchangerates.org/) REST API.

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

[](#installation)

Using composer:

```
composer require harrygr/open-exchange-rater

```

Or clone the package into your app and include the `Client` class.

Usage
-----

[](#usage)

Instantiate the client, passing in your app id:

```
$client = new \OpenExchangeRater\Client($app_id);

```

You can now query the API like so:

#### Get an array of all available currencies:

[](#get-an-array-of-all-available-currencies)

```
$client->currencies();

```

#### Get an array of the latest FX rates

[](#get-an-array-of-the-latest-fx-rates)

```
$client->latest();

```

#### Get an array of historical rates

[](#get-an-array-of-historical-rates)

```
$client->historical(\DateTime $date);

```

#### Get a rate between 2 currencies

[](#get-a-rate-between-2-currencies)

If a date is passed it will get the rate on that date. If not it will get the latest rate

```
$client->rate($currency, $base, DateTime $date);

```

#### Convert a value from one currency to another

[](#convert-a-value-from-one-currency-to-another)

If a date is passed it will convert using the rate on that date. If not it will convert using the latest rate

```
$client->convert($value, $from, $to, DateTime $date);

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

3925d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36c297e2d991d5197cafed8a8fd85e8ad0faf310821d09772edd5c6dcf0d1424?d=identicon)[harrygr](/maintainers/harrygr)

### Embed Badge

![Health badge](/badges/harrygr-open-exchange-rater/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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