PHP code example of slvler / btcturk-api

1. Go to this page and download the library: Download slvler/btcturk-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

slvler / btcturk-api example snippets


use slvler\BtcTurkApi\BtcTurkClient;

$client = new BtcTurkClient();

$data = $client->exchange()->getList();

$data = $client->ticker()->getPair('BTCUSDT');

$data = $client->ticker()->getCurrency('usdt');

$data = $client->orderBook()->getOrderBook('BTCUSDT', ['limit' => 10]);

$data = $client->trades()->getTrades('BTCUSDT', ['last' => 10]);

$data = $client->ohlcs()->getOhlcs('BTCUSDT', ['from' => 1638316800, 'to' => 1639526400]);

$data = $client->balance()->getBalances();

$data = $client->transaction()->getTransaction(['type' => 'buy', 'symbol' => 'btc', 'symbol' => 'usdt']);

$data = $client->transaction()->getFiatTransactions(['symbol' => 'try']);

$data = $client->transaction()->getCryptoTransactions(['symbol' => ['btc','etc']]);

$data = $client->orders()->getOpenOrders('BTCTRY');

$data = $client->orders()->getAllOrders(['pairSymbol' => 'BTCTRY', 'limit' => "1", 'page' => '10']);

$data = $client->orders()->getSingleOrder('61912740');