A simple PHP API client, written with PHP for kuna.io.
Kuna.io API documentation.
- PHP >= 7.2
- ext-json
The preferred way to install this extension is through composer.
Either run
$ composer require codenix-sv/kuna-api
or add
"codenix-sv/kuna-api": "^0.1"
use Codenixsv\KunaApi\KunaClient;
$client = new KunaClient('publicKey', 'secretKey');
$data = $client->publicApi()->getTimestamp();
Server time.
$data = $client->publicApi()->getTimestamp();
Recent market data.
$market = 'btcuah';
$data = $client->publicApi()->getTickers($market);
Order book.
$market = 'btcuah';
$data = $client->publicApi()->getDepth($market);
Trades history.
$market = 'btcuah';
$data = $client->publicApi()->getTrades($market);
Information about the user and assets.
$data = $client->privateApi()->getMe();
Order placing.
$side = 'buy';
$volume = 1.00;
$market = 'btcuah';
$price = 2000.00;
$data = $client->privateApi()->createOrder($side, $volume, $market, $price);
Order cancel.
$id = 32555;
$data = $client->privateApi()->deleteOrder($id);
Active user orders.
$market = 'btcuah';
$data = $client->privateApi()->getOrders($market);
User trade history.
$market = 'btcuah';
$data = $client->privateApi()->getMyTrades($market);
codenix-sv/kuna-api
is released under the MIT License. See the bundled LICENSE for details.