BTC-testnet Blockbook

Status

Status page returns current status of Blockbook and connected backend.

Method: GET

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

Example response: 200

{
    "blockbook": {
        "coin": "Testnet",
        "host": "7b19891b59aa",
        "version": "devel",
        "gitCommit": "0ebbf16f",
        "buildTime": "2023-01-31T14:47:08+00:00",
        "syncMode": true,
        "initialSync": false,
        "inSync": true,
        "bestHeight": 2585864,
        "lastBlockTime": "2024-04-10T15:18:40.361240507Z",
        "inSyncMempool": false,
        "lastMempoolTime": "2024-04-10T15:19:47.229395556Z",
        "mempoolSize": 193,
        "decimals": 8,
        "dbSize": 49720844960,
        "about": "Blockbook - blockchain indexer for Trezor wallet https://trezor.io/. Do not use for any other purpose."
    },
    "backend": {
        "chain": "test",
        "blocks": 2585864,
        "headers": 2585864,
        "bestBlockHash": "00000000000000087f43aa50232d7ee6c37ed9d398b3aabaed8e9d28e7847f40",
        "difficulty": "110454122.3273832",
        "sizeOnDisk": 37092058655,
        "version": "260100",
        "subversion": "/Satoshi:26.1.0/",
        "protocolVersion": "70016",
        "warnings": "Unknown new rules activated (versionbit 28) "
    }
}

Get block hash

Method: GET

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

Example response: 200

{
    "blockHash": "00000000373403049c5fff2cd653590e8cbe6f7ac639db270e7d1a7503d698df"
}

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-testnet.nownodes.io/api/v2/tx/<txid>

Example response: 200

{
    "txid": "3c50a7a5445ca47ba982b93cd95ab974b7dc008802050bfc43925c49a4032cdc",
    "version": 2,
    "vin": [
        {
            "sequence": 4294967295,
            "n": 0,
            "isAddress": false,
            "coinbase": "03017527048c9b16664d65726d61696465722046545721010000007421150000000000"
        }
    ],
    "vout": [
        {
            "value": "546",
            "n": 0,
            "hex": "5120acf3ff3ad88d47dc0ac7c564eb53092b6bee2947a8cd329c7090e157442a85f2",
            "addresses": [
                "tb1p4nel7wkc34raczk8c4jwk5cf9d47u2284rxn98rsjrs4w3p2sheqvjmfdh"
            ],
            "isAddress": true
        },
        {
            "value": "2878422",
            "n": 1,
            "hex": "0014c035e789d9efffa10aa92e93f48f29b8cfb224c2",
            "addresses": [
                "tb1qcq670zweall6zz4f96flfrefhr8myfxz9ll9l2"
            ],
            "isAddress": true
        },
        {
            "value": "0",
            "n": 2,
            "hex": "6a24aa21a9edbb3bbdcafdbaa877a5dcdf0069e6a3f1d9527ed1be1c36c014888f1e99fd58a8",
            "addresses": [
                "OP_RETURN aa21a9edbb3bbdcafdbaa877a5dcdf0069e6a3f1d9527ed1be1c36c014888f1e99fd58a8"
            ],
            "isAddress": false
        }
    ],
    "blockHash": "000000000000001e41c5a08fc1e0177f42e60c6ceff8fd746c900bed85585eb0",
    "blockHeight": 2585857,
    "confirmations": 9,
    "blockTime": 1712757644,
    "value": "2878968",
    "valueIn": "0",
    "fees": "0",
    "hex": "020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff2303017527048c9b16664d65726d61696465722046545721010000007421150000000000ffffffff032202000000000000225120acf3ff3ad88d47dc0ac7c564eb53092b6bee2947a8cd329c7090e157442a85f2d6eb2b0000000000160014c035e789d9efffa10aa92e93f48f29b8cfb224c20000000000000000266a24aa21a9edbb3bbdcafdbaa877a5dcdf0069e6a3f1d9527ed1be1c36c014888f1e99fd58a80120000000000000000000000000000000000000000000000000000000000000000000000000"
}

Get transaction specific

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

Method: GET

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

Example response: 200

{
    "txid": "3c50a7a5445ca47ba982b93cd95ab974b7dc008802050bfc43925c49a4032cdc",
    "hash": "549353d12bd4773c1d16ee052d41521c1c27f823dff730d1f409226164d7939e",
    "version": 2,
    "size": 243,
    "vsize": 216,
    "weight": 864,
    "locktime": 0,
    "vin": [
        {
            "coinbase": "03017527048c9b16664d65726d61696465722046545721010000007421150000000000",
            "txinwitness": [
                "0000000000000000000000000000000000000000000000000000000000000000"
            ],
            "sequence": 4294967295
        }
    ],
    "vout": [
        {
            "value": 0.00000546,
            "n": 0,
            "scriptPubKey": {
                "asm": "1 acf3ff3ad88d47dc0ac7c564eb53092b6bee2947a8cd329c7090e157442a85f2",
                "desc": "rawtr(acf3ff3ad88d47dc0ac7c564eb53092b6bee2947a8cd329c7090e157442a85f2)#esyrrkhh",
                "hex": "5120acf3ff3ad88d47dc0ac7c564eb53092b6bee2947a8cd329c7090e157442a85f2",
                "address": "tb1p4nel7wkc34raczk8c4jwk5cf9d47u2284rxn98rsjrs4w3p2sheqvjmfdh",
                "type": "witness_v1_taproot"
            }
        },
        {
            "value": 0.02878422,
            "n": 1,
            "scriptPubKey": {
                "asm": "0 c035e789d9efffa10aa92e93f48f29b8cfb224c2",
                "desc": "addr(tb1qcq670zweall6zz4f96flfrefhr8myfxz9ll9l2)#whefl5al",
                "hex": "0014c035e789d9efffa10aa92e93f48f29b8cfb224c2",
                "address": "tb1qcq670zweall6zz4f96flfrefhr8myfxz9ll9l2",
                "type": "witness_v0_keyhash"
            }
        },
        {
            "value": 0.00000000,
            "n": 2,
            "scriptPubKey": {
                "asm": "OP_RETURN aa21a9edbb3bbdcafdbaa877a5dcdf0069e6a3f1d9527ed1be1c36c014888f1e99fd58a8",
                "desc": "raw(6a24aa21a9edbb3bbdcafdbaa877a5dcdf0069e6a3f1d9527ed1be1c36c014888f1e99fd58a8)#xwy5t5k6",
                "hex": "6a24aa21a9edbb3bbdcafdbaa877a5dcdf0069e6a3f1d9527ed1be1c36c014888f1e99fd58a8",
                "type": "nulldata"
            }
        }
    ],
    "hex": "020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff2303017527048c9b16664d65726d61696465722046545721010000007421150000000000ffffffff032202000000000000225120acf3ff3ad88d47dc0ac7c564eb53092b6bee2947a8cd329c7090e157442a85f2d6eb2b0000000000160014c035e789d9efffa10aa92e93f48f29b8cfb224c20000000000000000266a24aa21a9edbb3bbdcafdbaa877a5dcdf0069e6a3f1d9527ed1be1c36c014888f1e99fd58a80120000000000000000000000000000000000000000000000000000000000000000000000000",
    "blockhash": "000000000000001e41c5a08fc1e0177f42e60c6ceff8fd746c900bed85585eb0",
    "confirmations": 9,
    "time": 1712757644,
    "blocktime": 1712757644
}

Get address

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

Method: GET

https://btcbook-testnet.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": "bc1qcq670zweall6zz4f96flfrefhr8myfxz0eykye",
    "balance": "0",
    "totalReceived": "0",
    "totalSent": "0",
    "unconfirmedBalance": "0",
    "unconfirmedTxs": 0,
    "txs": 0
}

Get xpub

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

Method: GET

https://btcbook-testnet.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-testnet.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-testnet.nownodes.io/api/v2/block/<block height|block hash>

Example response: 200

{
    "page": 1,
    "totalPages": 1,
    "itemsOnPage": 1000,
    "hash": "00000000373403049c5fff2cd653590e8cbe6f7ac639db270e7d1a7503d698df",
    "previousBlockHash": "0000000036f7b90238ac6b6026be5e121ac3055f19fffd69f28310a76aa4a5bc",
    "nextBlockHash": "00000000923dac28eba985c5ae67e023361aa91c90e433aa992590d27629cead",
    "height": 1000,
    "confirmations": 2584866,
    "size": 207,
    "time": 1337966144,
    "version": 1,
    "merkleRoot": "3bf8c518a7a1187287516da67cb96733697b1d83eb937e68ae39bd4c08e563b7",
    "nonce": "1029134858",
    "bits": "1d00ffff",
    "difficulty": "1",
    "txCount": 1,
    "txs": [
        {
            "txid": "3bf8c518a7a1187287516da67cb96733697b1d83eb937e68ae39bd4c08e563b7",
            "vin": [
                {
                    "n": 0,
                    "isAddress": false,
                    "value": "0"
                }
            ],
            "vout": [
                {
                    "value": "5000000000",
                    "n": 0,
                    "spent": true,
                    "addresses": [
                        "mw8BoejnFJmntv3PjKAcPbuB6PMsBnAGDQ"
                    ],
                    "isAddress": true
                }
            ],
            "blockHash": "00000000373403049c5fff2cd653590e8cbe6f7ac639db270e7d1a7503d698df",
            "blockHeight": 1000,
            "confirmations": 2584866,
            "blockTime": 1337966144,
            "value": "5000000000",
            "valueIn": "0",
            "fees": "0"
        }
    ]
}

Send transaction

Sends new transaction to backend.

Method: GET

https://btcbook-testnet.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-testnet.nownodes.io/api/v2/tickers-list/?timestamp=<timestamp>

Example response: 200

{
    "error": "No tickers found for date 2023-11-23 09:46:40 +0000 UTC."
}

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": 1636678800,
        "txs": 2,
        "received": "120000",
        "sent": "120000",
        "sentToSelf": "0",
        "rates": {
            "aed": 251912,
            "ars": 59352476,
            "aud": 105300,
            "bdt": 7537274,
            "bhd": 25860,
            "bmd": 68597,
            "brl": 348276,
            "btc": 1,
            "cad": 93906,
            "chf": 62592,
            "clp": 65416490,
            "cny": 496261,
            "czk": 1624673,
            "dkk": 476341,
            "eth": 19.716497,
            "eur": 63854,
            "gbp": 54666,
            "hkd": 537438,
            "huf": 24975608,
            "idr": 1095633200,
            "ils": 256335,
            "inr": 5719226,
            "jpy": 10487368,
            "krw": 93603850,
            "kwd": 21096,
            "lkr": 20487186,
            "mmk": 144049800,
            "mxn": 1132549,
            "myr": 325700,
            "ngn": 85468860,
            "nok": 742942,
            "nzd": 114659,
            "php": 3875201,
            "pkr": 19066336,
            "pln": 272433,
            "rub": 6410967,
            "sar": 257319,
            "sek": 735941,
            "sgd": 92853,
            "thb": 2514762,
            "try": 2214304,
            "twd": 2209747,
            "uah": 2672351,
            "usd": 68597,
            "vef": 6868.65,
            "vnd": 1711297400,
            "zar": 1287420
        }
    },
    {
        "time": 1636736400,
        "txs": 2,
        "received": "154000",
        "sent": "154000",
        "sentToSelf": "0",
        "rates": {
            "aed": 251912,
            "ars": 59352476,
            "aud": 105300,
            "bdt": 7537274,
            "bhd": 25860,
            "bmd": 68597,
            "brl": 348276,
            "btc": 1,
            "cad": 93906,
            "chf": 62592,
            "clp": 65416490,
            "cny": 496261,
            "czk": 1624673,
            "dkk": 476341,
            "eth": 19.716497,
            "eur": 63854,
            "gbp": 54666,
            "hkd": 537438,
            "huf": 24975608,
            "idr": 1095633200,
            "ils": 256335,
            "inr": 5719226,
            "jpy": 10487368,
            "krw": 93603850,
            "kwd": 21096,
            "lkr": 20487186,
            "mmk": 144049800,
            "mxn": 1132549,
            "myr": 325700,
            "ngn": 85468860,
            "nok": 742942,
            "nzd": 114659,
            "php": 3875201,
            "pkr": 19066336,
            "pln": 272433,
            "rub": 6410967,
            "sar": 257319,
            "sek": 735941,
            "sgd": 92853,
            "thb": 2514762,
            "try": 2214304,
            "twd": 2209747,
            "uah": 2672351,
            "usd": 68597,
            "vef": 6868.65,
            "vnd": 1711297400,
            "zar": 1287420
        }
    },
    {
        "time": 1636765200,
        "txs": 4,
        "received": "457000",
        "sent": "457000",
        "sentToSelf": "0",
        "rates": {
            "aed": 251912,
            "ars": 59352476,
            "aud": 105300,
            "bdt": 7537274,
            "bhd": 25860,
            "bmd": 68597,
            "brl": 348276,
            "btc": 1,
            "cad": 93906,
            "chf": 62592,
            "clp": 65416490,
            "cny": 496261,
            "czk": 1624673,
            "dkk": 476341,
            "eth": 19.716497,
            "eur": 63854,
            "gbp": 54666,
            "hkd": 537438,
            "huf": 24975608,
            "idr": 1095633200,
            "ils": 256335,
            "inr": 5719226,
            "jpy": 10487368,
            "krw": 93603850,
            "kwd": 21096,
            "lkr": 20487186,
            "mmk": 144049800,
            "mxn": 1132549,
            "myr": 325700,
            "ngn": 85468860,
            "nok": 742942,
            "nzd": 114659,
            "php": 3875201,
            "pkr": 19066336,
            "pln": 272433,
            "rub": 6410967,
            "sar": 257319,
            "sek": 735941,
            "sgd": 92853,
            "thb": 2514762,
            "try": 2214304,
            "twd": 2209747,
            "uah": 2672351,
            "usd": 68597,
            "vef": 6868.65,
            "vnd": 1711297400,
            "zar": 1287420
        }
    },
    {
        "time": 1636768800,
        "txs": 2,
        "received": "307000",
        "sent": "307000",
        "sentToSelf": "0",
        "rates": {
            "aed": 251912,
            "ars": 59352476,
            "aud": 105300,
            "bdt": 7537274,
            "bhd": 25860,
            "bmd": 68597,
            "brl": 348276,
            "btc": 1,
            "cad": 93906,
            "chf": 62592,
            "clp": 65416490,
            "cny": 496261,
            "czk": 1624673,
            "dkk": 476341,
            "eth": 19.716497,
            "eur": 63854,
            "gbp": 54666,
            "hkd": 537438,
            "huf": 24975608,
            "idr": 1095633200,
            "ils": 256335,
            "inr": 5719226,
            "jpy": 10487368,
            "krw": 93603850,
            "kwd": 21096,
            "lkr": 20487186,
            "mmk": 144049800,
            "mxn": 1132549,
            "myr": 325700,
            "ngn": 85468860,
            "nok": 742942,
            "nzd": 114659,
            "php": 3875201,
            "pkr": 19066336,
            "pln": 272433,
            "rub": 6410967,
            "sar": 257319,
            "sek": 735941,
            "sgd": 92853,
            "thb": 2514762,
            "try": 2214304,
            "twd": 2209747,
            "uah": 2672351,
            "usd": 68597,
            "vef": 6868.65,
            "vnd": 1711297400,
            "zar": 1287420
        }
    },
    {
        "time": 1636772400,
        "txs": 4,
        "received": "291000",
        "sent": "291000",
        "sentToSelf": "0",
        "rates": {
            "aed": 251912,
            "ars": 59352476,
            "aud": 105300,
            "bdt": 7537274,
            "bhd": 25860,
            "bmd": 68597,
            "brl": 348276,
            "btc": 1,
            "cad": 93906,
            "chf": 62592,
            "clp": 65416490,
            "cny": 496261,
            "czk": 1624673,
            "dkk": 476341,
            "eth": 19.716497,
            "eur": 63854,
            "gbp": 54666,
            "hkd": 537438,
            "huf": 24975608,
            "idr": 1095633200,
            "ils": 256335,
            "inr": 5719226,
            "jpy": 10487368,
            "krw": 93603850,
            "kwd": 21096,
            "lkr": 20487186,
            "mmk": 144049800,
            "mxn": 1132549,
            "myr": 325700,
            "ngn": 85468860,
            "nok": 742942,
            "nzd": 114659,
            "php": 3875201,
            "pkr": 19066336,
            "pln": 272433,
            "rub": 6410967,
            "sar": 257319,
            "sek": 735941,
            "sgd": 92853,
            "thb": 2514762,
            "try": 2214304,
            "twd": 2209747,
            "uah": 2672351,
            "usd": 68597,
            "vef": 6868.65,
            "vnd": 1711297400,
            "zar": 1287420
        }
    },
    {
        "time": 1638129600,
        "txs": 4,
        "received": "734000",
        "sent": "734000",
        "sentToSelf": "0",
        "rates": {
            "aed": 251912,
            "ars": 59352476,
            "aud": 105300,
            "bdt": 7537274,
            "bhd": 25860,
            "bmd": 68597,
            "brl": 348276,
            "btc": 1,
            "cad": 93906,
            "chf": 62592,
            "clp": 65416490,
            "cny": 496261,
            "czk": 1624673,
            "dkk": 476341,
            "eth": 19.716497,
            "eur": 63854,
            "gbp": 54666,
            "hkd": 537438,
            "huf": 24975608,
            "idr": 1095633200,
            "ils": 256335,
            "inr": 5719226,
            "jpy": 10487368,
            "krw": 93603850,
            "kwd": 21096,
            "lkr": 20487186,
            "mmk": 144049800,
            "mxn": 1132549,
            "myr": 325700,
            "ngn": 85468860,
            "nok": 742942,
            "nzd": 114659,
            "php": 3875201,
            "pkr": 19066336,
            "pln": 272433,
            "rub": 6410967,
            "sar": 257319,
            "sek": 735941,
            "sgd": 92853,
            "thb": 2514762,
            "try": 2214304,
            "twd": 2209747,
            "uah": 2672351,
            "usd": 68597,
            "vef": 6868.65,
            "vnd": 1711297400,
            "zar": 1287420
        }
    }
]

Last updated