delboy1978uk / btc-exchange
A PHP Service for connecting to various Bitcoin exchange API's
Package info
github.com/delboy1978uk/BTCExchange
Language:HTML
pkg:composer/delboy1978uk/btc-exchange
v0.1.1
2020-10-22 23:30 UTC
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);