Blockbook WSS 0.6.0
Get Info
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"1","method":"getInfo","params":{}}Response: 200
{
"id": "1",
"data": {
"name": "Bcash",
"shortcut": "BCH",
"network": "BCH",
"decimals": 8,
"version": "0.6.0",
"bestHeight": 963137,
"bestHash": "0000000000000000003fabc72e39cd0c26f34e2050cc82d546e2190a0d8fa763",
"block0Hash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
"testnet": false,
"backend": {
"version": "29010000",
"subversion": "/Bitcoin Cash Node:29.1.0(EB32.0)/"
}
}
}Ping
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"2","method":"ping","params":{}}Response: 200
{
"id": "2",
"data": {}
}Get block hash
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"3","method":"getBlockHash","params":{"height":962958}}Response: 200
{
"id": "3",
"data": {
"hash": "0000000000000000024f7ed53921cfa54cfede53ea99919e219717ff9005829b"
}
}Get account info
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "4",
"method": "getAccountInfo",
"params": {
"descriptor": "bitcoincash:qzrjshsrha097j5j8v8xxc0lchujc7jtpu3chu7ftd",
"details": "basic"
}
}Response: 200
{
"id": "4",
"data": {
"address": "bitcoincash:qzrjshsrha097j5j8v8xxc0lchujc7jtpu3chu7ftd",
"balance": "132445",
"totalReceived": "35952352",
"totalSent": "35819907",
"unconfirmedTxs": 0,
"txs": 990
}
}Get account UTXO
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "5",
"method": "getAccountUtxo",
"params": {
"descriptor": "bitcoincash:qzrjshsrha097j5j8v8xxc0lchujc7jtpu3chu7ftd"
}
}Response: 200
{
"id": "5",
"data": [
{
"txid": "ebee9a6a5bdc80d0aff6a8785f4aab889dddcced92777d8f29d8f6536db685ce",
"vout": 1,
"value": "18921",
"height": 963136,
"confirmations": 2
},
{
"txid": "aaf703957c3669471318bfba9a22b4fc5e970c15103d72120a9475072d1f532f",
"vout": 1,
"value": "18947",
"height": 963116,
"confirmations": 22
}
]
}Get balance history
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "6",
"method": "getBalanceHistory",
"params": {
"descriptor": "bitcoincash:qzrjshsrha097j5j8v8xxc0lchujc7jtpu3chu7ftd",
"from": 1786075200,
"to": 1786082400
}
}Response: 200
{
"id": "6",
"data": [
{
"time": 1786075200,
"txs": 2,
"received": "40046",
"sent": "40496",
"sentToSelf": "40046",
"rates": {
"aed": 781.75885,
"ars": 319250.84,
"aud": 302.66425,
"bdt": 26343.465,
"bhd": 80.26007,
"bmd": 212.8683,
"brl": 1090.5881,
"btc": 0.003312851,
"cad": 298.31705,
"chf": 172.94229,
"clp": 194961.83,
"cny": 1436.6696,
"czk": 4478.1636,
"dkk": 1380.8661,
"eth": 0.1121255,
"eur": 184.71646,
"gbp": 158.21075,
"hkd": 1669.856,
"huf": 67470.18,
"idr": 3814445,
"ils": 640.24713,
"inr": 20288.936,
"jpy": 33723.125,
"krw": 302975,
"kwd": 65.917015,
"lkr": 71486.58,
"mmk": 446953.2,
"mxn": 3662.746,
"myr": 870.9507,
"ngn": 290118.2,
"nok": 2029.9653,
"nzd": 362.79486,
"php": 12931.749,
"pkr": 59083.227,
"pln": 794.3943,
"rub": 17667.77,
"sar": 799.3485,
"sek": 2025.2832,
"sgd": 273.2207,
"thb": 7048.0693,
"try": 10146.325,
"twd": 6859,
"uah": 9529.3955,
"usd": 212.8683,
"vnd": 5584163.5,
"zar": 3479.8027
}
}
]
}Get transaction
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "7",
"method": "getTransaction",
"params": {
"txid": "bddbb4cd751864279ed9d6985a771fcd8b28c0a08318bb39066f42533f0ed40d"
}
}Response: 200
{
"id": "7",
"data": {
"txid": "bddbb4cd751864279ed9d6985a771fcd8b28c0a08318bb39066f42533f0ed40d",
"version": 1,
"vin": [
{
"txid": "ab1a5b94bfb6e6dce76f26a45af658740d572ae73ba03ff9f53f2fd2de0fccd0",
"vout": 1,
"sequence": 4294967295,
"n": 0,
"addresses": [
"bitcoincash:qzrjshsrha097j5j8v8xxc0lchujc7jtpu3chu7ftd"
],
"isAddress": true,
"value": "20258",
"hex": "4730440220268792155a20e4b242a1771f2469484504bfb92a3bba1efd4be6f8b2733f4a7202202414bd9dd8655594e97e94fa6e8c846c40f32b3ece6a200513c88802aebb122f41210332aa9c07e6a606e55298edd927629c9816a0fe3bc45623a1ade1c537297c24cd"
}
],
"vout": [
{
"value": "0",
"n": 0,
"hex": "6a026d020649646561733a",
"addresses": [],
"isAddress": false
},
{
"value": "20046",
"n": 1,
"spent": true,
"hex": "76a91487285e03bf5e5f4a923b0e6361ffc5f92c7a4b0f88ac",
"addresses": [
"bitcoincash:qzrjshsrha097j5j8v8xxc0lchujc7jtpu3chu7ftd"
],
"isAddress": true
}
],
"blockHash": "0000000000000000004ecd1d9255589d22c26d9c3896b08d2ee719405cdfc87b",
"blockHeight": 962950,
"confirmations": 188,
"blockTime": 1786075817,
"size": 211,
"value": "20046",
"valueIn": "20258",
"fees": "212",
"hex": "0100000001d0cc0fded22f3ff5f93fa03be72a570d7458f65aa4266fe7dce6b6bf945b1aab010000006a4730440220268792155a20e4b242a1771f2469484504bfb92a3bba1efd4be6f8b2733f4a7202202414bd9dd8655594e97e94fa6e8c846c40f32b3ece6a200513c88802aebb122f41210332aa9c07e6a606e55298edd927629c9816a0fe3bc45623a1ade1c537297c24cdffffffff0200000000000000000b6a026d020649646561733a4e4e0000000000001976a91487285e03bf5e5f4a923b0e6361ffc5f92c7a4b0f88ac00000000"
}
}Get transaction specific
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "8",
"method": "getTransactionSpecific",
"params": {
"txid": "bddbb4cd751864279ed9d6985a771fcd8b28c0a08318bb39066f42533f0ed40d"
}
}Response: 200
{
"id": "8",
"data": {
"txid": "bddbb4cd751864279ed9d6985a771fcd8b28c0a08318bb39066f42533f0ed40d",
"hash": "bddbb4cd751864279ed9d6985a771fcd8b28c0a08318bb39066f42533f0ed40d",
"version": 1,
"size": 211,
"locktime": 0,
"vin": [
{
"txid": "ab1a5b94bfb6e6dce76f26a45af658740d572ae73ba03ff9f53f2fd2de0fccd0",
"vout": 1,
"scriptSig": {
"asm": "30440220268792155a20e4b242a1771f2469484504bfb92a3bba1efd4be6f8b2733f4a7202202414bd9dd8655594e97e94fa6e8c846c40f32b3ece6a200513c88802aebb122f[ALL|FORKID] 0332aa9c07e6a606e55298edd927629c9816a0fe3bc45623a1ade1c537297c24cd",
"hex": "4730440220268792155a20e4b242a1771f2469484504bfb92a3bba1efd4be6f8b2733f4a7202202414bd9dd8655594e97e94fa6e8c846c40f32b3ece6a200513c88802aebb122f41210332aa9c07e6a606e55298edd927629c9816a0fe3bc45623a1ade1c537297c24cd"
},
"sequence": 4294967295
}
],
"vout": [
{
"value": 0.0,
"n": 0,
"scriptPubKey": {
"asm": "OP_RETURN 621 64267229684809",
"hex": "6a026d020649646561733a",
"type": "nulldata"
}
},
{
"value": 0.00020046,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 87285e03bf5e5f4a923b0e6361ffc5f92c7a4b0f OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a91487285e03bf5e5f4a923b0e6361ffc5f92c7a4b0f88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"bitcoincash:qzrjshsrha097j5j8v8xxc0lchujc7jtpu3chu7ftd"
]
}
}
],
"hex": "0100000001d0cc0fded22f3ff5f93fa03be72a570d7458f65aa4266fe7dce6b6bf945b1aab010000006a4730440220268792155a20e4b242a1771f2469484504bfb92a3bba1efd4be6f8b2733f4a7202202414bd9dd8655594e97e94fa6e8c846c40f32b3ece6a200513c88802aebb122f41210332aa9c07e6a606e55298edd927629c9816a0fe3bc45623a1ade1c537297c24cdffffffff0200000000000000000b6a026d020649646561733a4e4e0000000000001976a91487285e03bf5e5f4a923b0e6361ffc5f92c7a4b0f88ac00000000",
"blockhash": "0000000000000000004ecd1d9255589d22c26d9c3896b08d2ee719405cdfc87b",
"confirmations": 188,
"time": 1786075817,
"blocktime": 1786075817
}
}Estimate fee
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"9","method":"estimateFee","params":{"blocks":[2,6]}}Response: 200
{
"id": "9",
"data": [
{
"feePerUnit": "1000"
},
{
"feePerUnit": "1000"
}
]
}Get long term fee rate
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"10","method":"longTermFeeRate","params":{}}Response: 200
{
"id": "10",
"data": {
"error": {
"message": "-1: estimatefee\n\nEstimates the approximate fee per kilobyte needed for a transaction\n\nResult:\nn (numeric) estimated fee-per-kilobyte\n\nExamples:\n> bitcoin-cli estimatefee\n"
}
}
}Get block filter
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "11",
"method": "getBlockFilter",
"params": {
"scriptType": "",
"blockHash": "0000000000000000024f7ed53921cfa54cfede53ea99919e219717ff9005829b"
}
}Response: 200
{
"id": "11",
"data": {
"P": 0,
"M": 1,
"zeroedKey": false,
"blockFilter": ""
}
}Compact block filters are not built on this endpoint, so
blockFiltercomes back empty andPis 0. SendscriptTypeempty, as no script type is configured.
Get mempool filters
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"12","method":"getMempoolFilters","params":{"scriptType":"","mempool":true}}Response: 200
{
"id": "12",
"data": {
"P": 0,
"M": 1,
"zeroedKey": false,
"entries": {}
}
}Mempool filters are not built on this endpoint, so
entriescomes back empty.
Send transaction
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "13",
"method": "sendTransaction",
"params": {
"hex": "0100000001d0cc0fded22f3ff5f93fa03be72a570d7458f65aa4266fe7dce6b6bf945b1aab010000006a4730440220268792155a20e4b242a1771f2469484504bfb92a3bba1efd4be6f8b2733f4a7202202414bd9dd8655594e97e94fa6e8c846c40f32b3ece6a200513c88802aebb122f41210332aa9c07e6a606e55298edd927629c9816a0fe3bc45623a1ade1c537297c24cdffffffff0200000000000000000b6a026d020649646561733a4e4e0000000000001976a91487285e03bf5e5f4a923b0e6361ffc5f92c7a4b0f88ac00000000"
}
}Response: 200
{
"id": "13",
"data": {
"result": "bddbb4cd751864279ed9d6985a771fcd8b28c0a08318bb39066f42533f0ed40d"
}
}A transaction the backend rejects returns an error object instead, for example
{"id":"13","data":{"error":{"message":"-22: TX decode failed"}}}.
Get fiat rates for timestamps
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "14",
"method": "getFiatRatesForTimestamps",
"params": {
"timestamps": [
1786075200
],
"currencies": [
"usd"
]
}
}Response: 200
{
"id": "14",
"data": {
"tickers": [
{
"ts": 1786075200,
"rates": {
"usd": 212.8683
}
}
]
}
}Get fiat rates for tickers list
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"15","method":"getFiatRatesTickersList","params":{"timestamp":1786075200}}Response: 200
{
"id": "15",
"data": {
"ts": 1786075200,
"available_currencies": [
"aed",
"ars"
]
}
}Get current fiat rates
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"16","method":"getCurrentFiatRates","params":{"currencies":["usd"]}}Response: 200
{
"id": "16",
"data": {
"ts": 1786176902,
"rates": {
"usd": 216.57
}
}
}Subscribe new block
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"17","method":"subscribeNewBlock","params":{}}Response: 200
{
"id": "17",
"data": {
"subscribed": true
}
}Unsubscribe new block
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"18","method":"unsubscribeNewBlock","params":{}}Response: 200
{
"id": "18",
"data": {
"subscribed": false
}
}Subscribe new transaction
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"19","method":"subscribeNewTransaction","params":{}}Response: 200
{
"id": "19",
"data": {
"subscribed": true
}
}Unsubscribe new transaction
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"20","method":"unsubscribeNewTransaction","params":{}}Response: 200
{
"id": "20",
"data": {
"subscribed": false
}
}Subscribe address
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "21",
"method": "subscribeAddresses",
"params": {
"addresses": [
"bitcoincash:qzrjshsrha097j5j8v8xxc0lchujc7jtpu3chu7ftd"
]
}
}Response: 200
{
"id": "21",
"data": {
"subscribed": true
}
}Optional parameter
newBlockTxs(boolean, default false): when true, the subscription also publishes confirmed transactions for the subscribed addresses as new blocks are connected. Without it only mempool transactions are delivered, so transactions that land straight in a block are never announced.
Unsubscribe address
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"22","method":"unsubscribeAddresses","params":{}}Response: 200
{
"id": "22",
"data": {
"subscribed": false
}
}Subscribe new fiat rates
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"23","method":"subscribeFiatRates","params":{"currency":"usd"}}Response: 200
{
"id": "23",
"data": {
"subscribed": true
}
}Unsubscribe new fiat rates
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"24","method":"unsubscribeFiatRates","params":{}}Response: 200
{
"id": "24",
"data": {
"subscribed": false
}
}Get block
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"25","method":"getBlock","params":{"id":"962958","page":1}}Response: 200
{
"id": "25",
"data": {
"error": {
"message": "Not supported"
}
}
}Not supported on this endpoint. This method requires the extended index, which is not enabled.
Get block filters batch
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "26",
"method": "getBlockFiltersBatch",
"params": {
"scriptType": "",
"bestKnownBlockHash": "0000000000000000024f7ed53921cfa54cfede53ea99919e219717ff9005829b",
"pageSize": 2
}
}Response: 200
{
"id": "26",
"data": {
"error": {
"message": "Not supported"
}
}
}Not supported on this endpoint. Compact block filters are not built.
Get contract info
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "27",
"method": "getContractInfo",
"params": {
"contract": "0x0000000000000000000000000000000000000001"
}
}Response: 200
{
"id": "27",
"data": {
"error": {
"message": "getContractInfo is not supported on this coin"
}
}
}Available on Ethereum-type networks only. This network has no contract layer.
RPC call
Copied!wss://bchbook.nownodes.io/wss/{{api_key}}
Body
{"id":"28","method":"rpcCall","params":{"method":"getblockcount","params":[]}}Response: 200
{
"id": "28",
"data": {
"error": {
"message": "not supported"
}
}
}Available on Ethereum-type networks only.