PHPackages                             openclerk/exchanges - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. openclerk/exchanges

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

openclerk/exchanges
===================

Definitions and implementations of exchanges in Openclerk

0.1.0(8y ago)01691PHPPHP &gt;=5.4.6

Since Sep 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/openclerk/exchanges)[ Packagist](https://packagist.org/packages/openclerk/exchanges)[ RSS](/packages/openclerk-exchanges/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

openclerk/exchanges [![Build Status](https://camo.githubusercontent.com/012ac6bf99260b99f59126f556bff2ed59c80876d5b0a556f1a7c83c1534f507/68747470733a2f2f7472617669732d63692e6f72672f6f70656e636c65726b2f65786368616e6765732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/openclerk/exchanges)
============================================================================================================================================================================================================================================================================================================

[](#openclerkexchanges-)

A library for accessing live exchange market data for many different exchanges, used by [Openclerk](http://openclerk.org) and live on [CryptFolio](https://cryptfolio.com).

This extends on the abstract currency definitions provided by [openclerk/currencies](https://github.com/openclerk/currencies).

Installing
----------

[](#installing)

Include `openclerk/exchanges` as a requirement in your project `composer.json`, and run `composer update` to install it into your project:

```
{
  "require": {
    "openclerk/exchanges": "dev-master"
  }
}
```

- [Exchanges supported](https://github.com/openclerk/exchanges/tree/master/src)

Using
-----

[](#using)

Get the markets supported by an exchanges:

```
use \Monolog\Logger;

$logger = new Logger("log");

$exchange = new \Exchange\BTCe();
print_r($exchange->fetchMarkets($logger));
```

Get the current trade values for an exchange market, which will always include at least `last_trade`, and may include `bid`, `ask`, `high`, `low`, `volume`, `avg`and/or `vwap`:

```
$exchange = new \Exchange\BitNZ();
print_r($exchange->fetchRates('nzd', 'btc', $logger));
```

Tests
-----

[](#tests)

Each exchange comes with a suite of tests to check each associated service.

```
composer install
vendor/bin/phpunit

```

To run the tests for a single exchange:

```
vendor/bin/phpunit --bootstrap "vendor/autoload.php" test/CoinbaseTest

```

To get debug output for the tests (such as CURL requests and decoded output), add the `--debug` switch to your `vendor/bin/phpunit` command.

Donate
------

[](#donate)

[Donations are appreciated](https://code.google.com/p/openclerk/wiki/Donating).

Contributing
------------

[](#contributing)

Pull requests that contribute new exchanges are welcome.

For new currencies, make sure that you also provide an associated `CurrencyTest` so that the currency is automatically testable.

TODO
----

[](#todo)

1. Generate README list of currencies/services automatically
2. Link to live APIs on CryptFolio
3. CI build server and link to test results

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3171d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ebbec5ccc867054461adebb7c5b6312f8256f989ef96b124892e6e89724afdb?d=identicon)[soundasleep](/maintainers/soundasleep)

---

Top Contributors

[![soundasleep](https://avatars.githubusercontent.com/u/3889656?v=4)](https://github.com/soundasleep "soundasleep (57 commits)")

### Embed Badge

![Health badge](/badges/openclerk-exchanges/health.svg)

```
[![Health](https://phpackages.com/badges/openclerk-exchanges/health.svg)](https://phpackages.com/packages/openclerk-exchanges)
```

###  Alternatives

[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

343121.4M79](/packages/google-cloud-core)

PHPackages © 2026

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