JSON Blockchain API
Get balance of address
stable
Returns balance for a given address.
URL: https://dogechain.info/api/v1/address/balance/{address}
/api/v1/address/balance/AC8Q9Z4i4sXcbW7TV1jqrjG1JEWMdLyzcy
Response on success
{ "balance": "12667183.26088878", "confirmed": "12667183.26088878", "unconfirmed": "0.00000000", "success": 1 }
Response on failure
{ "error": "Invalid address", "success": 0 }
Get received amount of address
stable
Returns total amount of confirmed received coins of a given address.
URL: https://dogechain.info/api/v1/address/received/{address}
/api/v1/address/received/AC8Q9Z4i4sXcbW7TV1jqrjG1JEWMdLyzcy
Response on success
{ "received": "63390519.51807325", "success": 1 }
Response on failure
{ "error": "Invalid address", "success": 0 }
Get sent amount of address
stable
Returns total amount of confirmed sent coins of a given address.
URL: https://dogechain.info/api/v1/address/sent/{address}
/api/v1/address/sent/AC8Q9Z4i4sXcbW7TV1jqrjG1JEWMdLyzcy
Response on success
{ "sent": "50723336.25718447", "success": 1 }
Response on failure
{ "error": "Invalid address", "success": 0 }
Get unspent outputs of address
stable
Returns unspent outputs for a given address. 10 per page.
URL: https://dogechain.info/api/v1/address/unspent/{address}/{page}
/api/v1/address/unspent/AC8Q9Z4i4sXcbW7TV1jqrjG1JEWMdLyzcy/1
Response on success
{ "unspent_outputs": [ { "tx_hash": "7f621826557f31dd5069d93c0c57853d32a7e6edbbe7d037a51fabc121e4b89d", "tx_output_n": 0, "script": "a914d80146ea6e5f72f853511c9e17007421de1f4e8087", "address": "AC8Q9Z4i4sXcbW7TV1jqrjG1JEWMdLyzcy", "value": 1127142010101, "confirmations": 683505, "tx_hex": "020000000ea8e4..." }, ... ], "success": 1 }
Response on failure
{ "error":"Invalid address", "success":0 }
Get transactions for an address
stable
Returns transactions (most recent first) for a given address. 10 per page.
URL: https://dogechain.info/api/v1/address/transactions/{address}/{page}
Request
/api/v1/address/transactions/AC8Q9Z4i4sXcbW7TV1jqrjG1JEWMdLyzcy/1
Response on success
{ "transactions": [ { "hash": "8c493d6fc2bdeeb3eed52c441028792c599e10e217d98c56fb0da872934458f0", "value": "13.11000000", "time": 1669045644, "block": 4481956, "price": "0.08467205" }, ... ], "success": 1 }
Response on failure
{ "error":"Invalid address", "success":0 }
Get transaction count for an address
stable
Returns count of (confirmed and unconfirmed) sent and received transactions for a given address.
URL: https://dogechain.info/api/v1/address/transaction_count/{address}
Request
/api/v1/address/transaction_count/AC8Q9Z4i4sXcbW7TV1jqrjG1JEWMdLyzcy
Response on success
{ "transaction_count": { "sent": 53, "received": 374, "total": 375 }, "success": 1 }
Response on failure
{ "error":"Invalid address", "success":0 }
Push transaction to network
stable
Sends a signed transaction to the network.
URL: https://dogechain.info/api/v1/pushtx
Request
The API looks for a POST variable named 'tx'. This variable should contain the signed transaction in HEX format.
Response on success
{ "tx_hash": "0f6d9b9439e4a3c462fa8524a1ec81fc5f5258af4394e3f05e974241071c6f05" "success": 1 }
Response on failure
{ "error":"Unable to push transaction to the network", "success":0 }
Get block
stable
Retrieves a block by block hash or block height.
URL: https://dogechain.info/api/v1/block/{hash|height}
Request
/api/v1/block/1200
Response on success
{ "block": { "hash": "cd0c83abafbb4f9fee8054f28d40917caf40fbfc5751ae1812c81fcd01888e1b", "height": 1200, "previous_block_hash": "2a2504f2cdbf5ee15f1f67a0036a0f139cf37a783048dada3fc7e20175c3bb9c", "next_block_hash": "a155292d60a31cede31bf9e88d27deac692c8b338a8322997ac1b07ea03637ce", "is_orphan": false, "difficulty": "0.4071559040246524", "time": 1386489123, "confirmations": 4487919, "merkleroot": "e0a8a0fd4ad7a372861825303cebe007d31db1f1da1765c1df3e4467cf4b6d2f", "num_txs": 1, "value_in": "0", "value_out": "25920500000000", "version": 1, "nonce": 1784546048, "bits": "1d0274be", "txs": [ "e0a8a0fd4ad7a372861825303cebe007d31db1f1da1765c1df3e4467cf4b6d2f" ], "size": 191, "weight": 764, "fees": "0", "price": "0.00000001" }, "success": 1 }
Response on failure
{ "success": 0, "error": "Invalid block height or hash specified." }
Get best block hash
stable
Retrieves the most recent block's hash.
URL: https://dogechain.info/api/v1/block/besthash
Request
/api/v1/block/besthash
Response on success
{ "hash": "0b1c95f13c507abfade9196346a04ded964f01bab5ec3018ff1b06d804402140", "success": 1 }
Response on failure
{ "success": 0, "error": "Internal error occurred." }
Get transaction
stable
Returns transaction by transaction hash.
URL: https://dogechain.info/api/v1/transaction/{transaction_hash}
Request
/api/v1/transaction/bcc4ce3f004b02b50456976dfc4de69d651ba718ce95422f51cd1d4bf7235abb
Response on success
{ "success": 1, "transaction": { "hash": "bcc4ce3f004b02b50456976dfc4de69d651ba718ce95422f51cd1d4bf7235abb", "confirmations": 4486846, "size": 225, "vsize": 225, "weight": null, "version": 1, "locktime": 0, "block_hash": "fafdca9b3f2011d7d8d6db2dd5b7930f0fa652076a30dba2e6ff491db17bd403", "time": 1386537435, "inputs_n": 1, "inputs_value": "486418.66069161", "inputs": [ { "pos": 0, "value": "486418.66069161", "address": "DS96mv8RfX9whxeT7gS7kc1uBp1BBTUKwM", "scriptSig": { "hex": "473044022061449822325883cfce07b499e97803d09383b991a5fff6f0f09382b1f6167174022045d62bf3c3e07045abacf6756a918962f9cb56673a1e973227cb1de3f92a69400121038177629a1a642dfdd419df0d7130836105fdd3a908d9ada870337dbf64f1ef2f" }, "previous_output": { "hash": "27a7986112aa3ab4212f97a022b28278e17d05df341af2d36d6037160126c44c", "pos": 0 } } ], "outputs_n": 2, "outputs_value": "486417.66069161", "outputs": [ { "pos": 0, "value": "481022.94499261", "type": "pubkeyhash", "address": "DCVYsve2EMmK1S8G4tfAFQ156jWrNydpnH", "script": { "hex": "76a91450a72fbd97332f109a1503727360b90fe8ee825388ac", "asm": "OP_DUP OP_HASH160 50a72fbd97332f109a1503727360b90fe8ee8253 OP_EQUALVERIFY OP_CHECKSIG" }, "spent": { "hash": "d603190bcb4780b8222a4454eb960a69e76b7f0b56b0f8531ec94427940e5953", "pos": 0 } }, { "pos": 1, "value": "5394.71569900", "type": "pubkeyhash", "address": "DTnt7VZqR5ofHhAxZuDy4m3PhSjKFXpw3e", "script": { "hex": "76a914f8783344af8532a73dfa97ebddfcc7527a2c6e5a88ac", "asm": "OP_DUP OP_HASH160 f8783344af8532a73dfa97ebddfcc7527a2c6e5a OP_EQUALVERIFY OP_CHECKSIG" }, "spent": { "hash": "65ffff51fbf7385d9e0b498f6f2dfaad4d418f74287454ee8e40599fab903128", "pos": 102 } } ], "fee": "1.00000000", "price": "0.00000001" } }
Response on failure
{ "success": 0, "error": "Transaction not found." }