BTC Blockbook

Status

Status page returns current status of Blockbook and connected backend.

Method: GET

https://btcbook.nownodes.io/api/

Example response: 200

{
    "blockbook": {
        "coin": "Bitcoin",
        "host": "7f66a275d006",
        "version": "devel",
        "gitCommit": "9a2fe4db",
        "buildTime": "2024-03-14T12:53:14+00:00",
        "syncMode": true,
        "initialSync": false,
        "inSync": true,
        "bestHeight": 838570,
        "lastBlockTime": "2024-04-10T06:54:04.197001816Z",
        "inSyncMempool": true,
        "lastMempoolTime": "2024-04-10T06:55:55.730110263Z",
        "mempoolSize": 53474,
        "decimals": 8,
        "dbSize": 488543075777,
        "hasFiatRates": true,
        "currentFiatRatesTime": "2024-04-10T06:45:01.239534185Z",
        "about": "Blockbook - blockchain indexer for Trezor Suite https://trezor.io/trezor-suite. Do not use for any other purpose."
    },
    "backend": {
        "chain": "main",
        "blocks": 838570,
        "headers": 838570,
        "bestBlockHash": "000000000000000000030ea4d7da00300204b06a6057d488a5e5f4f4c3e03382",
        "difficulty": "83126997340024.61",
        "sizeOnDisk": 639923315948,
        "version": "260100",
        "subversion": "/Satoshi:26.1.0/",
        "protocolVersion": "70016"
    }
}

Get block hash

Method: GET

https://btcbook.nownodes.io/api/v2/block-index/<block height>

Example response: 200

{
    "blockHash": "00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054"
}

Get transaction

Get transaction returns "normalized" data about transaction, which has the same general structure for all supported coins. It does not return coin specific fields (for example information about Zcash shielded addresses).

Method: GET

https://btcbook.nownodes.io/api/v2/tx/<txid>

Example response: 200

{
    "txid": "72de995eec3b211b9815a2df214c34a3c80ed1ec8d9ab3c7a3d58c53cea275e0",
    "version": 2,
    "vin": [
        {
            "sequence": 4294967295,
            "n": 0,
            "isAddress": false,
            "coinbase": "03aacb0c046d3716662f466f756e6472792055534120506f6f6c202364726f70676f6c642f17b4fd9700002b09d9370000"
        }
    ],
    "vout": [
        {
            "value": "638259710",
            "n": 0,
            "hex": "001435f6de260c9f3bdee47524c473a6016c0c055cb9",
            "addresses": [
                "bc1qxhmdufsvnuaaaer4ynz88fspdsxq2h9e9cetdj"
            ],
            "isAddress": true
        },
        {
            "value": "0",
            "n": 1,
            "hex": "6a24aa21a9ed4cf42ad56e106313b9753445043a00c1ddbbeab81cbeefec9516b71dfc0e6726",
            "addresses": [
                "OP_RETURN aa21a9ed4cf42ad56e106313b9753445043a00c1ddbbeab81cbeefec9516b71dfc0e6726"
            ],
            "isAddress": false
        }
    ],
    "blockHash": "000000000000000000030ea4d7da00300204b06a6057d488a5e5f4f4c3e03382",
    "blockHeight": 838570,
    "confirmations": 1,
    "blockTime": 1712732012,
    "size": 214,
    "vsize": 187,
    "value": "638259710",
    "valueIn": "0",
    "fees": "0",
    "hex": "020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff3103aacb0c046d3716662f466f756e6472792055534120506f6f6c202364726f70676f6c642f17b4fd9700002b09d9370000ffffffff02fe110b260000000016001435f6de260c9f3bdee47524c473a6016c0c055cb90000000000000000266a24aa21a9ed4cf42ad56e106313b9753445043a00c1ddbbeab81cbeefec9516b71dfc0e67260120000000000000000000000000000000000000000000000000000000000000000000000000"
}

Get transaction specific

Returns transaction data in the exact format as returned by backend, including all coin specific fields:

Method: GET

https://btcbook.nownodes.io/api/v2/tx-specific/<txid>

Example response: 200

{
    "txid": "72de995eec3b211b9815a2df214c34a3c80ed1ec8d9ab3c7a3d58c53cea275e0",
    "hash": "99c101d4ac3806c24f8cb1902e03578de73966730837cb7f0e9bf0574a76cb51",
    "version": 2,
    "size": 214,
    "vsize": 187,
    "weight": 748,
    "locktime": 0,
    "vin": [
        {
            "coinbase": "03aacb0c046d3716662f466f756e6472792055534120506f6f6c202364726f70676f6c642f17b4fd9700002b09d9370000",
            "txinwitness": [
                "0000000000000000000000000000000000000000000000000000000000000000"
            ],
            "sequence": 4294967295
        }
    ],
    "vout": [
        {
            "value": 6.38259710,
            "n": 0,
            "scriptPubKey": {
                "asm": "0 35f6de260c9f3bdee47524c473a6016c0c055cb9",
                "desc": "addr(bc1qxhmdufsvnuaaaer4ynz88fspdsxq2h9e9cetdj)#ry8yggxl",
                "hex": "001435f6de260c9f3bdee47524c473a6016c0c055cb9",
                "address": "bc1qxhmdufsvnuaaaer4ynz88fspdsxq2h9e9cetdj",
                "type": "witness_v0_keyhash"
            }
        },
        {
            "value": 0.00000000,
            "n": 1,
            "scriptPubKey": {
                "asm": "OP_RETURN aa21a9ed4cf42ad56e106313b9753445043a00c1ddbbeab81cbeefec9516b71dfc0e6726",
                "desc": "raw(6a24aa21a9ed4cf42ad56e106313b9753445043a00c1ddbbeab81cbeefec9516b71dfc0e6726)#khd0d48f",
                "hex": "6a24aa21a9ed4cf42ad56e106313b9753445043a00c1ddbbeab81cbeefec9516b71dfc0e6726",
                "type": "nulldata"
            }
        }
    ],
    "hex": "020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff3103aacb0c046d3716662f466f756e6472792055534120506f6f6c202364726f70676f6c642f17b4fd9700002b09d9370000ffffffff02fe110b260000000016001435f6de260c9f3bdee47524c473a6016c0c055cb90000000000000000266a24aa21a9ed4cf42ad56e106313b9753445043a00c1ddbbeab81cbeefec9516b71dfc0e67260120000000000000000000000000000000000000000000000000000000000000000000000000",
    "blockhash": "000000000000000000030ea4d7da00300204b06a6057d488a5e5f4f4c3e03382",
    "confirmations": 1,
    "time": 1712732012,
    "blocktime": 1712732012
}

Get address

Returns balances and transactions of an address. The returned transactions are sorted by block height, newest blocks first.

Method: GET

https://btcbook.nownodes.io/api/v2/address/<address>[?page=<page>&pageSize=<size>&from=<block height>&to=<block height>&details=<basic|tokens|tokenBalances|txids|txs>&contract=<contract address>&secondary=usd]

Example response: 200

{
    "page": 1,
    "totalPages": 1,
    "itemsOnPage": 1000,
    "address": "bc1qll4224u6ecldm02xs250h20ax9u6dc4pl9332d",
    "balance": "0",
    "totalReceived": "4555309",
    "totalSent": "4555309",
    "unconfirmedBalance": "0",
    "unconfirmedTxs": 0,
    "txs": 2,
    "txids": [
        "99446b8a7d2d61301ef6d4e34d65ee179da9d15daec46d8ca746ce9984ba31d1",
        "44d575c325e9ee502a67364b1d9537d3d3233f4047bbae42888838ececb8cf86"
    ]
}

Get xpub

Returns balances and transactions of an xpub or output descriptor, applicable only for Bitcoin-type coins.

Method: GET

https://btcbook.nownodes.io/api/v2/xpub/<xpub|descriptor>[?page=<page>&pageSize=<size>&from=<block height>&to=<block height>&details=<basic|tokens|tokenBalances|txids|txs>&tokens=<nonzero|used|derived>&secondary=eur]

Example response: 200

{
    "page": 1,
    "totalPages": 1,
    "itemsOnPage": 1000,
    "address": "xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB",
    "balance": "0",
    "totalReceived": "2063000",
    "totalSent": "2063000",
    "unconfirmedBalance": "0",
    "unconfirmedTxs": 0,
    "txs": 18,
    "addrTxCount": 18,
    "txids": [
        "b435109b7e6ad2b8181583cbf51fcdefe618959cf8bc4f7d45b6d1f5c0c79f89",
        "06577f9c46abed29c32a6f3921dc3bf3cfb2b2f8e7e0b96d281b8ca4e26185d9",
        "9e29a01ca3bb3aa878d25279dc0761efb34de402744ef46b94c057f964ed8628",
        "657f6e76df55a65356d98371370e9f512d1c5d41a01d0d12467edc0609640444",
        "5256a1c98272d1525b46d96b4c01abe62737b8b5932df313c535ab7ebfd4658f",
        "9f127de1c7dc91ef69bec8f0ec5900bda86cec65cb9ace25b6507d410c478a65",
        "9146c7e0a9e7d3d7dd0c4be8bce00d088a25a0bae333d00f22f559a566d7fa41",
        "5caa0c516b2e39b560b7ccfee86824c001e798d20b72e9ea58b3284c46c77d18",
        "90c36964f0e161dcbe054d5201e4fbb8e51782289658893eb00d5dab4547750a",
        "c8d3da26fd0e5a98ef15856becee55fddd2178b8c4fdc786f116251d04bc444d",
        "80c7b9836ae6156a1574f380bb277c712405ebc8e415e34ae61653b2212c7be8",
        "3abc1608b70f0ed319a9a43eb5ed631c39ff8ff57b717652ab45a0c9729ef6ac",
        "62cca9c94fbc618df729d0f1f937222bc9be9de153d7cb1abd4abafdd4f5f1b5",
        "8a82f253ca23b870f2b2f23d3a3cb3aeb26057e21431c35d5f48bd40d78d7c30",
        "99e6806d5253649a758d3e23c66fb48642fd321efdebf4eb1ae78cbdd2fdc8df",
        "318d068ea98fb1ce64cfacf3bd992b87fb78be52289cad14d1ccfd4d472d964f",
        "66a4185ef490e31434e2f11fdf22fc0e58c5acef1b744cb0598daae2979acfce",
        "6398de55c404e897b60cf19f55ab9d9daee95227378164c1a89a820b4d4e779b"
    ],
    "usedTokens": 9
}

Get utxo

Returns array of unspent transaction outputs of address or xpub, applicable only for Bitcoin-type coins. By default, the list contains both confirmed and unconfirmed transactions. The query parameter confirmed=true disables return of unconfirmed transactions. The returned utxos are sorted by block height, newest blocks first. For xpubs or output descriptors, the response also contains address and derivation path of the utxo.

Unconfirmed utxos do not have field height, the field confirmations has value 0 and may contain field lockTime, if not zero.

Coinbase utxos have field coinbase set to true, however due to performance reasons only up to minimum coinbase confirmations limit (100). After this limit, utxos are not detected as coinbase.

Method: GET

https://btcbook.nownodes.io/api/v2/utxo/<address|xpub|descriptor>[?confirmed=true]

Example response: 200

[]

Get block

Returns information about block with transactions, subject to paging.

Method: GET

https://btcbook.nownodes.io/api/v2/block/<block height|block hash>

Example response: 200

{
    "page": 1,
    "totalPages": 4,
    "itemsOnPage": 1000,
    "hash": "00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054",
    "previousBlockHash": "000000000000000000012117ad9f72c1c0e42227c2d042dca23e6b96bd9fbb55",
    "nextBlockHash": "00000000000000000000e26b239cf19ec7ace5edd9694d51a3f6933247720947",
    "height": 800000,
    "confirmations": 38571,
    "size": 1634536,
    "time": 1690168629,
    "version": 874340352,
    "merkleRoot": "91f01a00530c8c83617190048ea8b0814d506cf24dfdbcf8893f8f0cab7f0855",
    "nonce": "106861918",
    "bits": "17053894",
    "difficulty": "53911173001054.59",
    "txCount": 3721,
    "txs": [
        {
            "txid": "b75ca3106ed100521aa50e3ec267a06431c6319538898b25e1b757a5736f5fb4",
            "vin": [
                {
                    "n": 0,
                    "isAddress": false,
                    "value": "0"
                }
            ],
            "vout": [
                {
                    "value": "638687680",
                    "n": 0,
                    "spent": true,
                    "addresses": [
                        "3KZDwmJHB6QJ13QPXHaW7SS3yTESFPZoxb"
                    ],
                    "isAddress": true
                },
                {
                    "value": "0",
                    "n": 1,
                    "addresses": [
                        "OP_RETURN aa21a9ed9fbe517a588ccaca585a868f3cf19cb6897e3c26f3351361fb28ac8509e69a7e"
                    ],
                    "isAddress": false
                }
            ],
            "blockHash": "00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054",
            "blockHeight": 800000,
            "confirmations": 38571,
            "blockTime": 1690168629,
            "value": "638687680",
            "valueIn": "0",
            "fees": "0"
        },
        {
            "txid": "d41f5de48325e79070ccd3a23005f7a3b405f3ce1faa4df09f6d71770497e9d5",
            "vin": [
                {
                    "n": 0,
                    "addresses": [
                        "bc1qvndmep839uexn899qy865cvddgj4txm0nkjua9"
                    ],
                    "isAddress": true,
                    "value": "604308"
                }
            ],
            "vout": [
                {
                    "value": "143332",
                    "n": 0,
                    "spent": true,
                    "addresses": [
                        "bc1p94scc8mn65fnlhyh64zml064kn9692e2n4q7gkttrhmt365ajdyq0m2mzh"
                    ],
                    "isAddress": true
                },
                {
                    "value": "291851",
                    "n": 1,
                    "spent": true,
                    "addresses": [
                        "bc1qvndmep839uexn899qy865cvddgj4txm0nkjua9"
                    ],
                    "isAddress": true
                }
            ],
...

Send transaction

Sends new transaction to backend.

Method: GET

https://btcbook.nownodes.io/api/v2/sendtx/<hex tx data>

Example response: 200

{
  "result": "7c3be24063f268aaa1ed81b64776798f56088757641a34fb156c4f51ed2e9d25"
}

or in case of error

{
  "error": {
    "message": "error message"
  }
}

Tickers list

Returns a list of available currency rate tickers (secondary currencies) for the specified date, along with an actual data timestamp.

Method: GET

https://btcbook.nownodes.io/api/v2/tickers-list/?timestamp=<timestamp>

Example response: 200

{
    "ts": 1600732800,
    "available_currencies": [
        "aed",
        "ars",
        "aud",
        "bdt",
        "bhd",
        "bmd",
        "brl",
        "btc",
        "cad",
        "chf",
        "clp",
        "cny",
        "czk",
        "dkk",
        "eth",
        "eur",
        "gbp",
        "hkd",
        "huf",
        "idr",
        "ils",
        "inr",
        "jpy",
        "krw",
        "kwd",
        "lkr",
        "mmk",
        "mxn",
        "myr",
        "ngn",
        "nok",
        "nzd",
        "php",
        "pkr",
        "pln",
        "rub",
        "sar",
        "sek",
        "sgd",
        "thb",
        "try",
        "twd",
        "uah",
        "usd",
        "vef",
        "vnd",
        "zar"
    ]
}

Balance history

Returns a balance history for the specified XPUB or address.

Method: GET

https://btcbook.nownodes.io/api/v2/balancehistory/<XPUB|address>?from=<dateFrom>&to=<dateTo>[&fiatcurrency=<currency>&groupBy=<groupBySeconds>]

Example response: 200

[
    {
        "time": 1712750400,
        "txs": 2,
        "received": "4182",
        "sent": "4182",
        "sentToSelf": "0",
        "rates": {
            "aed": 253480.44,
            "ars": 59689250,
            "aud": 104213.555,
            "bdt": 7584352,
            "bhd": 26021.85,
            "bmd": 69025.44,
            "brl": 345750,
            "btc": 1.001341,
            "cad": 93602.35,
            "chf": 62384.54,
            "clp": 64994012,
            "cny": 499256.6,
            "czk": 1610098.2,
            "dkk": 473927.66,
            "eth": 19.671528,
            "eur": 63529.074,
            "gbp": 54336.77,
            "hkd": 540648.06,
            "huf": 24740556,
            "idr": 1093911200,
            "ils": 255844.61,
            "inr": 5743327.5,
            "jpy": 10480810,
            "krw": 93251250,
            "kwd": 21218.414,
            "lkr": 20615152,
            "mmk": 144949520,
            "mxn": 1126080,
            "myr": 327734.9,
            "ngn": 86002710,
            "nok": 736084.75,
            "nzd": 113593.12,
            "php": 3879871.8,
            "pkr": 19185424,
            "pln": 270384.1,
            "rub": 6438975,
            "sar": 258909.73,
            "sek": 727939.8,
            "sgd": 92790.26,
            "thb": 2511366,
            "try": 2226514.5,
            "twd": 2207134.8,
            "uah": 2689042.2,
            "usd": 69025.44,
            "vef": 6911.5557,
            "vnd": 1721986300,
            "zar": 1278080.6
        }
    }
]

Last updated