I'm using Coinbase, but they don't have an API call to get the amount of Bitcoins per address, but only per account, which is a collection of addresses.
Does anyone have an API call for this? I'd prefer to not to reinvent the wheel by setting up my own Bitcoin server/daemon as suggested in this other SO thread:
How to check Bitcoin address balance from my application?
Hmm, would this work for you:
<?php
function getBalance($address) {
return file_get_contents('https://blockchain.info/q/addressbalance/'. $address);
}
echo 'Address Balance: ' . getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj');
Using the https://blockchain.info/q API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With