delboy1978uk / btc-exchange
A PHP Service for connecting to various Bitcoin exchange API's
Installs: 68
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Language:HTML
Requires
- php: >=5.4.0
- delboy1978uk/binance: ^1.0
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- codeception/codeception: dev-master
README
a btcexchange PHP setup for writing a new Github project with Composer and Packagist complete with travis builds and scrutinizer code coverage & quality analysis
A PHP Service for connecting to various Bitcoin exchange API's
##Installation
composer require delboy1978uk/btcexchange
##Usage
use Del\BTCTradeApi; $settings = [ 'btce' => [ 'key' => 'blah', 'secret' => 'blah', ], 'kraken' => [ 'key' => 'blah', 'secret' => 'blah', ], //etc. BTC-e is the only API currently written, more coming soon ] $api = new BTCTradeApi($settings); $btce = $api->getBtcEExchange(); $result = $btce->buyOrder(3.2, 240.221); // Buy 3.2BTC at a price of $240.221 per Bitcoin
###API Methods
$btce->buyOrder($btc_amt, $price); $btce->cancelOrder($id); $btce->getInfo(); $btce->getOrders(); $btce->getTicker(); $btce->getTradeHistory(); $btce->getTransactionHistory(); $btce->sellOrder($btc_amt, $price);