PHPackages                             oceanapplications/currencylayer-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. oceanapplications/currencylayer-php-client

ActiveLibrary[API Development](/categories/api)

oceanapplications/currencylayer-php-client
==========================================

Currencylayer API PHP client

1.4.4(8y ago)568.2k↑71.4%4MITPHP

Since Dec 13Pushed 6y ago2 watchersCompare

[ Source](https://github.com/oceanapplications/currencylayer-php-client)[ Packagist](https://packagist.org/packages/oceanapplications/currencylayer-php-client)[ RSS](/packages/oceanapplications-currencylayer-php-client/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)DependenciesVersions (10)Used By (0)

Stay up to date by following @apilayernet on Twitter.

---

currencylayer API - PHP client
==============================

[](#currencylayer-api---php-client)

Currencylayer provides a JSON-based REST API, delivering reliable and accurate currency exchange rates for 168 world currencies and precious metals at an affordable price, which makes it the perfect instrument for startups and online businesses, as well as for larger companies in need of reliable financial data via an easy to use interface. The currencylayer API is widely used to power financial departments, mobile applications and back-office systems around the world.

##### Features

[](#features)

- Real-time Exchange Rates
- Historical Rates back to 1999
- Currency Conversion
- Time-Frame Queries
- Currency-Change Queries

Website: [currencylayer.com](https://currencylayer.com/)

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

[](#installation)

#### With Composer *RECOMMENDED*

[](#with-composer-recommended)

```
composer require oceanapplications/currencylayer-php-client

```

```
Use OceanApplications\currencylayer;

$currencylayer = new currencylayer\client('API Key');

```

#### without composer

[](#without-composer)

Download and extract the `latest release` to `/your/libs/currencylayer/`

```
require_once '/your/libs/currencylayer/php-client/src/currencylayer/client.php';
$currencylayer = new \currencylayer\client('YOUR_ACCESS_KEY');
```

Usage
-----

[](#usage)

##### Example: Request real-time rates via "live" endpoint

[](#example-request-real-time-rates-via-live-endpoint)

```
$result = $currencylayer
  ->source('USD')
  ->currencies('JPY,GBP,AUD')
  ->live();
```

##### Example: Request historical rates via "historical" endpoint

[](#example-request-historical-rates-via-historical-endpoint)

```
$result = $currencylayer
  ->date('2015-01-01')
  ->source('USD')
  ->currencies('JPY,GBP,AUD')
  ->historical();
```

##### Example: Convert currencies via "convert" endpoint

[](#example-convert-currencies-via-convert-endpoint)

```
$result = currencylayer
  ->from('USD')
  ->to('JPY')
  ->amount('10')
  ->date('2015-01-01')
  ->convert();
```

##### Example: Request time-frame (time-series) data via "timeframe" endpoint

[](#example-request-time-frame-time-series-data-via-timeframe-endpoint)

```
$result = $currencylayer
  ->source('USD')
  ->currencies('JPY,GBP,AUD')
  ->start_date('2014-01-01')
  ->end_date('2014-02-01')
  ->timeframe();
```

##### Example: Request currency-change data via "change" endpoint

[](#example-request-currency-change-data-via-change-endpoint)

```
$result = $currencylayer
  ->source('USD')
  ->currencies('JPY,GBP,AUD')
  ->start_date('2014-01-01')
  ->end_date('2014-02-01')
  ->change();
```

API Documentation
-----------------

[](#api-documentation)

See: [currencylayer.com/documentation](https://currencylayer.com/documentation)

TREEWARE
--------

[](#treeware)

You're free to use this package, but if it makes it to your production environment you are required to buy the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to [plant trees](https://www.bbc.co.uk/news/science-environment-48870920). If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees here [offset.earth/treeware](https://plant.treeware.earth/oceanappications/currencylayer-php-client)

Read more about Treeware at [treeware.earth](http://treeware.earth)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 62.1% 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 ~133 days

Recently: every ~119 days

Total

9

Last Release

3152d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/58f943d2f265e822ed311a9c234d1121190cf61c411b57cd49c61410d00c8330?d=identicon)[oceanapplications](/maintainers/oceanapplications)

---

Top Contributors

[![jamsouf](https://avatars.githubusercontent.com/u/6104602?v=4)](https://github.com/jamsouf "jamsouf (41 commits)")[![oceanapplications](https://avatars.githubusercontent.com/u/2704923?v=4)](https://github.com/oceanapplications "oceanapplications (20 commits)")[![ktarassow](https://avatars.githubusercontent.com/u/271767?v=4)](https://github.com/ktarassow "ktarassow (2 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (1 commits)")[![mikedfunk](https://avatars.githubusercontent.com/u/661038?v=4)](https://github.com/mikedfunk "mikedfunk (1 commits)")[![TiMESPLiNTER](https://avatars.githubusercontent.com/u/598854?v=4)](https://github.com/TiMESPLiNTER "TiMESPLiNTER (1 commits)")

---

Tags

currencylayer

### Embed Badge

![Health badge](/badges/oceanapplications-currencylayer-php-client/health.svg)

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

###  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.0k13](/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)
