1. Go to this page and download the library: Download delboy1978uk/btc-exchange library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
delboy1978uk / btc-exchange example snippets
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