PHPackages                             infiniweb/fixer-api-php - 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. infiniweb/fixer-api-php

ActiveLibrary[API Development](/categories/api)

infiniweb/fixer-api-php
=======================

PHP API wrapper for Fixer.io foreign exchange rates and currency conversion JSON API

1.0.0(7y ago)16.1kPHPPHP ^7.0

Since Jun 3Pushed 7y agoCompare

[ Source](https://github.com/infiniweb/fixer-api-php)[ Packagist](https://packagist.org/packages/infiniweb/fixer-api-php)[ RSS](/packages/infiniweb-fixer-api-php/feed)WikiDiscussions master Synced 1w ago

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

PHP wrapper for Fixer API
=========================

[](#php-wrapper-for-fixer-api)

This API wrapper provides a simple way to access [fixer.io API](https://fixer.io/documentation) in order to easily consume the endpoints with a PHP application.

---

- [Installation](#installation)
- [QuickStart](#quick-start)

We are supporting multiple endpoints:

- [symbols](#symbols): Retrieve the list of currencies supported by Fixer
- [rates](#rates): Return real-time exchange rate data AND historical data
- [convert](#convert): Return real-time exchange rate data

---

### Installation

[](#installation)

You can use composer to include this package to your project:

```
composer require infiniweb/fixer-api-php

```

### Quick Start

[](#quick-start)

You will need first to instanciate the Fixer class:

```
$fixer = new \InfiniWeb\FixerAPI\Fixer();

```

And provide the Fixer API Key:

```
$fixer->setAccessKey($apiKey);

```

Make sure to first get your Free or paid API Key [here https://fixer.io/product](https://fixer.io/product)

You are now ready to consume the API!

### Symbols

[](#symbols)

To get the list of Symbols, simply use the following:

```
$symbols = $fixer->symbols->get();

```

This will return a list of symbols (ISO 4217 Currency Code) as a simple array:

```
Array
(
    [AED] => United Arab Emirates Dirham
    [AFN] => Afghan Afghani
    [ALL] => Albanian Lek
    ...

```

### Rates

[](#rates)

The are various ways to get rates. It can be real-time data, historical data or series data (from a date to another date)

#### Real-time rates

[](#real-time-rates)

You can get the latest rates for all or for specific currencies:

```
$baseCurrency = "EUR";
$symbols = array("USD", "GBP");
$return = $fixer->rates->get($baseCurrency, $symbols);

```

This will return the rates of provided currencies compared to the base currency.

```
Array
(
    [timestamp] => 1528014248
    [base] => EUR
    [rates] => Array
        (
            [USD] => 1.166583
            [GBP] => 0.874168
        )
)

```

#### Historical rates

[](#historical-rates)

You could also retrive historical rate data by including the date in the request, such as:

```
$fixer->rates->get($baseCurrency, $symbols, "2018-01-19");

```

Note that the date needs to be following this format: `YYYY-MM-DD`

#### Time-series rates

[](#time-series-rates)

You can get daily rates from a starting end an end date, using:

```
$return = $fixer->rates->getDailyRates("2018-05-01", "2018-05-03", $baseCurrency, $symbols);

Array
(
    [base] => EUR
    [rates] => Array
        (
            [2018-05-01] => stdClass Object
                (
                    [USD] => 1.199468
                    [GBP] => 0.881297
                )
            [2018-05-02] => stdClass Object
                (
                    [USD] => 1.195602
                    [GBP] => 0.880967
                )
            ...

```

### Fluctuations

[](#fluctuations)

The parameters to retrieve the fluctuations are exactly the same then the time-series rates.

```
$return = $fixer->rates->getDailyFluctuation("2018-05-01", "2018-05-03", $baseCurrency, $symbols);

```

You will then get the daily flactuations for each currencies from the start to end date:

```
Array
(
    [base] => EUR
    [rates] => Array
        (
            [USD] => stdClass Object
                (
                    [start_rate] => 1.199468
                    [end_rate] => 1.199326
                    [change] => -0.0001
                    [change_pct] => -0.0118
                )
            [GBP] => stdClass Object
                (
                    [start_rate] => 0.881297
                    [end_rate] => 0.883748
                    [change] => 0.0025
                    [change_pct] => 0.2781
                )
        )
)

```

### Convert

[](#convert)

You can request the conversion from a currency to another. If you provide a date, it will return an historical rate.

```
$from = "EUR";
$to = "USD";
$amount = "25";
$date = "2018-01-19";
$return = $fixer->convert->get($from, $to, $amount, $date);

```

You will receive the following array:

```
Array
(
    [timestamp] => 1516406399
    [rate] => 1.222637
    [result] => 30.565925
)

```

### Additional features

[](#additional-features)

#### SSL support

[](#ssl-support)

All paid subscription plans available on Fixer.io come with 256-bit SSL encryption. You can enable SSL support by providing extra information in the class constructor:

```
$config = array('ssl' => true);
$fixer = new \InfiniWeb\FixerAPI\Fixer($config);

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

2906d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/acbce90ef4ac09161e7c9dc1c5593487050b242e6631dc977cd5f30d650ffb22?d=identicon)[infiniweb](/maintainers/infiniweb)

---

Tags

apiconversion-ratecurrenciescurrency-codescurrency-converterphpratescurrencyconversionratescurrenciesfluctuation

### Embed Badge

![Health badge](/badges/infiniweb-fixer-api-php/health.svg)

```
[![Health](https://phpackages.com/badges/infiniweb-fixer-api-php/health.svg)](https://phpackages.com/packages/infiniweb-fixer-api-php)
```

###  Alternatives

[convertapi/convertapi-php

Convert API PHP Client

523.9M](/packages/convertapi-convertapi-php)[maciej-sz/nbp-php

API for accessing Polish National Bank (NBP - Narodowy Bank Polski) currency and commodities exchange rates

1343.3k1](/packages/maciej-sz-nbp-php)[coinpaymentsnet/coinpayments-php

A PHP wrapper for the CoinPayments.net v1 API.

55126.2k](/packages/coinpaymentsnet-coinpayments-php)[currency-cloud/client

A PHP library which implements the complete functionality of v2 of the The Currency Cloud API.

17327.2k](/packages/currency-cloud-client)[aveiv/open-exchange-rates-api

PHP wrapper for Open Exchange Rates API

10292.3k](/packages/aveiv-open-exchange-rates-api)

PHPackages © 2026

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