11# bittrex-api
2- [ ![ Build Status] ( https://travis-ci.org/codenix-sv/bittrex-api.svg?branch=master )] ( https://travis-ci.org/codenix-sv/bittrex-api )
3- [ ![ Maintainability] ( https://api.codeclimate.com/v1/badges/49b696439195269120b4/maintainability )] ( https://codeclimate.com/github/codenix-sv/bittrex-api/maintainability )
4- [ ![ Test Coverage] ( https://api.codeclimate.com/v1/badges/49b696439195269120b4/test_coverage )] ( https://codeclimate.com/github/codenix-sv/bittrex-api/test_coverage )
2+ [ ![ Build Status] ( https://travis-ci.com/codenix-sv/bittrex-api.svg?branch=master )] ( https://travis-ci.com/codenix-sv/bittrex-api )
53[ ![ Scrutinizer Code Quality] ( https://scrutinizer-ci.com/g/codenix-sv/bittrex-api/badges/quality-score.png?b=master )] ( https://scrutinizer-ci.com/g/codenix-sv/bittrex-api/?branch=master )
6- [ ![ Code Coverage] ( https://scrutinizer-ci.com/g/codenix-sv/bittrex-api/badges/coverage.png?b=master )] ( https://scrutinizer-ci.com/g/codenix-sv/bittrex-api/?branch=master )
7- [ ![ Code Intelligence Status] ( https://scrutinizer-ci.com/g/codenix-sv/bittrex-api/badges/code-intelligence.svg?b=master )] ( https://scrutinizer-ci.com/code-intelligence )
8-
9- [ ![ License] ( https://poser.pugx.org/codenix-sv/bittrex-api/license )] ( https://packagist.org/packages/codenix-sv/bittrex-api )
10- [ ![ Latest Stable Version] ( https://poser.pugx.org/codenix-sv/bittrex-api/v/stable )] ( https://packagist.org/packages/codenix-sv/bittrex-api )
4+ [ ![ Test Coverage] ( https://api.codeclimate.com/v1/badges/49b696439195269120b4/test_coverage )] ( https://codeclimate.com/github/codenix-sv/bittrex-api/test_coverage )
5+ [ ![ Maintainability] ( https://api.codeclimate.com/v1/badges/49b696439195269120b4/maintainability )] ( https://codeclimate.com/github/codenix-sv/bittrex-api/maintainability )
6+ [ ![ License: MIT] ( https://img.shields.io/github/license/codenix-sv/bittrex-api )] ( https://github.com/codenix-sv/bittrex-api/blob/master/LICENSE )
7+ ![ Packagist] ( https://img.shields.io/packagist/dt/codenix-sv/bittrex-api )
118
12- A simple PHP wrapper for [ Bittrex API] ( https://bittrex.com/Home/Api ) . Bittrex is the next generation crypto trading platform.
9+ A simple PHP wrapper for [ Bittrex API] ( https://bittrex.github.io/api/v1-1 ) . Bittrex is the next generation crypto trading platform.
1310
1411## Requirements
1512
16- - PHP >= 7.1
17- - [ Bittrex account] ( https://bittrex.com ) , API key and API secret
13+ * PHP >= 7.2
14+ * ext-json
15+ * [ Bittrex account] ( https://global.bittrex.com/ ) , API key and API secret
1816
1917## Installation
2018
@@ -23,12 +21,12 @@ The preferred way to install this extension is through [composer](http://getcomp
2321Either run
2422
2523``` bash
26- $ composer require codenix-sv/bittrex-api: ~ 0.2
24+ $ composer require codenix-sv/bittrex-api
2725```
2826or add
2927
3028``` json
31- "codenix-sv/bittrex-api" : " ~0.2 "
29+ "codenix-sv/bittrex-api" : " ^1.0 "
3230```
3331
3432to the require section of your application's ` composer.json ` file.
@@ -37,104 +35,119 @@ to the require section of your application's `composer.json` file.
3735
3836### Example
3937``` php
40- use codenixsv\Bittrex\BittrexManager ;
38+ use Codenixsv\BittrexApi\BittrexClient ;
4139
42- $manager = new BittrexManager('API_KEY', 'API_SECRET' );
43- $client = $manager->createClient( );
40+ $client = new BittrexClient( );
41+ $client->setCredential('API_KEY', 'API_SECRET' );
4442
45- $responce = $client->getBalances ();
43+ $data = $client->public()->getMarkets ();
4644```
47- ### Available methods
45+ ## Available methods
4846
49- #### Public API
47+ ### Public API
5048
51- ##### Get the open and available trading markets
49+ #### Get the open and available trading markets
5250``` php
53- $responce = $client->getMarkets();
51+ $data = $client->public() ->getMarkets();
5452```
55- ##### Get all supported currencies
53+
54+ #### Get all supported currencies
5655``` php
57- $responce = $client->getCurrencies();
56+ $data = $client->public() ->getCurrencies();
5857```
59- ##### Get the current tick values for a market
58+
59+ #### Get the current tick values for a market
6060``` php
61- $responce = $client->getTicker('BTC-LTC');
61+ $data = $client->public() ->getTicker('BTC-LTC');
6262```
63- ##### Get the last 24 hour summary of all active exchanges
63+ #### Get the last 24 hour summary of all active exchanges
6464``` php
65- $responce = $client->getMarketSummaries();
65+ $data = $client->public() ->getMarketSummaries();
6666```
67- ##### Get the last 24 hour summary of all active exchanges for a market
67+
68+ #### Get the last 24 hour summary of all active exchanges for a market
6869``` php
69- $responce = $client->getMarketSummary('BTC-LTC');
70+ $data = $client->public() ->getMarketSummary('BTC-LTC');
7071```
71- ##### Get the orderbook for a given market
72+
73+ #### Get the orderbook for a given market
7274``` php
73- $responce = $client->getOrderBook('BTC-LTC');
75+ $data = $client->public() ->getOrderBook('BTC-LTC');
7476```
75- ##### Get latest trades that have occurred for a specific market
77+
78+ #### Get latest trades that have occurred for a specific market
7679``` php
77- $responce = $client->getMarketHistory('BTC-LTC');
80+ $data = $client->public() ->getMarketHistory('BTC-LTC');
7881```
7982
80- #### Market API
83+ ### Market API
8184
82- ##### Place a buy order in a specific market
85+ #### Place a buy order in a specific market
8386``` php
84- $responce = $client->buyLimit('BTC-LTC', 1.2, 1.3);
87+ $data = $client->market() ->buyLimit('BTC-LTC', 1.2, 1.3);
8588```
86- ##### Place a sell order in a specific market
89+
90+ #### Place a sell order in a specific market
8791``` php
88- $responce = $client->sellLimit('BTC-LTC', 1.2, 1.3);
92+ $data = $client->market() ->sellLimit('BTC-LTC', 1.2, 1.3);
8993```
90- ##### Cancel a buy or sell order
94+
95+ #### Cancel a buy or sell order
9196``` php
92- $responce = $client->cancel('251c48e7-95d4-d53f-ad76-a7c6547b74ca9');
97+ $data = $client->market() ->cancel('251c48e7-95d4-d53f-ad76-a7c6547b74ca9');
9398```
94- ##### Get all orders that you currently have opened
99+
100+ #### Get all orders that you currently have opened
95101``` php
96- $responce = $client->getOpenOrders('BTC-LTC');
102+ $data = $client->market() ->getOpenOrders('BTC-LTC');
97103```
98104
99- #### Account API
105+ ### Account API
100106
101- ##### Get all balances from your account
107+ #### Get all balances from your account
102108``` php
103- $responce = $client->getBalances();
109+ $data = $client->account() ->getBalances();
104110```
105- ##### Get balance from your account for a specific currency
111+
112+ #### Get balance from your account for a specific currency
106113``` php
107- $responce = $client->getBalance('BTC');
114+ $data = $client->account() ->getBalance('BTC');
108115```
109- ##### Get or generate an address for a specific currency
116+
117+ #### Get or generate an address for a specific currency
110118``` php
111- $responce = $client->getDepositAddress('BTC');
119+ $data = $client->account() ->getDepositAddress('BTC');
112120```
113- ##### Withdraw funds from your account
121+
122+ #### Withdraw funds from your account
114123``` php
115- $responce = $client->withdraw('BTC', 20.40, 'EAC_ADDRESS');
124+ $data = $client->account() ->withdraw('BTC', 20.40, 'EAC_ADDRESS');
116125```
117- ##### Get a single order by uuid
126+
127+ #### Get a single order by uuid
118128``` php
119- $responce = $client->getOrder('251c48e7-95d4-d53f-ad76-a7c6547b74ca9');
129+ $data = $client->account() ->getOrder('251c48e7-95d4-d53f-ad76-a7c6547b74ca9');
120130```
121- ##### Get order history
131+
132+ #### Get order history
122133``` php
123- $responce = $client->getOrderHistory('BTC-LTC');
134+ $data = $client->account() ->getOrderHistory('BTC-LTC');
124135```
125- ##### Get withdrawal history
136+
137+ #### Get withdrawal history
126138``` php
127- $responce = $client->getWithdrawalHistory('BTC');
139+ $data = $client->account() ->getWithdrawalHistory('BTC');
128140```
129- ##### Get deposit history
141+
142+ #### Get deposit history
130143``` php
131- $responce = $client->getDepositHistory('BTC');
144+ $data = $client->account() ->getDepositHistory('BTC');
132145```
133146
134147## Further Information
135- Please, check the [ Bittrex site] ( https://bittrex.com/Home/Api ) documentation for further
148+ Please, check the [ Bittrex site] ( https://bittrex.github.io/api/v1-1 ) documentation for further
136149information about API.
137150
138151## License
139152
140- ** bittrex-api** is released under the BSD 3-Clause License. See the bundled [ LICENSE] ( ./LICENSE ) for details.
153+ ` codenix-sv/ bittrex-api` is released under the MIT License. See the bundled [ LICENSE] ( ./LICENSE ) for details.
0 commit comments