How to get amount of bitcoins in php?

0 votes

I'm using Coinbase, but they don't have an API call to get the amount of Bitcoins per address. So how can I get this information using PHP?

Aug 24, 2018 in Blockchain by digger
• 26,600 points
59 views

1 answer to this question.

0 votes

I’ve tried this code and it works:

<?php

function getBalance($address) {

    return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address);

}

echo 'Address Balance: ' . getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj');

Using the https://blockchain.info/de/q API.

answered Aug 24, 2018 by slayer
• 29,240 points

Related Questions In Blockchain

0 votes
1 answer

How to get property of non object in Coinbase API

First, your sendMoney() call is stored into ...READ MORE

answered Aug 31, 2018 in Blockchain by digger
• 26,600 points
58 views
0 votes
1 answer

How to get the number of tokens in the Bitcoin network?

This information can easily be calculated by ...READ MORE

answered Aug 31, 2018 in Blockchain by Christine
• 15,810 points
41 views
–1 vote
1 answer
+1 vote
3 answers

Removing double quotes from a string from JSON response in PHP

Just remove the json_encode call, and it should work: $resp ...READ MORE

answered Sep 12, 2018 in Blockchain by digger
• 26,600 points
5,188 views
0 votes
1 answer

403 forbidden error coinbase api

I had a similiar issue connecting this API, ...READ MORE

answered Aug 28, 2018 in Blockchain by digger
• 26,600 points
482 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,810 points
186 views
0 votes
1 answer

How to write a program to get details of ERC tokens?

You can use Javascript with the Metamask ...READ MORE

answered Jul 13, 2018 in Blockchain by slayer
• 29,240 points
59 views
0 votes
1 answer

How to track changes of an object in exonum?

You have to describe each component in ...READ MORE

answered Jul 23, 2018 in Blockchain by slayer
• 29,240 points
63 views