JSON Blockchain API

Get balance of address

stable

Returns balance for a given address.

URL: https://dogechain.info/api/v1/address/balance/{address}

Response on success

{
    "balance":"625028.115",
    "success":1
}

Response on failure

{
    "error":"Invalid address",
    "success":0
}

Get received amount of address

stable

Returns total amount of received coins of a given address.

URL: https://dogechain.info/api/v1/address/received/{address}

Response on success

{
    "received":"25018.318",
    "success":1
}

Response on failure

{
    "error":"Invalid address",
    "success":0
}

Get sent amount of address

stable

Returns total amount of sent coins of a given address.

URL: https://dogechain.info/api/v1/address/sent/{address}

Response on success

{
    "sent":"25018.318",
    "success":1
}

Response on failure

{
    "error":"Invalid address",
    "success":0
}

Get unspent outputs of address

stable

Returns unspent outputs for a given address.

URL: https://dogechain.info/api/v1/unspent/{address}

Response on success

{
    "unspent_outputs":[
        {
            "tx_hash":"0f6d9b9439e4a3c462fa8524a1ec81fc5f5258af4394e3f05e974241071c6f05",
            "tx_output_n": 0,
            "script":"76a914f5943c580599d53f6d6baed3b865f0cebc6dc3c188ac",
            "value":"25003601000000",
            "confirmations":743
        }
    ],
    "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

{
    "success": 1,
    "block": {
        "hash": "cd0c83abafbb4f9fee8054f28d40917caf40fbfc5751ae1812c81fcd01888e1b",
        "height": 1200,
        "previous_block_hash": "2a2504f2cdbf5ee15f1f67a0036a0f139cf37a783048dada3fc7e20175c3bb9c",
        "next_block_hash": "a155292d60a31cede31bf9e88d27deac692c8b338a8322997ac1b07ea03637ce",
        "is_orphan": false,
        "difficulty": 0.407,
        "time": 1386489123,
        "confirmations": 252855,
        "merkleroot": "e0a8a0fd4ad7a372861825303cebe007d31db1f1da1765c1df3e4467cf4b6d2f",
        "num_txs": 1,
        "value_in": "0",
        "value_out": "259205",
        "version": 1,
        "average_coin_age": 0.12974,
        "nonce": 1784546048,
        "txs": [
            "e0a8a0fd4ad7a372861825303cebe007d31db1f1da1765c1df3e4467cf4b6d2f"
        ]
    }
}

Response on failure

{
    "success": 0,
    "error": "Invalid block height or hash specified."
}

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": 270095,
        "size": 225,
        "version": 1,
        "locktime": 0,
        "block_hash": "fafdca9b3f2011d7d8d6db2dd5b7930f0fa652076a30dba2e6ff491db17bd403",
        "time": 1386537435,
        "inputs_n": 1,
        "inputs": [
            {
                "pos": 0,
                "value": "486418.66069161",
                "type": "pubkeyhash",
                "address": "DS96mv8RfX9whxeT7gS7kc1uBp1BBTUKwM",
                "scriptSig": {
                    "hex": "473044022061449822325883cfce07b499e97803d09383b991a5fff6f0f09382b1f6167174022045d62bf3c3e07045abacf6756a918962f9cb56673a1e973227cb1de3f92a69400121038177629a1a642dfdd419df0d7130836105fdd3a908d9ada870337dbf64f1ef2f"
                },
                "previous_output": {
                    "hash": "27a7986112aa3ab4212f97a022b28278e17d05df341af2d36d6037160126c44c",
                    "pos": 0
                }
            }
        ],
        "inputs_value": "486418.66069161",
        "outputs_n": 2,
        "outputs": [
            {
                "pos": 0,
                "value": "481022.94499261",
                "type": "pubkeyhash",
                "address": "DCVYsve2EMmK1S8G4tfAFQ156jWrNydpnH"
            },
            {
                "pos": 1,
                "value": "5394.715699",
                "type": "pubkeyhash",
                "address": "DTnt7VZqR5ofHhAxZuDy4m3PhSjKFXpw3e"
            }
        ],
        "outputs_value": "486417.66069161",
        "fee": "1"
    }
}

Response on failure

{
    "success": 0,
    "error": "Transaction not found."
}