Skip to content

codenix-sv/bittrex-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bittrex-api

Build Status Scrutinizer Code Quality Test Coverage Maintainability License: MIT Packagist

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

or add

"codenix-sv/bittrex-api" : "^1.0"

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

Basic usage

Example

use Codenixsv\BittrexApi\BittrexClient;

$client = new BittrexClient();
$client->setCredential('API_KEY', 'API_SECRET');

$data = $client->public()->getMarkets();

Available methods

Public API

Get the open and available trading markets

$data = $client->public()->getMarkets();

Get all supported currencies

$data = $client->public()->getCurrencies();

Get the current tick values for a market

$data = $client->public()->getTicker('BTC-LTC');

Get the last 24 hour summary of all active exchanges

$data = $client->public()->getMarketSummaries();

Get the last 24 hour summary of all active exchanges for a market

$data = $client->public()->getMarketSummary('BTC-LTC');

Get the orderbook for a given market

$data = $client->public()->getOrderBook('BTC-LTC');

Get latest trades that have occurred for a specific market

$data = $client->public()->getMarketHistory('BTC-LTC');

Market API

Place a buy order in a specific market

$data = $client->market()->buyLimit('BTC-LTC', 1.2, 1.3);

Place a sell order in a specific market

$data = $client->market()->sellLimit('BTC-LTC', 1.2, 1.3);

Cancel a buy or sell order

$data = $client->market()->cancel('251c48e7-95d4-d53f-ad76-a7c6547b74ca9');

Get all orders that you currently have opened

$data = $client->market()->getOpenOrders('BTC-LTC');

Account API

Get all balances from your account

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

Get balance from your account for a specific currency

$data = $client->account()->getBalance('BTC');

Get or generate an address for a specific currency

$data = $client->account()->getDepositAddress('BTC');

Withdraw funds from your account

$data = $client->account()->withdraw('BTC', 20.40, 'EAC_ADDRESS');

Get a single order by uuid

$data = $client->account()->getOrder('251c48e7-95d4-d53f-ad76-a7c6547b74ca9');

Get order history

$data = $client->account()->getOrderHistory('BTC-LTC');

Get withdrawal history

$data = $client->account()->getWithdrawalHistory('BTC');

Get deposit history

$data = $client->account()->getDepositHistory('BTC');

Further Information

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

License

codenix-sv/bittrex-api is released under the MIT License. See the bundled LICENSE for details.

About

PHP client for the Bittrex API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages