PHPackages                             bitculator/sdk - 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. bitculator/sdk

ActiveLibrary[API Development](/categories/api)

bitculator/sdk
==============

Official PHP SDK for the Bitculator Data API

v1.0.1(1mo ago)01MITPHPPHP ^8.1

Since Jul 10Pushed 1mo agoCompare

[ Source](https://github.com/Bitculator/bitculator-php-sdk)[ Packagist](https://packagist.org/packages/bitculator/sdk)[ Docs](https://bitculator.com)[ RSS](/packages/bitculator-sdk/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Bitculator Data API — PHP SDK
=============================

[](#bitculator-data-api--php-sdk)

[bitculator.com](https://bitculator.com) · [API documentation](https://bitculator.com/en/documentation/api/v1) · [Get an API key](https://bitculator.com/user/developer/api)[Packagist — `bitculator/sdk`](https://packagist.org/packages/bitculator/sdk) · [GitHub](https://github.com/Bitculator/bitculator-php-sdk)

The official PHP SDK for the [Bitculator Data API](https://bitculator.com). No Composer dependencies (native cURL), typed, PHP 8.1+.

> Keep your API key server-side. It is a Bearer token with the `data-api` ability and is not meant for client-side embedding.

Install
-------

[](#install)

```
composer require bitculator/sdk
```

Quick start
-----------

[](#quick-start)

```
use Bitculator\Bitculator;

$client = new Bitculator(getenv('BITCULATOR_API_KEY'));

// Single resource — the { "data": ... } envelope is unwrapped for you.
$bitcoin = $client->coins->get('bitcoin');
echo $bitcoin['price']; // "63520.780763913" — a decimal string, never rounded

// A paginated list.
$page = $client->coins->list(['per_page' => 50, 'sort' => '-marketcap']);
print_r($page->data);
echo $page->meta['total'];
```

Prices are decimal strings
--------------------------

[](#prices-are-decimal-strings)

Prices, rates, and supplies come back as **strings** (e.g. `"63520.780763913"`) to preserve full precision. Use BCMath / a big-decimal library if you need to do math — do **not** cast them to `float`, which silently loses precision.

Pagination
----------

[](#pagination)

Every paginated method returns a `Page`. Read one page, or iterate to walk them all:

```
// One page at a time.
$page = $client->exchanges->list(['per_page' => 100]);
while ($page !== null) {
    foreach ($page->data as $exchange) {
        echo $exchange['name'], "\n";
    }
    $page = $page->nextPage();
}

// Or auto-paginate across every page (iterating a Page walks all pages).
foreach ($client->coins->list(['sort' => '-marketcap']) as $coin) {
    echo $coin['symbol'], "\n";
}
```

Errors
------

[](#errors)

Every failure extends `BitculatorException`; HTTP failures throw a status-specific subclass carrying the `{ error: { code, message, details } }` envelope.

```
use Bitculator\Exceptions\ValidationException;
use Bitculator\Exceptions\RateLimitException;
use Bitculator\Exceptions\ApiException;

try {
    $client->coins->list(['per_page' => 9999]); // over the plan cap -> 422
} catch (ValidationException $e) {
    echo $e->errorCode, $e->details;
} catch (RateLimitException $e) {
    echo 'retry after ', $e->retryAfter;
} catch (ApiException $e) {
    echo $e->status, $e->getMessage();
}
```

StatusException401`AuthenticationException`403`PermissionException` (plan does not include this endpoint)404`NotFoundException`422`ValidationException` (`->details` holds the field errors)429`RateLimitException` (`->retryAfter`)5xx`ServerException`Timeouts throw `TimeoutException`; network failures throw `ConnectionException`.

Quota
-----

[](#quota)

Every response carries `X-Quota-*` headers, surfaced on the client after each call:

```
$client->coins->list();
$quota = $client->quota(); // Quota { limit, remaining, reset, raw }
```

Configuration
-------------

[](#configuration)

```
new Bitculator(
    apiKey: '...',                    // required
    baseUrl: 'https://bitculator.com', // default
    timeout: 30.0,                    // seconds, default
    maxRetries: 2,                    // auto-retry 429 / 5xx / network; 0 to disable
);
```

Passing parameters
------------------

[](#passing-parameters)

Query parameters are an associative array whose keys mirror the API's names exactly (`per_page`, `min_price`, `from`, ...):

```
$client->conversion->convert(['from' => 'btc', 'to' => 'usd', 'amount' => 1]);
```

Resources
---------

[](#resources)

`coins` · `prices` · `markets` · `exchanges` · `wallets` · `globalMarket` · `sentiment` · `indicators` · `liquidations` · `conversion` · `calculators` · `editorial` · `alarms` · `webhooks` · `meta`

Full endpoint reference: .

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance90

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

48d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v1.0.1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/13697b331d5518df688273c007a0ef11a3e9153e504596eea3bdc6394993166a?d=identicon)[Bitculator](/maintainers/Bitculator)

---

Tags

apisdkcryptocryptocurrencymarket databitculator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bitculator-sdk/health.svg)

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

###  Alternatives

[coinpaymentsnet/coinpayments-php

A PHP wrapper for the CoinPayments.net v1 API.

56130.2k](/packages/coinpaymentsnet-coinpayments-php)[manamine/php-eos-rpc-sdk

PHP SDK for the EOS RPC API

187.5k](/packages/manamine-php-eos-rpc-sdk)

PHPackages © 2026

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