PHP Classes

BTCTurk PHP API: Get currency exchange rates with btcturk.com API

Recommend this page to a friend!

  Author Author  
Picture of Hicri
Name: Hicri <contact>
Classes: 12 packages by
Country: Turkey Turkey
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz  
This package can get currency exchange rates with btcturk.com API.

It can send HTTP requests to the bcturk.com API Web server to perform several types of operations with currency exchanges.

Currently, it can:

- Get the exchange rate between two currencies

- Get the orders for currency products

- Get the latest trades for a product

- Get the rate statistics of currencies during a period

- Get the details of FIAT and crypto transactions

Details

PHP API client for btcturk.com

tests Latest Stable Version License

image info

A simple API client, written with PHP for btcturk.com.

BtcTurk is a cryptocurrency exchange operating in Turkey. Offers crypto trading service. There are various crypto services available.

For additional information about API visit https://docs.btcturk.com/

BtcTurk API Terms of Service

Requirements

  • PHP >= 7.2
  • ext-json

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require slvler/btckturk-api

or add

"slvler/btckturk-api": "^1.0"

Basic usage

Example

use slvler\BtcTurkApi\BtcTurkClient;

$client = new BtcTurkClient();

Available methods

Exchange

exchange-info

You can use exchangeinfo endpoint for all tradable pairs and their quantity or price scales.

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

Tickers

Pair

Using the pairSymbol parameter, you can send a request for a single pair.

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

currency

currency parameter can be used for all symbol pairs.

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

OrderBook

orderbook

Get a list of all open orders for a product.

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

Trades

trades

Gets a list the latest trades for a product.

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

OHLC Data

OHLC

open, high, low, close, volume, total and average information can be viewed with OHLC enpoint.

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

Account Balance

Balance

For more information you can check our Authentication V1 article. All asset information can be viewed with the Account Balance endpoint.

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

Transactions

Transactions

For more information you can check our Authentication V1 article. 6 parameters can be used to access user transactions.

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

Fiat Transactions

For more information you can check our Authentication V1 article. 4 parameters can be used to access user fiat transactions.

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

Crypto Transactions

For more information you can check our Authentication V1 article. 4 parameters can be used to access user fiat transactions.

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

Orders

Open Orders

List your current open orders. Only open or un-settled orders are returned by default. As soon as an order is no longer open and settled, it will no longer appear in the default request.

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

All Orders

Retrieve all orders of any status.

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

Single Order

Get a single order by orderId. For all transactions related to the private endpoint, you must authorize before sending your request.

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

Testing

    composer test

Credits

License

The MIT License (MIT). Please see License File for more information.


  Classes of Hicri  >  BTCTurk PHP API  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: BTCTurk PHP API
Base name: btcturk-api
Description: Get currency exchange rates with btcturk.com API
Version: -
PHP version: 5
License: The PHP License
 
  Groups   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Web services Web data clipping, SOAP or XML-RPC clients and servers View top rated classes
Group folder image Finances Money, exchanging, taxes and stocks View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imagesrc (1 file, 4 directories)
Files folder imagetests (1 file)
Accessible without login Image file btcturk-logo.png Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (2 files)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file php.yml Data Auxiliary data
  Accessible without login Plain text file tests.yml Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageApi (10 files)
Files folder imageExceptions (1 file)
Files folder imageLog (1 file)
Files folder imageMessage (1 file)
  Plain text file BtcTurkClient.php Class Class source

  Files folder image Files  /  src  /  Api  
File Role Description
  Plain text file Api.php Class Class source
  Plain text file Balance.php Class Class source
  Plain text file Exchange.php Class Class source
  Plain text file Ohlcs.php Class Class source
  Plain text file OrderBook.php Class Class source
  Plain text file Orders.php Class Class source
  Plain text file Setting.php Class Class source
  Plain text file Ticker.php Class Class source
  Plain text file Trades.php Class Class source
  Plain text file Transaction.php Class Class source

  Files folder image Files  /  src  /  Exceptions  
File Role Description
  Plain text file TransformResponseException.php Class Class source

  Files folder image Files  /  src  /  Log  
File Role Description
  Plain text file Record.php Class Class source

  Files folder image Files  /  src  /  Message  
File Role Description
  Plain text file ResponseTransformer.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file BtcTurkClientTest.php Class Class source

Download Download all files: btcturk-api.tar.gz btcturk-api.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imagesrc (1 file, 4 directories)
Files folder imagetests (1 file)
Accessible without login Image file btcturk-logo.png Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (2 files)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file php.yml Data Auxiliary data
  Accessible without login Plain text file tests.yml Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageApi (10 files)
Files folder imageExceptions (1 file)
Files folder imageLog (1 file)
Files folder imageMessage (1 file)
  Plain text file BtcTurkClient.php Class Class source

  Files folder image Files  /  src  /  Api  
File Role Description
  Plain text file Api.php Class Class source
  Plain text file Balance.php Class Class source
  Plain text file Exchange.php Class Class source
  Plain text file Ohlcs.php Class Class source
  Plain text file OrderBook.php Class Class source
  Plain text file Orders.php Class Class source
  Plain text file Setting.php Class Class source
  Plain text file Ticker.php Class Class source
  Plain text file Trades.php Class Class source
  Plain text file Transaction.php Class Class source

  Files folder image Files  /  src  /  Exceptions  
File Role Description
  Plain text file TransformResponseException.php Class Class source

  Files folder image Files  /  src  /  Log  
File Role Description
  Plain text file Record.php Class Class source

  Files folder image Files  /  src  /  Message  
File Role Description
  Plain text file ResponseTransformer.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file BtcTurkClientTest.php Class Class source

Download Download all files: btcturk-api.tar.gz btcturk-api.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.