delboy1978uk/btc-exchange

A PHP Service for connecting to various Bitcoin exchange API's

v0.1.1 2020-10-22 23:30 UTC

This package is auto-updated.

Last update: 2024-04-23 06:36:20 UTC


README

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);