codenix-sv / kuna-api
PHP REST API v2 client for Kuna exchange
v0.1.0
2020-03-18 18:05 UTC
Requires
- php: ^7.2
- ext-json: *
- codenix-sv/api-client: ^1.0
- nyholm/psr7: ^1.2
- php-http/guzzle6-adapter: ^2.0
Requires (Dev)
- php-http/mock-client: ^1.3
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-12-19 04:23:32 UTC
README
A simple PHP API client, written with PHP for kuna.io.
Kuna.io API documentation.
Requirements
- PHP >= 7.2
- ext-json
Installation
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"
Basic usage
Example
use Codenixsv\KunaApi\KunaClient; $client = new KunaClient('publicKey', 'secretKey'); $data = $client->publicApi()->getTimestamp();
Public Methods
getTimestamp
Server time.
$data = $client->publicApi()->getTimestamp();
getTickers
Recent market data.
$market = 'btcuah'; $data = $client->publicApi()->getTickers($market);
getDept
Order book.
$market = 'btcuah'; $data = $client->publicApi()->getDepth($market);
getTrades
Trades history.
$market = 'btcuah'; $data = $client->publicApi()->getTrades($market);
User Methods
getMe
Information about the user and assets.
$data = $client->privateApi()->getMe();
createOrder
Order placing.
$side = 'buy'; $volume = 1.00; $market = 'btcuah'; $price = 2000.00; $data = $client->privateApi()->createOrder($side, $volume, $market, $price);
deleteOrder
Order cancel.
$id = 32555; $data = $client->privateApi()->deleteOrder($id);
getOrders
Active user orders.
$market = 'btcuah'; $data = $client->privateApi()->getOrders($market);
getMyTrades
User trade history.
$market = 'btcuah'; $data = $client->privateApi()->getMyTrades($market);
License
codenix-sv/kuna-api
is released under the MIT License. See the bundled LICENSE for details.