PHPackages                             bitbuy-at/kraken-api-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. bitbuy-at/kraken-api-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

bitbuy-at/kraken-api-client
===========================

Client for Kraken.com REST API with support for Laravel

v1.6(2y ago)09MITPHPPHP ^8.0

Since Nov 10Pushed 2y agoCompare

[ Source](https://github.com/bitbuyAT/kraken-api-client)[ Packagist](https://packagist.org/packages/bitbuy-at/kraken-api-client)[ RSS](/packages/bitbuy-at-kraken-api-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Kraken.com exchange API, PHP 8 package.
=======================================

[](#krakencom-exchange-api-php-8-package)

Forked from and compatible with butschster/kraken-api-client v1.5

Installation
------------

[](#installation)

`composer require bitbuy-at/kraken-api-client`

Using
-----

[](#using)

### Laravel

[](#laravel)

#### Laravel

[](#laravel-1)

If you're using Laravel, the package will automatically register the Kraken provider and facade.

#### Configuration

[](#configuration)

You can update your .env file with the following:

```
KRAKEN_KEY=my_api_key
KRAKEN_SECRET=my_secret
KRAKEN_OTP=my_otp_key # if two-factor enabled, otherwise not required

```

#### Usage

[](#usage)

By using facade

```
use bitbuyAT\Kraken\Facade\Kraken;

$balances = Kraken::getAccountBalance();
// Will return bitbuyAT\Kraken\Objects\BalanceCollection

foreach($balances as $balance) {
    $currency = $balance->currency();
    $amount = $balance->amount();
}
```

By using dependency injection

```
use bitbuyAT\Kraken\Contracts\Client;

class BalanceConstroller extends Controller {

    public function getBalance(Client $client)
    {
        $client->getAccountBalance();
        ...
    }
}
```

### Checking minimal volume size

[](#checking-minimal-volume-size)

See

#### Check minimal order size for pair

[](#check-minimal-order-size-for-pair)

```
$orderVolume = new \bitbuyAT\Kraken\OrderVolume;
$pair = $client->getAssetPairs('EOSETH')->first();
$isValidSize = $orderVolume->checkMinimalSizeForPair($pair, 1.1);
```

#### Check minimal order size for currency

[](#check-minimal-order-size-for-currency)

```
$orderVolume = new \bitbuyAT\Kraken\OrderVolume;
$isValidSize = $orderVolume->checkMinimalSizeForPair('EOS', 1.1);
```

#### Get minimal order size

[](#get-minimal-order-size)

```
$orderVolume = new \bitbuyAT\Kraken\OrderVolume;

// Pair
$pair = $client->getAssetPairs('EOSETH')->first();
$minimalsize = $orderVolume->getMinimalSizeForPair($pair);

// Currency
$minimalsize = $orderVolume->getMinimalSize('EOS');
```

### API methods

[](#api-methods)

#### Make request

[](#make-request)

```
$client->request(string $method, array $parameters, bool $isPublic) : array;

// Public request
$trades = $client->request('Trades', ['pair' => 'BCHXBT']);

// Private request
$balance = $client->request('Balance', [], false);
```

**If request return an error, will be thrown an exception `bitbuyAT\Kraken\Exceptions\KrakenApiErrorException`**

#### Get tradable asset pairs

[](#get-tradable-asset-pairs)

```
$pairs = $client->getAssetPairs(string|array $pair, string $info='all') : bitbuyAT\Kraken\Objects\PairCollection;

foreach($pairs as $pair) {
    $pair->name();
}
```

#### Get ticker information

[](#get-ticker-information)

```
$pairs = $client->getTicker(string|array $pair) : bitbuyAT\Kraken\Objects\TickerCollection;

foreach($pairs as $pair) {
    $pair->name();
    $pair->askPrice();
    $pair->askWholeLotVolume();
    $pair->askLotVolume();
    $pair->askLotVolume();
    ...
}
```

#### Get account balance

[](#get-account-balance)

```
$balances = $client->getAccountBalance() : bitbuyAT\Kraken\Objects\BalanceCollection;

foreach($balances as $balance) {
    $currency = $balance->currency();
    $amount = $balance->amount();
}
```

#### Get open orders

[](#get-open-orders)

```
$orders = $client->getOpenOrders(bool $trades = false) : bitbuyAT\Kraken\Objects\OrdersCollection;
```

#### Get closed orders

[](#get-closed-orders)

```
$orders = $client->getClosedOrders(bool $trades = false, Carbon\Carbon $start = null, Carbon\Carbon $end = null) : bitbuyAT\Kraken\Objects\OrdersCollection;
```

#### Add new order

[](#add-new-order)

```
use bitbuyAT\Kraken\Contracts\Order as OrderContract;

$order = new bitbuyAT\Kraken\Order('BCHUSD', OrderContract::TYPE_BUY, OrderContract::ORDER_TYPE_MARKET, 20);

$orderStatus = $client->addOrder($order) : bitbuyAT\Kraken\Objects\OrderStatus;

$txid = $orderStatus->getTransactionId();
$desciption = $orderStatus->getDescription() = bitbuyAT\Kraken\Objects\OrderStatusDescription;
```

#### Cancel open order

[](#cancel-open-order)

```
$client->cancelOrder(string $transactionId): array;
```

### Supported Methods

[](#supported-methods)

All currently supported methods with params explanation can be found in the client interface (`src/Contracts/Client.php`).

Do you need any further method, which is not listed here? Just open an issue with the required method or even better open a PR to speed things up!

Contributing
============

[](#contributing)

Want to contribute? Great!

Create a new issue first, describing the feature or bug.

Just fork our code, make your changes, then let us know and we will review it.

1. Fork it.
2. Create a feature branch (git checkout -b my\_feature)
3. Commit your changes (git commit -m "Added My Feature")
4. Push to the branch (git push origin my\_feature)
5. Open a [Pull Request](https://github.com/bitbuyAT/kraken-api-client/compare)
6. Enjoy and wait ;)

We are constantly updating and improving our code. We hope it can be for the benefit of the entire community.

License
=======

[](#license)

MIT License

Please check [LICENSE.txt](https://github.com/bitbuyAT/kraken-api-client/blob/master/LICENSE.txt)

Visit us
========

[](#visit-us)

bitbuy GmbH / bitcoin.wien ()

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

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

911d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/37176ac5b7b0c91c0e335ce5e961e3e5cfe2c8bf78b56dc31d498f52b06b03fa?d=identicon)[bitbuy](/maintainers/bitbuy)

---

Top Contributors

[![butschster](https://avatars.githubusercontent.com/u/773481?v=4)](https://github.com/butschster "butschster (11 commits)")[![Tob0t](https://avatars.githubusercontent.com/u/18067389?v=4)](https://github.com/Tob0t "Tob0t (2 commits)")[![ems1985](https://avatars.githubusercontent.com/u/34405275?v=4)](https://github.com/ems1985 "ems1985 (1 commits)")

---

Tags

apiclienthttp clientkraken

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bitbuy-at-kraken-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/bitbuy-at-kraken-api-client/health.svg)](https://phpackages.com/packages/bitbuy-at-kraken-api-client)
```

###  Alternatives

[butschster/kraken-api-client

The most powerful and extendable REST API / Websocket client for Kraken.com. Built on PHP8.0

5014.3k](/packages/butschster-kraken-api-client)[basecrm/basecrm-php

BaseCRM Official API V2 library client for PHP

221.0M](/packages/basecrm-basecrm-php)[e-moe/guzzle6-bundle

Integrates Guzzle 6 into your Symfony application

11259.2k](/packages/e-moe-guzzle6-bundle)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.0k](/packages/ismaeltoe-osms)[repat/plentymarkets-rest-client

REST Client for Plentymarkets

1510.0k](/packages/repat-plentymarkets-rest-client)[meteocontrol/vcom-api-client

HTTP Client for meteocontrol's VCOM API - The VCOM API enables you to directly access your data on the meteocontrol platform.

175.7k1](/packages/meteocontrol-vcom-api-client)

PHPackages © 2026

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