Wallogit.com
2017 © Pedro Peláez
Unofficial SDK for manipulation of cryptocurrency values in the blockfolio app
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)
composer require "jojothebandit/blockfolio-sdk":"dev-master"
or add to your project's composer.json, (*2)
"require": {
"jojothebandit/blockfolio-sdk": "~1.0"
}
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');
Contributions are more than welcome :)
, (*15)
I'll do my best to answer all issues, (*16)
MIT License, (*17)