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

ActiveSymfony-bundle[API Development](/categories/api)

qbil-software/openexchangeratesbundle
=====================================

Symfony 2.8 + compatible bundle for fetching foreign exchange rates from openexchangerates.com. Symfony wrapper for `qbil-software/openexchangerates` package

v2.0.1(6y ago)3155.4k↓25.9%1MITPHP

Since Jun 3Pushed 2y ago3 watchersCompare

[ Source](https://github.com/QbilSoftware/OpenExchangeRatesBundle)[ Packagist](https://packagist.org/packages/qbil-software/openexchangeratesbundle)[ RSS](/packages/qbil-software-openexchangeratesbundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

Open exchange rates bundle
==========================

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

Symfony 4+ compatible bundle for fetching foreign exchange rates from openexchangerates.com. Symfony wrapper for `qbil-software/openexchangerates` package

**Installation**

1. Add `qbil-software/openexchangeratesbundle` to `composer.json` file
2. Run `composer update`
3. Register bundle by adding following line to `AppKernel.php`

    ```
     new Qbil\OpenExchangeRateBundle\QbilOpenExchangeRatesBundle()

    ```
4. Add `qbil_open_exchange_rates.app_id: APP_ID` and `qbil_open_exchange_rates.base_currency: BASE_CURRENCY_SYMBOL` to `parameters.yml`where APP\_ID is you app\_id (See  for more info about app\_id) and BASE\_CURRENCY\_SYMBOL is you base currency (See  for more info about base currency). Default base currency is USD. If you dont wish to change base currency, set it to `~`
5. You are ready to use the bundle now.

**Usage**

Open exchange rates bundle comes with a service with id `Qbil\OpenExchangeRates\Exchange`, which can be injected into another services via dependency injection provided by symfony.

**Methods**

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

All methods except `currencies` (which accepts no argument) 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
     `$this-get('qbil_open_exchange_rates.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 specified base currency in `parameters.yml` file, you can override it in each request adding `base` key to arguments array

     For example
     `$this-get('qbil_open_exchange_rates.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. `$this-get('qbil_open_exchange_rates.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. `$this-get('qbil_open_exchange_rates.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. `$this-get('qbil_open_exchange_rates.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. `$this-get('qbil_open_exchange_rates.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

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 70% 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 ~132 days

Total

5

Last Release

2379d ago

Major Versions

v1.2.1 → v2.02019-11-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cd716f0e3c765196762bb3cf4e04055e1ef59dcbca35e2297a987cc555870f5?d=identicon)[faizan](/maintainers/faizan)

---

Top Contributors

[![faizanakram99](https://avatars.githubusercontent.com/u/10880992?v=4)](https://github.com/faizanakram99 "faizanakram99 (14 commits)")[![aszenz](https://avatars.githubusercontent.com/u/25319264?v=4)](https://github.com/aszenz "aszenz (4 commits)")[![junaidbinfarooq](https://avatars.githubusercontent.com/u/19165194?v=4)](https://github.com/junaidbinfarooq "junaidbinfarooq (2 commits)")

---

Tags

currenciesforeign-exchange-rateslatest-exchange-ratesopenexchangeratessymfony

### Embed Badge

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

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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