PHPackages                             pepijnolivier/hitbtc-php-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. pepijnolivier/hitbtc-php-sdk

ActiveLibrary[API Development](/categories/api)

pepijnolivier/hitbtc-php-sdk
============================

HitBTC SDK for PHP

1.0.2(8y ago)017MITPHP

Since Oct 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/pepijnolivier/hitbtc-php-sdk)[ Packagist](https://packagist.org/packages/pepijnolivier/hitbtc-php-sdk)[ RSS](/packages/pepijnolivier-hitbtc-php-sdk/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

Hitbtc SDK for PHP
==================

[](#hitbtc-sdk-for-php)

The HitBTC SDK for PHP enables PHP developers to use HitBTC rest trading API in their PHP code, and build robust applications and software.

Features
--------

[](#features)

- Get trading and main balances
- Place new order
- Cancel order
- Return list of orders and trades
- Transfers funds between main and trading accounts
- Returns the last created or create new one incoming cryptocurrency address that can be used to deposit cryptocurrency to your account.
- Withdraws money and creates an outgoing crypotocurrency transaction
- Returns a list of payment transactions

Installing via Composer
-----------------------

[](#installing-via-composer)

The recommended way to install hitbtc-php-sdk is through [Composer](http://getcomposer.org).

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

Next, update your project's composer.json file to include hitbtc-php-sdk:

```
{
    "require": {
        "hitbtc-com/hitbtc-php-sdk": "~1.0"
    }
}
```

Getting Started
---------------

[](#getting-started)

Go to  and create your api keys

Quick Examples
--------------

[](#quick-examples)

**New order:**

```
$client = new \Hitbtc\ProtectedClient('API key', 'API secret', $demo = false);

$newOrder = new \Hitbtc\Model\NewOrder();
$newOrder->setSide($newOrder::SIDE_SELL);
$newOrder->setSymbol('BTCUSD');
$newOrder->setTimeInForce($newOrder::TIME_IN_FORCE_GTC);
$newOrder->setType($newOrder::TYPE_LIMIT);
$newOrder->setQuantity(10);
$newOrder->setPrice(800);

try {
    $order = $client->newOrder($newOrder);
    var_dump($order->getOrderId());
    var_dump($order->getStatus()); // new
} catch (\Hitbtc\Exception\RejectException $e) {
    echo $e; // if creating order will rejected
} catch (\Hitbtc\Exception\InvalidRequestException $e) {
    echo $e->getMessage(); // error in request
} catch (\Exception $e) {
    echo $e->getMessage(); // other error like network issue
}
```

**Cancel order:**

```
try {
    $order = $client->cancelOrder($order);
    var_dump($order->getStatus()); // canceled
} catch (\Hitbtc\Exception\RejectException $e) {
    echo $e; // if creating order will rejected
} catch (\Hitbtc\Exception\InvalidRequestException $e) {
    echo $e->getMessage(); // error in request
} catch (\Exception $e) {
    echo $e->getMessage(); // other error like network issue
}
```

**Get trading balance:**

```
try {
    foreach ($client->getBalanceTrading() as $balance) {
        echo $balance->getCurrency() . ' ' . $balance->getAvailable() . ' reserved:' . $balance->getReserved() . "\n";
    }
} catch (\Hitbtc\Exception\InvalidRequestException $e) {
    echo $e;
} catch (\Exception $e) {
    echo $e;
}
//BTC 18.314848971 reserved:0.7004
//DOGE 1122543 reserved:0
```

**Get incoming cryptocurrency address that can be used to deposit cryptocurrency to your account:**

```
try {
    $address = $client->getPaymentAddress('BTC');
} catch (\Hitbtc\Exception\InvalidRequestException $e) {
    echo $e;
} catch (\Exception $e) {
    echo $e;
}
```

**Transfers funds between main and trading accounts:**

```
try {
    $tnxId = $client->transferToMain('BTC', 1.5);
} catch (\Hitbtc\Exception\InvalidRequestException $e) {
    echo $e;
} catch (\Exception $e) {
    echo $e;
}
```

Documentation
-------------

[](#documentation)

See the  for more detail.

License
-------

[](#license)

hitbtc-php-sdk is licensed under the MIT License

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~512 days

Total

3

Last Release

3247d ago

### Community

Maintainers

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

---

Top Contributors

[![toooni](https://avatars.githubusercontent.com/u/241080?v=4)](https://github.com/toooni "toooni (3 commits)")[![pepijnolivier](https://avatars.githubusercontent.com/u/2015108?v=4)](https://github.com/pepijnolivier "pepijnolivier (1 commits)")

### Embed Badge

![Health badge](/badges/pepijnolivier-hitbtc-php-sdk/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M932](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k34](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[fschmtt/keycloak-rest-api-client-php

PHP client to interact with Keycloak's Admin REST API.

49108.6k2](/packages/fschmtt-keycloak-rest-api-client-php)

PHPackages © 2026

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