Bitcoin Tutorials - Herong's Tutorial Examples - v1.04, by Dr. Herong Yang
blockexplorer.com API - Get Address Data
This section describes how to get Address data with blockexplorer.com API.
Bitcoin blockexplorer.com API offers two primary services to get Bitcoin address data:
Both services requires you to provide the address ID to identify the address. Address IDs are provided by your Bitcoin wallet, and other people's wallet.
You can try Bitcoin blockexplorer.com API to get Bitcoin address data with any Web browser. Here is what I did to get information of the address of my own wallet on the Bitcoin test network:
GET https://testnet.blockexplorer.com/api/addr /mp6mKbgWE25PyyX63zJ8SRibrKugHMkJDE { "addrStr": "mp6mKbgWE25PyyX63zJ8SRibrKugHMkJDE", "balance": 8.71492098, "balanceSat": 871492098, "totalReceived": 8.71492098, "totalReceivedSat": 871492098, "totalSent": 0, "totalSentSat": 0, "unconfirmedBalance": 0, "unconfirmedBalanceSat": 0, "unconfirmedTxApperances": 0, "txApperances": 2, "transactions": [ "da9406c4a2e1fe61f541c9298f276d6753bb3aaa7fa8ee1cc370ab41a292cd65", "e22d5998a43e3e1d81784e6e92988d1c4eae77cd0e439542337e48a786c75e69" ] } GET https://testnet.blockexplorer.com/api/addr /mp6mKbgWE25PyyX63zJ8SRibrKugHMkJDE/utxo [ { "address": "mp6mKbgWE25PyyX63zJ8SRibrKugHMkJDE", "txid": "da9406c4a2e1fe61f541c9298f276d6753bb3aaa7fa8ee1cc370ab41a292cd65", "vout": 1, "scriptPubKey": "76a9145e25fd265324c70a1a8bbbeb969614d39f6f664788ac", "amount": 1.67825345, "satoshis": 167825345, "height": 1282885, "confirmations": 625 }, { "address": "mp6mKbgWE25PyyX63zJ8SRibrKugHMkJDE", "txid": "e22d5998a43e3e1d81784e6e92988d1c4eae77cd0e439542337e48a786c75e69", "vout": 1, "scriptPubKey": "76a9145e25fd265324c70a1a8bbbeb969614d39f6f664788ac", "amount": 7.03666753, "satoshis": 703666753, "height": 1281295, "confirmations": 2215 } ]
The UTXO result shows that I have two funds available to spend. May be I will donate them back to where I got from.
Table of Contents
Bitcoin Transaction Data Structure
Introduction of blockexplorer.com API
blockexplorer.com API - Get Block Data
blockexplorer.com API - Get Transaction Data