4

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.

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.