PHPackages                             alexdives/kuna-api-for-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. alexdives/kuna-api-for-php

ActiveLibrary[API Development](/categories/api)

alexdives/kuna-api-for-php
==========================

Kuna Exchange PHP API - https://kuna.io/documents/api

1.0(5y ago)09MITPHPPHP ^7.3|^8.0

Since Mar 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/AlexDives/kuna-api-for-php)[ Packagist](https://packagist.org/packages/alexdives/kuna-api-for-php)[ Docs](https://github.com/alexdives/kuna-api-for-php)[ RSS](/packages/alexdives-kuna-api-for-php/feed)WikiDiscussions main Synced today

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

[&lt;&lt; Kuna API (php)](https://github.com/AlexDives/kuna-api-for-php)

Kuna.io PHP API
===============

[](#kunaio-php-api)

[![GitHub issues](https://camo.githubusercontent.com/f02dc3851bcc968d7e52ddcfbef5dc069e26e3b4c6db87d028489c6174ddc098/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f416c657844697665732f6b756e612d6170692d666f722d7068702e7376673f7374796c653d666c61742d737175617265)](https://github.com/AlexDives/kuna-api-for-php/issues)[![GitHub stars](https://camo.githubusercontent.com/4f2b2d6842890113abfb047e1ea28bdb17bea9adaff8dde2e0bc42180222ee15/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f416c657844697665732f6b756e612d6170692d666f722d7068702e7376673f7374796c653d666c61742d737175617265)](https://github.com/AlexDives/kuna-api-for-php/stargazers)

[![PHP Version](https://camo.githubusercontent.com/432571e2257b031fd29da9af87b23b406d5553ff36526d97eb9e211842345e08/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e332532422d626c75652e7376673f7374796c653d666c61742d737175617265)](http://www.php.net/)[![Guzzle Version](https://camo.githubusercontent.com/ecf4ddc2fbab317ff6fae33b4ca7d3d54c40701891c58cc2dfa51e5259f7ff01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f67757a7a6c652d372e302e312d677265656e2e7376673f7374796c653d666c61742d737175617265)](http://docs.guzzlephp.org/)[![Packagist](https://camo.githubusercontent.com/ec2c10d7f95c27f85071ddbbaaa77f720cc565ec083674ec6c39c7ce527150a7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d616c657864697665732532466b756e612d2d6170692d2d666f722d2d7068702d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/AlexDives/kuna-api-for-php)

### WARNING! This is not a stable version!

[](#warning-this-is-not-a-stable-version)

PHP 7.3+ is required.

1. Install
----------

[](#1-install)

You can add Kuna PHP API as a dependency using the **composer.phar** CLI:

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

# Add dependency
php composer.phar require AlexDives/kuna-api-for-php:^1.0
```

Alternatively, you can specify Kuna PHP API as a dependency in your project's existing `composer.json` file:

```
{
   "require": {
      "alexdives/kuna-api-for-php": "^1.0"
   }
}
```

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

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

You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at [getcomposer.org](//getcomposer.org).

2. Public methods
-----------------

[](#2-public-methods)

### 2.1. Timestamp

[](#21-timestamp)

```
use Kuna\Client;

$kuna = new Client();
$timestamp = $kuna->publicMethod()->timestamp(); //1466486485
```

### 2.2. Tickers

[](#22-tickers)

```
use Kuna\Client;
use Kuna\Constant;

$kuna = new Client();
$tickers = $kuna->publicMethod()->tickers(Constant::MARKET_BTCUAH);

print_r($tickers);
```

Result:

```
{
	"at":1466486520,
	"ticker":{
		"buy": 18001.0,
		"sell": 18939.0,
		"low": 18000.0,
		"high": 18999.0,
		"last": 18000.0,
		"vol": 1.6011
	}
}
```

### 2.3. Order book

[](#23-order-book)

```
use Kuna\Client;
use Kuna\Constant;

$kuna = new Client();
$orderBook = $kuna->publicMethod()->orderBook(Constant::MARKET_BTCUAH);

print_r($orderBook);
```

Result:

```
{
	"asks": [
		{
			"id": 1182,
			"side": "sell",
			"ord_type": "limit",
			"price": 18939.0,
			"avg_price": 0.0,
			"state": "wait",
			"market": "btcuah",
			"created_at": "2021-03-18T05:09:02Z",
			"volume": 0.0326,
			"remaining_volume": 0.0326,
			"executed_volume": 0.0,
			"trades_count":0
		}
	],

	"bids": [
		{
			"id": 1183,
			"side": "buy",
			"ord_type": "limit",
			"price": 18001.0,
			"avg_price": 0.0,
			"state": "wait",
			"market": "btcuah",
			"created_at": "2021-03-18T05:09:03Z",
			"volume": 0.0005,
			"remaining_volume": 0.0005,
			"executed_volume": 0.0,
			"trades_count": 0
		}
	]
}
```

### 2.4. Trades

[](#24-trades)

```
use Kuna\Client;
use Kuna\Constant;

$kuna = new Client();
$trades = $kuna->publicMethod()->trades(Constant::MARKET_BTCUAH);

print_r($trades);
```

Result:

```
[
	{
		"id": 338,
		"price": 18000.0,
		"volume": 0.369,
		"funds": 6642.0,
		"market": "btcuah",
		"created_at": "2021-03-18T04:44:58Z",
		"side": null
	}
]
```

3. Private methods
------------------

[](#3-private-methods)

```
use Kuna\Client;

$kuna = new Client([
	"publicKey" => "Your public key",
	"secretKey" => "Your secret key",
]);

$privateMethod = $kuna->privateMethod();
```

### 3.1. My profile

[](#31-my-profile)

```
$me = $privateMethod->me();
print_r($me);
```

Result:

```
{
    "email": "example@email.com",
    "activated": true,
    "accounts": [
        {
	        "currency": "btc",
	        "balance": 12.4123,
	        "locked": 0.42
        },
        {
            "currency": "uah",
            "balance": 233519.52,
            "locked": 4981.315
        }
    ]
}
```

### 3.2. Create new Order

[](#32-create-new-order)

```
$orderMethod = $privateMethod->order();

/**
 * $price
 * $volume
 * $side
 * $market
 */
$newOrder = $orderMethod->create(18000, 0.1, Constant::SIDE_BUY, Constant::MARKET_BTCUAH);

print_r($newOrder);
```

Result:

```
{
    "id": 3091,
    "side": "buy",
    "ord_type": "market",
    "price": 18000,
    "avg_price": 0,
    "state": "wait",
    "market": "btcuah",
    "created_at": "2021-03-18T05:09:02Z",
    "volume": 0.1,
    "remaining_volume": 0.1,
    "executed_volume": 0,
    "trades_count": 0
}
```

### 3.3. Delete order

[](#33-delete-order)

```
$orderMethod = $privateMethod->order();

/**
 * @property int $orderId
 */
$deletedOrder = $orderMethod->delete(3091);

print_r($deletedOrder);
```

Result:

```
{
    "id": 3091,
    "side": "buy",
    "ord_type": "market",
    "price": 18000,
    "avg_price": 18000,
    "state": "wait",
    "market": "btcuah",
    "created_at": "2021-03-18T05:09:02Z",
    "volume": 0.1,
    "remaining_volume": 0.05,
    "executed_volume": 0.05,
    "trades_count": 3
}
```

### 3.4. Active order list

[](#34-active-order-list)

```
$orderMethod = $privateMethod->order();

$orderList = $orderMethod->orderList(Constant::MARKET_BTCUAH);

print_r($orderList);
```

Result:

```
[
	{
	    "id": 3994,
	    "side": "buy",
	    "ord_type": "market",
	    "price": 29000,
	    "avg_price": 40000,
	    "state": "wait",
	    "market": "btcuah",
	    "created_at": "2021-03-18T05:09:02Z",
	    "volume": 0.8,
	    "remaining_volume": 0.109,
	    "executed_volume": 0.691,
	    "trades_count": 8
	}, {
	    "id": 40,
	    "side": "sell",
	    "ord_type": "market",
	    "price": 28000,
	    "avg_price": 29910,
	    "state": "wait",
	    "market": "btcuah",
	    "created_at": "2021-03-18T05:09:02Z",
	    "volume": 0.5,
	    "remaining_volume": 0.3,
	    "executed_volume": 0.2,
	    "trades_count": 10
	}
]
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1879d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c69f0d4eca4f1673624f90965df544c2b877daff814fbf7660326b9b1884792?d=identicon)[AlexDives](/maintainers/AlexDives)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/alexdives-kuna-api-for-php/health.svg)

```
[![Health](https://phpackages.com/badges/alexdives-kuna-api-for-php/health.svg)](https://phpackages.com/packages/alexdives-kuna-api-for-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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