PHPackages                             thed1360/btc-ex - 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. thed1360/btc-ex

AbandonedArchivedLibrary[API Development](/categories/api)

thed1360/btc-ex
===============

Wrapping library for multiple BTC exchange protocols

2339PHP

Since Feb 9Pushed 10y ago2 watchersCompare

[ Source](https://github.com/theD1360/btc-ex)[ Packagist](https://packagist.org/packages/thed1360/btc-ex)[ RSS](/packages/thed1360-btc-ex/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

BTC-ex
======

[](#btc-ex)

Multi-exchange bitcoin trading interface for php.

This project aims to create a common interface to the various exchange API's that is easy to install and use via composer.

Curent list of clients and their status is as follows.

- Bitstamp - willmoss/bitstamp-php-api (mostly normalized)
- MtGox - thed1360/mtgox-api-v1-php-class (mostly normalized **doesn't matter they're dead anyways**)
- BTC-e - marinu666/PHP-btce-api (only ticker method normalized)
- Kraken - payward/kraken-api-client (only ticker method normalized)

Installation
============

[](#installation)

Installation is extremely easy using composer by adding the package to your `composer.json`

```
    "require": {
        "php": ">=5.4.0",
        "thed1360/array-helper": "dev-master",
        "thed1360/btc-ex": "dev-master"
    }

```

If you are unfamiliar please visit.

-
-

Usage
=====

[](#usage)

```
use BitcoinExchange\Factory;
use \Exception;

try{
	// first parameter is the driver mtgox|btc-e|bitstamp
	// second parameter is an array with the key, secret, and usually a third parameter which is either client_id, cert, or noonce

	$instance = new Factory("bitstamp", ["key"=>"test", "secret"=>"sdklfj", "client_id"=>0000]);
	$client = $instance->client();

	var_dump($client->balance());

}catch(Exception $e){
	echo $e->getMessage()."\n";

}

```

As work progresses the aim is to normalize not only the methods into simple `buy`, `sell`, `ticker`, `cancel`, and `balance` but to also normalize their output as well.

Currently all but one of the libraries (the dead one) are included in this package but I will be trying to work with the authors to have them published to packagist.

Drivers
=======

[](#drivers)

Drivers are extensions of the libraries for the different APIs and mormalize the methods and their output.

The standard is to return an Arr object for every response. Once you have written a driver you can add it to the Factory::Divers array to make it available to us.

Contributions
=============

[](#contributions)

Currently this project needs contributions not only by the original authors of the libraries but we also require people with accounts at different exchanges to write drivers.

If you would like to make a contribution just fork us and make a pull request.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

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

---

Top Contributors

[![theD1360](https://avatars.githubusercontent.com/u/219795?v=4)](https://github.com/theD1360 "theD1360 (20 commits)")[![rawlbot](https://avatars.githubusercontent.com/u/4070729?v=4)](https://github.com/rawlbot "rawlbot (2 commits)")

### Embed Badge

![Health badge](/badges/thed1360-btc-ex/health.svg)

```
[![Health](https://phpackages.com/badges/thed1360-btc-ex/health.svg)](https://phpackages.com/packages/thed1360-btc-ex)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

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