acellary / bittrex-api

PHP client for the Bittrex API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bittrex-api

Build Status Maintainability Test Coverage Scrutinizer Code Quality Code Coverage Code Intelligence Status

License Latest Stable Version

A simple PHP wrapper for Bittrex API. Bittrex is the next generation crypto trading platform.

Requirements

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require codenix-sv/bittrex-api:~0.2

or add

"codenix-sv/bittrex-api" : "~0.2"

to the require section of your application's composer.json file.

Basic usage

Example

use codenixsv\Bittrex\BittrexManager;

$manager = new BittrexManager('API_KEY', 'API_SECRET');
$client = $manager->createClient();

$responce = $client->getBalances();

Available methods

Public API

Get the open and available trading markets
$responce = $client->getMarkets();
Get all supported currencies
$responce = $client->getCurrencies();
Get the current tick values for a market
$responce = $client->getTicker('BTC-LTC');
Get the last 24 hour summary of all active exchanges
$responce = $client->getMarketSummaries();
Get the last 24 hour summary of all active exchanges for a market
$responce = $client->getMarketSummary('BTC-LTC');
Get the orderbook for a given market
$responce = $client->getOrderBook('BTC-LTC');
Get latest trades that have occurred for a specific market
$responce = $client->getMarketHistory('BTC-LTC');

Market API

Place a buy order in a specific market
$responce = $client->buyLimit('BTC-LTC', 1.2, 1.3);
Place a sell order in a specific market
$responce = $client->sellLimit('BTC-LTC', 1.2, 1.3);
Cancel a buy or sell order
$responce = $client->cancel('251c48e7-95d4-d53f-ad76-a7c6547b74ca9');
Get all orders that you currently have opened
$responce = $client->getOpenOrders('BTC-LTC');

Account API

Get all balances from your account
$responce = $client->getBalances();
Get balance from your account for a specific currency
$responce = $client->getBalance('BTC');
Get or generate an address for a specific currency
$responce = $client->getDepositAddress('BTC');
Withdraw funds from your account
$responce = $client->withdraw('BTC', 20.40, 'EAC_ADDRESS');
Get a single order by uuid
$responce = $client->getOrder('251c48e7-95d4-d53f-ad76-a7c6547b74ca9');
Get order history
$responce = $client->getOrderHistory('BTC-LTC');
Get withdrawal history
$responce = $client->getWithdrawalHistory('BTC');
Get deposit history
$responce = $client->getDepositHistory('BTC');

Further Information

Please, check the Bittrex site documentation for further information about API.

License

bittrex-api is released under the BSD 3-Clause License. See the bundled LICENSE for details.

About

PHP client for the Bittrex API

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:PHP 100.0%