2017 © Pedro Peláez
 

library blockfolio-sdk

Unofficial SDK for manipulation of cryptocurrency values in the blockfolio app

image

jojothebandit/blockfolio-sdk

Unofficial SDK for manipulation of cryptocurrency values in the blockfolio app

  • Sunday, August 27, 2017
  • by jojothebandit
  • Repository
  • 1 Watchers
  • 4 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Blockfolio unofficial PHP SDK


A php wrapper around some Blockfolio requests
Now you can edit your crypto values in the app through this little SDK
DISCLAIMER: Since this is totally unofficial it can stop working at any time
I will try to keep up and fix stuff if it breaks, but I am not promising anything
, (*1)

How to install (Composer)

composer require "jojothebandit/blockfolio-sdk":"dev-master"

or add to your project's composer.json, (*2)

"require": {
    "jojothebandit/blockfolio-sdk": "~1.0"
}

How to use

Find your client id in the settings part of Blockfolio
Instantiate the SDK with a client id, (*3)

    use jojothebandit\BlockfolioSDK\BlockfolioSDK;

    $blockfolio = new BlockfolioSDK();
    $blockfolio->setClientId('YOUR_CLIENT_ID');


, (*4)

Get your whole portfolio in JSON, (*5)

    $blockfolio->getPortfolio()


Get value of your portfolio(default currency is USD), (*6)

    $blockfolio->getPortfolioValue('USD')


Get quantity of coins of a specific crypto, (*7)

    $blockfolio->getQuantity('ETH')


Add a "sell" transaction, (*8)

    $blockfolio->sell(0.12, 'BTC');


Add a "buy" transaction, (*9)

    $blockfolio->buy(0.67, 'ETH');


Add a sell transaction, with the amount being the amount you have currently in the app for a specific crypto, (*10)

    $blockfolio->sellAll('ETH');


Make a trade, does two transactions, removes x of the first crypto, and adds y of the second, (*11)

    $blockfolio->trade(5, 'LTC', 3, 'BTC'));


Find the exchange rate between two cryptos, mostly goes one way, BTC being the source crypto, (*12)

    $blockfolio->getExchangeRate('BTC', 'ETH');


You can set the exchange with, (*13)

    $blockfolio->setExchangeName('poloniex');


You can internally set the source and destination crypto, (*14)

    $blockfolio->setSourceCrypto('BTC');
    $blockfolio->setDestinationCrypto('BCC');

Contribute

Contributions are more than welcome :)
, (*15)

Questions, problems?

I'll do my best to answer all issues, (*16)

License

MIT License, (*17)

The Versions

27/08 2017

dev-master

9999999-dev

Unofficial SDK for manipulation of cryptocurrency values in the blockfolio app

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tony Mrakovcic

bitcoin btc blockfolio