PHPackages                             cbix/cbix-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. cbix/cbix-php

ActiveLibrary[API Development](/categories/api)

cbix/cbix-php
=============

PHP library for the Canadian Bitcoin Index API

01.0k2PHP

Since May 6Pushed 11y agoCompare

[ Source](https://github.com/Digital-Currency-Research/CBIX-PHP)[ Packagist](https://packagist.org/packages/cbix/cbix-php)[ RSS](/packages/cbix-cbix-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

CBIX-PHP
========

[](#cbix-php)

[![Build Status](https://camo.githubusercontent.com/ef95f278426cf46ab802517ae1e39109aa149b67b3086a85e1cb0547418f235d/68747470733a2f2f7472617669732d63692e6f72672f4469676974616c2d43757272656e63792d52657365617263682f434249582d5048502e737667)](https://travis-ci.org/Digital-Currency-Research/CBIX-PHP)[![Code Climate](https://camo.githubusercontent.com/4866db6b41d42ff719395373c574bcb6282a3aec02bd7ce48b9a8f0db61fd1bd/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4469676974616c2d43757272656e63792d52657365617263682f434249582d5048502f6261646765732f6770612e737667)](https://codeclimate.com/github/Digital-Currency-Research/CBIX-PHP)[![Test Coverage](https://camo.githubusercontent.com/08f857e4f27941d01fda999204ebb0120ba1a306e7b6c2a7a84d68feb7481a59/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4469676974616c2d43757272656e63792d52657365617263682f434249582d5048502f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/Digital-Currency-Research/CBIX-PHP)

This library provides a simple PHP interface to the [Canadian Bitcoin Index API](https://www.cbix.ca/api).

### Installing via Composer

[](#installing-via-composer)

The recommended way to install the library is through [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php

# Add Chain-PHP as a dependency
php composer.phar require cbix/cbix-php:dev-master
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

### Setup

[](#setup)

Simply call the make method on the Cbix class.

```
$cbix = Cbix::make();

```

### Methods

[](#methods)

All methods of the [CBIX API](https://www.cbix.ca/api) are supported and more will be added when fully supported.

```
$index = $cbix->index();
$history = $cbix->history(['limit=100']);
$convert = $cbix->convert(500, 'CAD', 'BTC');
$news = $cbix->news();
$summary = $cbix->summary();
$orderbook = $cbix->orderbook(['limit=25']);
$volatility = $cbix->volatility(['limit=10']);

```

Exceptions
----------

[](#exceptions)

If there are any issues during the API request a CbixException will be thrown which can be caught and managed according to your application needs.

```
try {
    $index = $cbix->index();
    echo $index->index->value;
} catch (CbixException $e) {
    //There was an error more information in $e->getMessage();
    var_dump($e->getMessage());
}

```

Unit Tests
----------

[](#unit-tests)

This library uses PHPUnit for unit testing. In order to run the unit tests, you'll first need to install the dependencies of the project using Composer: `php composer.phar install --dev`. You can then run the tests using `vendor/bin/phpunit`. The library comes with a set of mocked responses from the CBIX API for running the unit tests.

Contributions
-------------

[](#contributions)

Patches, bug fixes, feature requests, and pull requests are welcome.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/947d18667b95c03befacd5f20dae7127b954f2cefcbc17e30b8bf031c23ba194?d=identicon)[garethtdavies](/maintainers/garethtdavies)

---

Top Contributors

[![garethtdavies](https://avatars.githubusercontent.com/u/135382?v=4)](https://github.com/garethtdavies "garethtdavies (1 commits)")

### Embed Badge

![Health badge](/badges/cbix-cbix-php/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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