Skip to content
php client sdk for bbs.money
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
class
README.md
sample.php

README.md

BBS.money API Client PHP

Usage

// fill your appId and appKey
// no ssl check is false
$client = new BBSMoneyClient($appId, $appKey, false);

Supported APIs

Wallet

Getting balance

$client->getBalance()

Response example:

array(2) {
  ["success"]=>
  bool(true)
  ["data"]=>
  array(4) {
    ["address"]=>
    string(97) "address"
    ["available"]=>
    string(15) "1111.999998"
    ["locked"]=>
    string(1) "0"
    ["total"]=>
    string(15) "1111.999998"
  }
}

Getting transactions

// offset is default to 0
// limit is default to 10
$client->getTransactions(offset, limit)

Response example:

array(2) {
  ["success"]=>
  bool(true)
  ["data"]=>
  array(2) {
    ["address"]=>
    string(97) "address"
    ["transactions"]=>
    array(10) {
      [0]=>
      array(10) {
        ["hash"]=>
        string(64) "hash"
        ["height"]=>
        int(90643)
        ["timestamp"]=>
        int(1527169740000)
        ["in"]=>
        string(4) "4008"
        ["out"]=>
        string(4) "5009"
        ["fee"]=>
        string(1) "1"
        ["fusion"]=>
        bool(false)
        ["amount"]=>
        string(5) "-1001"
        ["unlockTime"]=>
        int(0)
        ["status"]=>
        string(6) "normal"
      }
    }
  }
}

Getting transaction details

$client->getTransactionDetails(hash)

Response example:

array(2) {
  ["success"]=>
  bool(true)
  ["data"]=>
  array(11) {
    ["hash"]=>
    string(64) "hash"
    ["amount"]=>
    string(6) "-10001"
    ["coinbase"]=>
    bool(false)
    ["fee"]=>
    string(1) "1"
    ["height"]=>
    int(89883)
    ["confirmations"]=>
    int(2627)
    ["status"]=>
    string(6) "normal"
    ["timestamp"]=>
    int(1527078105000)
    ["unlockTime"]=>
    int(0)
    ["paymentId"]=>
    string(64) "paymentId"
    ["destinations"]=>
    array(0) {
    }
  }
}

Send

$client->sendTransaction(address, amount, fee, mixin, paymentId)

Response example:

array(2) {
  ["success"]=>
  bool(true)
  ["data"]=>
  array(2) {
    ["address"]=>
    string(97) "address"
    ["hash"]=>
    string(64) "hash"
  }
}
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.