A fully-featured API to make use of Blockchain.info API.
Just add the package to your composer.json
"maurocasas/blockchain": "*"
And then run in your Laravel root directory
composer update
Open up app/config/app.php and under $providers array() register the package provider
'MauroCasas\Blockchain\BlockchainServiceProvider'
This will also register the facade for you to use, for example
Blockchain::getdifficulty()
If you're going to create wallets, and send funds using this package, you need to register an API key from Blockchain.info or you'll get rejected.
You can request an API Key at Blockchain.info (Usually takes a day or two)
Create Wallets API Documentation
To create wallets you'll need an API key, yes or yes.
Blockchain::createWallet('MAIN PASSWORD', 'PRIVATE KEY', 'LABEL', 'EMAIL ADDRESS')
Only Main Password is mandatory, you can ommit the rest if you want.
You can use any function in the documentation with the exact same name, so for example I could do
Blockchain::probability()
If you want to use any function which requires a parameter, just send it in the function, for example:
Blockchain::getsentbyaddress('PUBLIC KEY')
Charts & Statistics API Documentation
Blockchain::chart('total-bitcoins')
You can look at all the available charts over here The URL slug for the chart is needed here.
Just use the total-bitcoins part. All charts are available.
Returns all Blockchain statistics
Blockchain::stats()
Exchange Rates API Documentation
Blockchain::ticker()
Blockchain::toBTC(500, 'JPY')
Currencies allowed
- USD (by default)
- ISK
- HKD
- TWD
- CHF
- EUR
- DKK
- CLP
- CAD
- CNY
- THB
- AUD
- SGD
- KRW
- JPY
- PLN
- GBP
- SEK
- NZD
- BRL
- RUB