WSS 0.6.0
Get Info
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"1","method":"getInfo","params":{}}Response: 200
{
"id": "1",
"data": {
"name": "Testnet",
"shortcut": "TEST",
"network": "TEST",
"decimals": 8,
"version": "0.6.0",
"bestHeight": 5104068,
"bestHash": "0000000047b89ec4b6b49ccf07f882bbbd8c46743058d602a4e64662f8ab77e5",
"block0Hash": "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943",
"testnet": true,
"backend": {
"version": "290000",
"subversion": "/Satoshi:29.0.0/"
}
}
}Ping
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"2","method":"ping","params":{}}Response: 200
{
"id": "2",
"data": {}
}Get block hash
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"3","method":"getBlockHash","params":{"height":5102000}}Response: 200
{
"id": "3",
"data": {
"hash": "00000000007df7e9e3fcf3d0bcdb4c159b2f18a55986bfff0be8eab1d1078cf6"
}
}Get account info
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{
"id": "4",
"method": "getAccountInfo",
"params": {
"descriptor": "tb1qav67mptygg8pfgqxjrejyqhmy3w3778wvpjsk9",
"details": "basic"
}
}Response: 200
{
"id": "4",
"data": {
"address": "tb1qav67mptygg8pfgqxjrejyqhmy3w3778wvpjsk9",
"balance": "5778296",
"totalReceived": "23661213",
"totalSent": "17882917",
"unconfirmedTxs": 0,
"txs": 123
}
}Get account UTXO
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{
"id": "5",
"method": "getAccountUtxo",
"params": {
"descriptor": "tb1qav67mptygg8pfgqxjrejyqhmy3w3778wvpjsk9"
}
}Response: 200
{
"id": "5",
"data": [
{
"txid": "1abfec8db9e58bae4b7892d9a7aeb3e1cef45542f63c2719d2cff4c5ab5a7d84",
"vout": 0,
"value": "100000",
"height": 5104065,
"confirmations": 4
},
{
"txid": "bcbef9c138ab10ba25fd46e340f792ca8c088b506d930490bd82ae07f3993673",
"vout": 1,
"value": "250202",
"height": 5104063,
"confirmations": 6
}
]
}Get balance history
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{
"id": "6",
"method": "getBalanceHistory",
"params": {
"descriptor": "tb1qav67mptygg8pfgqxjrejyqhmy3w3778wvpjsk9",
"from": 1786060800,
"to": 1786068000
}
}Response: 200
{
"id": "6",
"data": [
{
"time": 1786060800,
"txs": 1,
"received": "250202",
"sent": "252343",
"sentToSelf": "250202"
},
{
"time": 1786064400,
"txs": 1,
"received": "100000",
"sent": "0",
"sentToSelf": "0"
}
]
}Get transaction
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{
"id": "7",
"method": "getTransaction",
"params": {
"txid": "e9b286c573ab64edf1446d166c45ef76659fb1ecd1d13298cf07b4d09fc06d17"
}
}Response: 200
{
"id": "7",
"data": {
"txid": "e9b286c573ab64edf1446d166c45ef76659fb1ecd1d13298cf07b4d09fc06d17",
"version": 1,
"vin": [
{
"txid": "e21588f28ae2bd8a4aba0879e0a388d9d604875f26043acc1468dfa38315f6d0",
"sequence": 4294967295,
"n": 0,
"addresses": [
"tb1qpq005np0uazu5e8wnayf0cjpa4tkwuhcm9ssac"
],
"isAddress": true,
"value": "3000"
},
{
"txid": "c68b7e52365a180359cc79192a3c3926902bf04001789a30c89127e902047a7f",
"sequence": 4294967295,
"n": 1,
"addresses": [
"tb1qnsuv755qtmh3lygjlwfh5gdqt7m0x3md5dzh8h"
],
"isAddress": true,
"value": "3000"
}
],
"vout": [
{
"value": "5000",
"n": 0,
"spent": true,
"hex": "76a914efd22fbfea12156ba1e52fbe419c98b208cd649288ac",
"addresses": [
"n3P1av9HuZeuiPQMJWhJEJkXZU53JjVDrn"
],
"isAddress": true
}
],
"blockHash": "00000000007df7e9e3fcf3d0bcdb4c159b2f18a55986bfff0be8eab1d1078cf6",
"blockHeight": 5102000,
"confirmations": 2069,
"blockTime": 1785733402,
"size": 343,
"vsize": 181,
"value": "5000",
"valueIn": "6000",
"fees": "1000",
"hex": "01000000000102d0f61583a3df6814cc3a04265f8704d6d988a3e07908ba4a8abde28af28815e20000000000ffffffff7f7a0402e92791c8309a780140f02b9026393c2a1979cc5903185a36527e8bc60000000000ffffffff0188130000000000001976a914efd22fbfea12156ba1e52fbe419c98b208cd649288ac02473044022068326ae5035ac154c42453b36cee662c4baac7e01f09c3eda57d341d815b4b110220767fc33fef7f63bc6191dff44efaa077f48602bc8490a1a726cf2eecc7b1cbd901210383ef818e79781019cd7cf5b04553448fca672c710fef26421fc0f1ec1f14d97c02483045022100d80206dbc52b740d14dc920d30844c8b886ffb220595a7e498ac39ef9fc77da902205e7b336e2a8c30bf3e6afae802f88d18cb9eed40f538f6efecc9e0d849405c30012102dc1612eec3528b44d6dd24a6f46b07c2318a6c90cfe8912fe27b42cb87cbddfd00000000"
}
}Get transaction specific
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{
"id": "8",
"method": "getTransactionSpecific",
"params": {
"txid": "e9b286c573ab64edf1446d166c45ef76659fb1ecd1d13298cf07b4d09fc06d17"
}
}Response: 200
{
"id": "8",
"data": {
"txid": "e9b286c573ab64edf1446d166c45ef76659fb1ecd1d13298cf07b4d09fc06d17",
"hash": "9f366b3b9f65a98dbebc2d0a079df2a43c2a1c2cbf42370e09cb5924bc994462",
"version": 1,
"size": 343,
"vsize": 181,
"weight": 721,
"locktime": 0,
"vin": [
{
"txid": "e21588f28ae2bd8a4aba0879e0a388d9d604875f26043acc1468dfa38315f6d0",
"vout": 0,
"scriptSig": {
"asm": "",
"hex": ""
},
"txinwitness": [
"3044022068326ae5035ac154c42453b36cee662c4baac7e01f09c3eda57d341d815b4b110220767fc33fef7f63bc6191dff44efaa077f48602bc8490a1a726cf2eecc7b1cbd901",
"0383ef818e79781019cd7cf5b04553448fca672c710fef26421fc0f1ec1f14d97c"
],
"sequence": 4294967295
},
{
"txid": "c68b7e52365a180359cc79192a3c3926902bf04001789a30c89127e902047a7f",
"vout": 0,
"scriptSig": {
"asm": "",
"hex": ""
},
"txinwitness": [
"3045022100d80206dbc52b740d14dc920d30844c8b886ffb220595a7e498ac39ef9fc77da902205e7b336e2a8c30bf3e6afae802f88d18cb9eed40f538f6efecc9e0d849405c3001",
"02dc1612eec3528b44d6dd24a6f46b07c2318a6c90cfe8912fe27b42cb87cbddfd"
],
"sequence": 4294967295
}
],
"vout": [
{
"value": 5e-05,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 efd22fbfea12156ba1e52fbe419c98b208cd6492 OP_EQUALVERIFY OP_CHECKSIG",
"desc": "addr(n3P1av9HuZeuiPQMJWhJEJkXZU53JjVDrn)#myt0p47w",
"hex": "76a914efd22fbfea12156ba1e52fbe419c98b208cd649288ac",
"address": "n3P1av9HuZeuiPQMJWhJEJkXZU53JjVDrn",
"type": "pubkeyhash"
}
}
],
"hex": "01000000000102d0f61583a3df6814cc3a04265f8704d6d988a3e07908ba4a8abde28af28815e20000000000ffffffff7f7a0402e92791c8309a780140f02b9026393c2a1979cc5903185a36527e8bc60000000000ffffffff0188130000000000001976a914efd22fbfea12156ba1e52fbe419c98b208cd649288ac02473044022068326ae5035ac154c42453b36cee662c4baac7e01f09c3eda57d341d815b4b110220767fc33fef7f63bc6191dff44efaa077f48602bc8490a1a726cf2eecc7b1cbd901210383ef818e79781019cd7cf5b04553448fca672c710fef26421fc0f1ec1f14d97c02483045022100d80206dbc52b740d14dc920d30844c8b886ffb220595a7e498ac39ef9fc77da902205e7b336e2a8c30bf3e6afae802f88d18cb9eed40f538f6efecc9e0d849405c30012102dc1612eec3528b44d6dd24a6f46b07c2318a6c90cfe8912fe27b42cb87cbddfd00000000",
"blockhash": "00000000007df7e9e3fcf3d0bcdb4c159b2f18a55986bfff0be8eab1d1078cf6",
"confirmations": 2069,
"time": 1785733402,
"blocktime": 1785733402
}
}Estimate fee
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"9","method":"estimateFee","params":{"blocks":[2,6]}}Response: 200
{
"id": "9",
"data": [
{
"feePerUnit": "77821"
},
{
"feePerUnit": "77821"
}
]
}Get long term fee rate
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"10","method":"longTermFeeRate","params":{}}Response: 200
{
"id": "10",
"data": {
"feePerUnit": "1000",
"blocks": 1008
}
}Get block filter
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{
"id": "11",
"method": "getBlockFilter",
"params": {
"scriptType": "",
"blockHash": "00000000007df7e9e3fcf3d0bcdb4c159b2f18a55986bfff0be8eab1d1078cf6"
}
}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://btc-testnet.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://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{
"id": "13",
"method": "sendTransaction",
"params": {
"hex": "01000000000102d0f61583a3df6814cc3a04265f8704d6d988a3e07908ba4a8abde28af28815e20000000000ffffffff7f7a0402e92791c8309a780140f02b9026393c2a1979cc5903185a36527e8bc60000000000ffffffff0188130000000000001976a914efd22fbfea12156ba1e52fbe419c98b208cd649288ac02473044022068326ae5035ac154c42453b36cee662c4baac7e01f09c3eda57d341d815b4b110220767fc33fef7f63bc6191dff44efaa077f48602bc8490a1a726cf2eecc7b1cbd901210383ef818e79781019cd7cf5b04553448fca672c710fef26421fc0f1ec1f14d97c02483045022100d80206dbc52b740d14dc920d30844c8b886ffb220595a7e498ac39ef9fc77da902205e7b336e2a8c30bf3e6afae802f88d18cb9eed40f538f6efecc9e0d849405c30012102dc1612eec3528b44d6dd24a6f46b07c2318a6c90cfe8912fe27b42cb87cbddfd00000000"
}
}Response: 200
{
"id": "13",
"data": {
"result": "e9b286c573ab64edf1446d166c45ef76659fb1ecd1d13298cf07b4d09fc06d17"
}
}A transaction the backend rejects returns an error object instead, for example
{"id":"13","data":{"error":{"message":"-22: TX decode failed. Make sure the tx has at least one input."}}}.
Get fiat rates for timestamps
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{
"id": "14",
"method": "getFiatRatesForTimestamps",
"params": {
"timestamps": [
1785900000
],
"currencies": [
"usd"
]
}
}Response: 200
{
"id": "14",
"data": {
"error": {
"message": "No tickers found"
}
}
}Fiat rates are not configured on testnet, so this method returns an error.
Get fiat rates for tickers list
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"15","method":"getFiatRatesTickersList","params":{"timestamp":1785900000}}Response: 200
{
"id": "15",
"data": {
"error": {
"message": "No tickers found"
}
}
}Fiat rates are not configured on testnet, so this method returns an error.
Get current fiat rates
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"16","method":"getCurrentFiatRates","params":{"currencies":["usd"]}}Response: 200
{
"id": "16",
"data": {
"error": {
"message": "No tickers found!"
}
}
}Fiat rates are not configured on testnet, so this method returns an error.
Subscribe new block
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"17","method":"subscribeNewBlock","params":{}}Response: 200
{
"id": "17",
"data": {
"subscribed": true
}
}Unsubscribe new block
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"18","method":"unsubscribeNewBlock","params":{}}Response: 200
{
"id": "18",
"data": {
"subscribed": false
}
}Subscribe new transaction
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"19","method":"subscribeNewTransaction","params":{}}Response: 200
{
"id": "19",
"data": {
"subscribed": true
}
}Unsubscribe new transaction
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"20","method":"unsubscribeNewTransaction","params":{}}Response: 200
{
"id": "20",
"data": {
"subscribed": false
}
}Subscribe address
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{
"id": "21",
"method": "subscribeAddresses",
"params": {
"addresses": [
"tb1qav67mptygg8pfgqxjrejyqhmy3w3778wvpjsk9"
]
}
}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://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"22","method":"unsubscribeAddresses","params":{}}Response: 200
{
"id": "22",
"data": {
"subscribed": false
}
}Subscribe new fiat rates
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"23","method":"subscribeFiatRates","params":{"currency":"usd"}}Response: 200
{
"id": "23",
"data": {
"subscribed": true
}
}The subscription is accepted, but no rates are delivered, as fiat rates are not configured on testnet.
Unsubscribe new fiat rates
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"24","method":"unsubscribeFiatRates","params":{}}Response: 200
{
"id": "24",
"data": {
"subscribed": false
}
}Get block
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{"id":"25","method":"getBlock","params":{"id":"5102000","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 on this endpoint.
Get block filters batch
Copied!wss://btc-testnet.nownodes.io/wss/{{api_key}}
Body
{
"id": "26",
"method": "getBlockFiltersBatch",
"params": {
"scriptType": "",
"bestKnownBlockHash": "00000000007df7e9e3fcf3d0bcdb4c159b2f18a55986bfff0be8eab1d1078cf6",
"pageSize": 2
}
}Response: 200
{
"id": "26",
"data": {
"error": {
"message": "Not supported"
}
}
}Not supported on this endpoint. Compact block filters are not built on this endpoint.
Get contract info
Copied!wss://btc-testnet.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. Bitcoin has no contract layer.
RPC call
Copied!wss://btc-testnet.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.