A simple PHP wrapper for Bittrex API. Bittrex is the next generation crypto trading platform.
- PHP >= 7.2
- ext-json
- Bittrex account, API key and API secret
The preferred way to install this extension is through composer.
Either run
$ composer require codenix-sv/bittrex-api
or add
"codenix-sv/bittrex-api" : "^1.0"
to the require section of your application's composer.json
file.
use Codenixsv\BittrexApi\BittrexClient;
$client = new BittrexClient();
$client->setCredential('API_KEY', 'API_SECRET');
$data = $client->public()->getMarkets();
$data = $client->public()->getMarkets();
$data = $client->public()->getCurrencies();
$data = $client->public()->getTicker('BTC-LTC');
$data = $client->public()->getMarketSummaries();
$data = $client->public()->getMarketSummary('BTC-LTC');
$data = $client->public()->getOrderBook('BTC-LTC');
$data = $client->public()->getMarketHistory('BTC-LTC');
$data = $client->market()->buyLimit('BTC-LTC', 1.2, 1.3);
$data = $client->market()->sellLimit('BTC-LTC', 1.2, 1.3);
$data = $client->market()->cancel('251c48e7-95d4-d53f-ad76-a7c6547b74ca9');
$data = $client->market()->getOpenOrders('BTC-LTC');
$data = $client->account()->getBalances();
$data = $client->account()->getBalance('BTC');
$data = $client->account()->getDepositAddress('BTC');
$data = $client->account()->withdraw('BTC', 20.40, 'EAC_ADDRESS');
$data = $client->account()->getOrder('251c48e7-95d4-d53f-ad76-a7c6547b74ca9');
$data = $client->account()->getOrderHistory('BTC-LTC');
$data = $client->account()->getWithdrawalHistory('BTC');
$data = $client->account()->getDepositHistory('BTC');
Please, check the Bittrex site documentation for further information about API.
codenix-sv/bittrex-api
is released under the MIT License. See the bundled LICENSE for details.