Addresses

Get transactions relevant to an address.

GET /address/<address>.json

Response

Returns information for this address, and a list of all transactions relevant to it.

Field Description Example
address The given address "1Q2TWHE3GMdB6BZKafqwxXtWAWgFt5Jvm3"
hash160 Decoded hash160 of the address "fc916f213a3d7f1369313d5fa30f6168f9446a2d"
tx_in_sz Number of transactions that send money to this address 1
tx_out_sz Number of transactions that received money from this address 1
btc_in Total bitcoins received by this address 1000000000
btc_out Total bitcoins sent by this address 1000000000
balance Total bitcoins currently available to spend by this address 0
unspent List of unspent transaction outputs
tx the transaction containing the output
hash Hash of the transaction "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16"
n Index of this output in the transaction 1
value Value of the output "10.00000000"
scriptPubKey Pubkey Script defining the conditions under which this output can be spent
"04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_CHECKSIG"
tx_sz Total number of transactions 2
transactions Dictionary of transactions. see Tx API.

Error

When the address is invalid, the response will include an "error" message.

Example

curl http://namecoin.webbtc.com/address/1Q2TWHE3GMdB6BZKafqwxXtWAWgFt5Jvm3.json
{
  "address": "1Q2TWHE3GMdB6BZKafqwxXtWAWgFt5Jvm3",
  "hash160": "fc916f213a3d7f1369313d5fa30f6168f9446a2d",
  "tx_in_sz": 1,
  "tx_out_sz": 1,
  "btc_in": 1000000000,
  "btc_out": 1000000000,
  "balance": 0,
  "tx_sz": 2,
  "unspent": [
    {
      "tx": {
        "hash": "5b7aeedc2e82c9646408ce0588d9f98d2107062e9291af0e9e6fa372b0d7d1fb",
        "n": 0
      },
      "value": "0.01333700",
      "scriptPubKey": "OP_DUP OP_HASH160 fc916f213a3d7f1369313d5fa30f6168f9446a2d OP_EQUALVERIFY OP_CHECKSIG"
    },
    {
      "tx": {
        "hash": "fd6778a867cbc1bdc62054a43465641fd5efcbeb7b3088d964edc2b6313b1f9b",
        "n": 0,
      },
      "value": "0.02000000",
      "scriptPubKey": "OP_DUP OP_HASH160 fc916f213a3d7f1369313d5fa30f6168f9446a2d OP_EQUALVERIFY OP_CHECKSIG",
    }
    ],
  "transactions": {
    "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16": {
      "hash": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16",
      "ver": 1,
      "vin_sz": 1,
      "vout_sz": 2,
      "lock_time": 0,
      "size": 275,
      "in": [
        {
          "prev_out": {
            "hash": "0437cd7f8525ceed2324359c2d0ba26006d92d856a9c20fa0241106ee5a597c9",
            "n": 0
          },
          "scriptSig": "304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901"
        }
      ],
      "out": [
        {
          "value": "10.00000000",
          "scriptPubKey": "04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_CHECKSIG",
          "address":"1Q2TWHE3GMdB6BZKafqwxXtWAWgFt5Jvm3",
          "next_in":{
            "hash":"ea44e97271691990157559d0bdd9959e02790c34db6c006d779e82fa5aee708e",
            "n":0
          }
        },
        {
          "value": "40.00000000",
          "scriptPubKey": "0411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3 OP_CHECKSIG",
          "address":"12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S"
        }
      ],
      "block": "00000000d1145790a8694403d4063f323d499e655c83426834d4ce2f8dd4a2ee",
      "blocknumber": 170,
      "time": "2009-01-12 04:30:25"
    },
    "ea44e97271691990157559d0bdd9959e02790c34db6c006d779e82fa5aee708e": {
      "hash": "ea44e97271691990157559d0bdd9959e02790c34db6c006d779e82fa5aee708e",
      "ver": 1,
      "vin_sz": 1,
      "vout_sz": 1,
      "lock_time": 0,
      "size": 157,
      "in": [
        {
          "prev_out": {
            "hash": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16",
            "n": 0
          },
          "scriptSig": "30440220576497b7e6f9b553c0aba0d8929432550e092db9c130aae37b84b545e7f4a36c022066cb982ed80608372c139d7bb9af335423d5280350fe3e06bd510e695480914f01"
        }
      ],
      "out": [
        {
          "value": "10.00000000",
          "scriptPubKey": "OP_DUP OP_HASH160 340cfcffe029e6935f4e4e5839a2ff5f29c7a571 OP_EQUALVERIFY OP_CHECKSIG",
          "address": "15kDhRAcpgsugmh6mQsTcCHdvbsuYncEEV",
          "next_in":{
            "hash":"dd11322ddb4487a0a7a597838df02fbfd2070870721cd648f3b37f0a164efed9",
            "n":0
          }
        }
      ],
      "block": "0000000000077430a94a5376bf2af42d4b1aebdecedfa9e4f7e3f0465a84d891",
      "blocknumber": 92240,
      "time": "2010-11-16 21:39:27"
    }
  }
}