Skip to content

A PHP Service with interfaces for trading on various Bitcoin exchanges

License

Notifications You must be signed in to change notification settings

delboy1978uk/BTCExchange

Repository files navigation

BTCExchange

Build Status Code Coverage Scrutinizer Code Quality
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);

About

A PHP Service with interfaces for trading on various Bitcoin exchanges

Resources

License

Stars

Watchers

Forks

Packages

No packages published