Can I use Blockchain API to get number of transactions at BTC address?

4

0

When I go to blockchain to look at a BTC address I can see a count of the number of transactions that have been sent to that address.

So can I use the blockchain API to get this information?

I have taken a look at the blockchain API documentation and cannot see anything about it there.

It also looks like there is no support email at blockchain I could reach out to with a query like this.

JBwell

Posted 2014-09-11T22:14:33.223

Reputation: 43

Answers

4

You sure can!

Send a GET request to this address:

http://blockchain.info/address/$bitcoin_address?format=json

You'll get back something like this:

{
    "hash160":"660d4ef3a743e3e696ad990364e555c271ad504b",
    "address":"1AJbsFZ64EpEfS5UAjAfcUG8pH8Jn3rn1F",
    "n_tx":17,
    "n_unredeemed":2,
    "total_received":1031350000,
    "total_sent":931250000,
    "final_balance":100100000,
    "txs":[--Array of Transactions--]
}

The n_tx field will tell you how many transactions deposit or withdraw from that address.

Source.

Nick ODell

Posted 2014-09-11T22:14:33.223

Reputation: 26 536