PHPackages                             ranium/fixerio-php-client - 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. ranium/fixerio-php-client

ActiveLibrary[API Development](/categories/api)

ranium/fixerio-php-client
=========================

A PHP client for fixer.io foreign exchange rates and currency conversion API.

v1.2.0(5y ago)343.6k↓15%31MITPHP

Since Feb 5Pushed 5y agoCompare

[ Source](https://github.com/ranium/fixerio-php-client)[ Packagist](https://packagist.org/packages/ranium/fixerio-php-client)[ RSS](/packages/ranium-fixerio-php-client/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (1)

 [ ![Build Status](https://github.com/ranium/fixerio-php-client/workflows/tests/badge.svg) ](https://github.com/ranium/fixerio-php-client/actions) [ ![Total Downloads](https://camo.githubusercontent.com/8fc4d2b2375487902afa16bff8e20485d70e079236e89d0cade8d8243c684b15/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72616e69756d2f6669786572696f2d7068702d636c69656e74) ](https://packagist.org/packages/ranium/fixerio-php-client) [ ![Latest Stable Version](https://camo.githubusercontent.com/ba160cf688b38500251231531ee1292a5551194bee460ec0490cdf0a4031e3d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72616e69756d2f6669786572696f2d7068702d636c69656e74) ](https://packagist.org/packages/ranium/fixerio-php-client) [ ![License](https://camo.githubusercontent.com/b31a56e13060cd2f43676493eeccbf1642fbf394c58cf8f20f0eb35ad32232f6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72616e69756d2f6669786572696f2d7068702d636c69656e74) ](https://packagist.org/packages/ranium/fixerio-php-client)

Fixer.io PHP Client
===================

[](#fixerio-php-client)

Provides an easy to use client for [fixer.io](https://fixer.io) exchange rates and currency conversion JSON API.

*Looking for a Laravel package? Please use [ranium/laravel-fixerio](https://github.com/ranium/laravel-fixerio) instead of this library.*

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

[](#installation)

This project can be installed using Composer:

`composer require ranium/fixerio-php-client`

Usage
-----

[](#usage)

This package uses's [Guzzle's Service Description](https://github.com/guzzle/guzzle-services) to make HTTP Requests to the fixer.io API.

To use this package in your application, simply use the package and instantiate the client as follows

```
use Ranium\Fixerio\Client;

$accessKey = '12345678901234567890';
$secure = true; // Optional, default is true (only paid plans of fixer.io supports SSL)
$config = []; // Optional, guzzle command client config that you might want to pass

$fixerio = Client::create($accessKey, $secure, $config);
```

Here's how you can access the fixer.io's endpoints:

*Note: `access_key` parameter is sent by default in all requests so no need to pass it in the argument while calling methods. However, you can include it should you want to override the access key used while instantiating the fixerio client.*

### [Latest rates endpoint](https://fixer.io/documentation#latestrates)

[](#latest-rates-endpoint)

```
$latestRates = $fixerio->latest(
    [
        'base' => 'USD', // optional
        'symbols' => 'INR', // optional
    ]
);

// Display the INR rates
echo $latestRates['rates']['INR'];
```

### [Historical rates endpoint](https://fixer.io/documentation#historicalrates)

[](#historical-rates-endpoint)

```
$historicalRates = $fixerio->historical(
    [
        'date' => '2019-01-01',
        'base' => 'USD', // optional
        'symbols' => 'INR', //optional
    ]
);

// Display the INR rates
echo $latestRates['rates']['INR'];
```

### [Convert endpoint](https://fixer.io/documentation#convertcurrency)

[](#convert-endpoint)

```
$convertedRates = $fixerio->convert(
    [
        'from' => 'USD',
        'to' => 'INR',
        'amount' => 50.75,
        'date' => '2019-01-01', //optional
    ]
);

// Display the converted amount
echo $convertedRates['result'];
```

### [Time-Series data endpoint](https://fixer.io/documentation#timeseries)

[](#time-series-data-endpoint)

```
$timeseriesData = $fixerio->timeseries(
    [
        'start_date' => '2019-01-01',
        'end_date' => '2019-01-05',
        'base' => 'USD', // optional
        'symbols' => 'INR', //optional
    ]
);

// Display the INR rate for 2019-01-02
echo $timeseriesData['rates']['2019-01-02']['INR'];
```

### [Fluctuation data endpoint](https://fixer.io/documentation#timeseries)

[](#fluctuation-data-endpoint)

```
$fluctuationData = $fixerio->fluctuation(
    [
        'start_date' => '2019-01-01',
        'end_date' => '2019-01-05',
        'base' => 'USD', // optional
        'symbols' => 'INR', //optional
    ]
);

// Display the change/fluctuation amount of INR between the given date range
echo $fluctuationData['rates']['INR']['change'];
```

The response for all the above calls will be a JSON object. Please refer fixer.io's [documentation](https://fixer.io/documentation) for further details about various endpoints, request parameters and response objects.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~175 days

Total

5

Last Release

1960d ago

Major Versions

v0.0.1 → v1.0.02019-02-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/139e699b6ff33ee0232b57559daca8b1eeae1627bfbb2aa9f5146eb27423800a?d=identicon)[ranium](/maintainers/ranium)

---

Top Contributors

[![abbasali](https://avatars.githubusercontent.com/u/145739?v=4)](https://github.com/abbasali "abbasali (4 commits)")[![abhishek-ranium](https://avatars.githubusercontent.com/u/45379749?v=4)](https://github.com/abhishek-ranium "abhishek-ranium (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ranium-fixerio-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/ranium-fixerio-php-client/health.svg)](https://phpackages.com/packages/ranium-fixerio-php-client)
```

###  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)
