PHPackages                             qbil-software/openexchangerates - 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. qbil-software/openexchangerates

ActiveLibrary[API Development](/categories/api)

qbil-software/openexchangerates
===============================

OpenExchangeRates PHP client. Open Exchange Rates provides a simple, lightweight and portable JSON API with live and historical foreign exchange rates

v1.0.1(5y ago)2213.9k↓65%21MITPHP

Since Dec 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/QbilSoftware/OpenExchangeRates)[ Packagist](https://packagist.org/packages/qbil-software/openexchangerates)[ RSS](/packages/qbil-software-openexchangerates/feed)WikiDiscussions master Synced yesterday

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

OpenExchangeRates
=================

[](#openexchangerates)

PHP client for fetching foreign exchange (fx rate) from openexchangerates.com

**Installation**

1. Add `qbil-software/openexchangerates` to `composer.json` file and run `composer update`

    OR
2. Run composer require `qbil-software/openexchangerates` to install and add this package to `composer.json` file.
3. `require_once 'vendor/autoload.php'` in your php file and create an instance of `Qbil\OpenExchangeRates\Exchange` class.e.g. `$exchange = new Qbil\OpenExchangeRates\Exchange($appId, $baseCurrency);` where `$appId` is your app id and `$baseCurrency` is base currency.

(See  for more info about app\_id and  for more info about base currency). Default base currency is USD. If you dont wish to change base currency, don't pass second parameter.

3. You are ready to use the client now.

**Methods**

The client provides five public methods `latest`, `historical`, `between`, `convert` and `currencies`.

All methods except `currencies` (which accepts [different arguments](https://docs.openexchangerates.org/reference/currencies-json)) can accept an associative array as argument with following keys

1. `symbols` or `currencies` - Get foreign exchange rates of only give currencies (in comma separated format).

     For example
     `$exchange->latest(['symbols' => 'USD,EUR,GBP'])` will return an array of latest foreign exchange rates of currencies USD, EUR and GBP
2. `base` - Even if you passed base currency as second argument to constructor, you can override it in each request adding `base` key to arguments array

     For example
     `$exchange->latest(['base' => 'GBP'])` will return an array of latest foreign exchange rates with respect to base currency GBP

**Methods explained**

1. `latest` - This method fetches latest foreign exchange rates. e.g. `$exchange->latest()` will return an array of latest exchange rates.
2. `historical` - This method fetches foreign exchange rates of a particular date. It has a required argument key `date` (yyyy-mm-dd format), i.e. the date of which foreign exchange rates you want to fetch .e.g. `$exchange->historical(['date' => '2017-10-01'])` will return an array of exchange rates of date 2017-10-01.
3. `between` - This method fetches foreign exchange rates between particular dates specified by arguments key `start` and `end` (both in yyyy-mm-dd format) .e.g. `$exchange->between(['start' => '2017-10-01', 'end' => '2017-11-05'])` will return an array of exchange rates of between 2017-10-01 and 2017-11-05.
4. `convert` - This method is used to convert any money value from one currency to another at the latest foreign exchange rates. It has three required argument keys `amount`, `from` and `to`. `from` and `to` are currency codes (3 letters) and `amount` is the amount you want to convert. e.g. `$exchange->between(['amount' => '15678800', 'from' => 'USD', 'to' => 'EUR'])` will return equivalent amount in EUR (as string)
5. `currencies` - This method returns array of all supported currencies with symbol as their key and currency as their value.

Note: Some of the above methods are only available in enterprise or ultimate edition. Please visit  for more info

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 83.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 ~891 days

Total

2

Last Release

1873d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/30221?v=4)[faizan](/maintainers/faizan)[@faizan](https://github.com/faizan)

---

Top Contributors

[![faizanakram99](https://avatars.githubusercontent.com/u/10880992?v=4)](https://github.com/faizanakram99 "faizanakram99 (5 commits)")[![dklymenk](https://avatars.githubusercontent.com/u/64093836?v=4)](https://github.com/dklymenk "dklymenk (1 commits)")

### Embed Badge

![Health badge](/badges/qbil-software-openexchangerates/health.svg)

```
[![Health](https://phpackages.com/badges/qbil-software-openexchangerates/health.svg)](https://phpackages.com/packages/qbil-software-openexchangerates)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M986](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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