2017 © Pedro Peláez
 

library coinpayments-api

A PHP implementation for the CoinPayments API

image

bert-w/coinpayments-api

A PHP implementation for the CoinPayments API

  • Saturday, March 10, 2018
  • by bert-w
  • Repository
  • 1 Watchers
  • 0 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 118 % Grown

The README.md

bert-w/coinpayments-api

Latest Stable Version Total Downloads License, (*1)

A PHP implementation of the CoinPayments API., (*2)

Installation instructions

composer require bert-w/coinpayments-api, (*3)

Quick start

See CoinPayments API Doc for the CoinPayments API documentation., (*4)

Code Samples
Retrieving basic merchant info
$publicKey = 'your_public_api_key';
$privateKey = 'your_private_api_key';

$client = new BertW\CoinPaymentsApi\Client($publicKey, $privateKey);

$response = $client->getBasicInfo();

print_r($response);
// Array
// (
//     [error] => ok
//     [result] => Array
//         (
//             [username] => MerchantUsername
//             [merchant_id] => abcd32abcd32abcd32abcd32abcd32ab
//             [email] => merchantemail@example.com
//             [public_name] => 
//             [time_joined] => 1518095700
//         )
// 
// )

Quick API Reference

Creating a transaction is easy:, (*5)

$client->createTransaction([
    'amount' => 0.452811,
    'currency1' => 'USD',
    'currency2' => 'BTC',
    // optional parameters here...

API requests with more than 4 parameters use an associative array syntax like above (all functions with array $options). Simple API calls like getDepositAddress, can simply be called using $client->getDepositAddress($currency)., (*6)

Function List

public function getBasicInfo();
public function rates($short = null, $accepted = null);
public function balances($all = 0);
public function getDepositAddress($currency);
public function createTransaction(array $options);
public function getCallbackAddress($currency, $ipn_url = null);
public function getTxInfoMulti($txid);
public function getTxInfo($txid, $full = null);
public function getTxIds($limit = null, $start = null, $newer = null, $all = null);
public function createTransfer(array $options);
public function createWithdrawal(array $options);
public function createMassWithdrawal(array $options);
public function convert(array $options);
public function getWithdrawalHistory($limit = null, $start = null, $newer = null);
public function getWithdrawalInfo($id);
public function getConversionInfo($id);
public function getPbnInfo($pbntag);
public function getPbnList();
public function updatePbnTag(array $options);
public function claimPbnTag($tagid, $name);

The Versions

10/03 2018

dev-master

9999999-dev

A PHP implementation for the CoinPayments API

  Sources   Download

MIT

The Requires

 

10/03 2018

v0.3.1

0.3.1.0

A PHP implementation for the CoinPayments API

  Sources   Download

MIT

The Requires

 

10/03 2018

dev-develop

dev-develop

A PHP implementation for the CoinPayments API

  Sources   Download

MIT

The Requires

 

10/03 2018

v0.3

0.3.0.0

A PHP implementation for the CoinPayments API

  Sources   Download

MIT

The Requires

 

07/03 2018

v0.2

0.2.0.0

A PHP implementation for the CoinPayments API

  Sources   Download

MIT

The Requires