BlockBook WSS 0.6.0
Get Info
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"1","method":"getInfo","params":{}}Response: 200
{
"id": "1",
"data": {
"name": "BNB Smart Chain Archive",
"shortcut": "BNB",
"network": "BNB",
"decimals": 18,
"version": "0.6.0",
"bestHeight": 114743170,
"bestHash": "0x334c9a54f3dfaf8948b8a41688974840bd8695a70b9d22da103ac6231bf7ac04",
"block0Hash": "0x0d21840abff46b96c84b2ac9e10e4f5cdaeb5693cb665db62a2f3b02d2d57b5b",
"testnet": false,
"backend": {
"version": "reth-bsc/v0.1.0-unknown/linux"
}
}
}Ping
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"2","method":"ping","params":{}}Response: 200
{
"id": "2",
"data": {}
}Get block hash
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"3","method":"getBlockHash","params":{"height":107227326}}Response: 200
{
"id": "3",
"data": {
"hash": "0xc3dbd80e2bd3e8ef8cb7b218d36ae7a8b25162cd1b9967e3fb1c45992df34169"
}
}Get account info
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "4",
"method": "getAccountInfo",
"params": {
"descriptor": "0x0b4fC8e0FEb6D9a7Afe7182c73083Ed3dd7a1Afe",
"details": "basic"
}
}Response: 200
{
"id": "4",
"data": {
"address": "0x0b4fC8e0FEb6D9a7Afe7182c73083Ed3dd7a1Afe",
"balance": "3652629614751007",
"unconfirmedTxs": 2,
"txs": 147,
"nonTokenTxs": 70,
"internalTxs": 15,
"nonce": "67"
}
}Get account UTXO
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "5",
"method": "getAccountUtxo",
"params": {
"descriptor": "0x0b4fC8e0FEb6D9a7Afe7182c73083Ed3dd7a1Afe"
}
}Response: 200
{
"id": "5",
"data": {
"error": {
"message": "Not supported"
}
}
}Get balance history
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "6",
"method": "getBalanceHistory",
"params": {
"descriptor": "0x0b4fC8e0FEb6D9a7Afe7182c73083Ed3dd7a1Afe",
"from": 1578391200,
"to": 1578488400
}
}Response: 200
{
"id": "6",
"data": []
}Get transaction
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "7",
"method": "getTransaction",
"params": {
"txid": "0x1683454a7ef50786a9e5a81ac7f7f8f83f449ec813903c0b8356f230a7635809"
}
}Response: 200
{
"id": "7",
"data": {
"txid": "0x1683454a7ef50786a9e5a81ac7f7f8f83f449ec813903c0b8356f230a7635809",
"vin": [
{
"n": 0,
"addresses": [
"0xEeAec2b48DD972067e3130EC1c2E4769BC6788f3"
],
"isAddress": true
}
],
"vout": [
{
"value": "0",
"n": 0,
"addresses": [
"0x3508DcA95a64C9378Cb07eF6F40553A50905372a"
],
"isAddress": true
}
],
"blockHash": "0xfaa7795c104328ecc6570003cbd44ecd823fac920cba7ef0ec878215ccc78d76",
"blockHeight": 114741356,
"confirmations": 1842,
"blockTime": 1786194107,
"value": "0",
"fees": "258752221800000",
"tokenTransfers": [
{
"type": "BEP20",
"standard": "BEP20",
"from": "0xEeAec2b48DD972067e3130EC1c2E4769BC6788f3",
"to": "0x3508DcA95a64C9378Cb07eF6F40553A50905372a",
"contract": "0x3e4A3c668Bf07727b0E27179380B605f91bd7777",
"name": "Finance doesn't care",
"symbol": "FDC",
"decimals": 18,
"value": "49247907781669834776404203"
},
{
"type": "BEP20",
"standard": "BEP20",
"from": "0x3508DcA95a64C9378Cb07eF6F40553A50905372a",
"to": "0xe2cE6ab80874Fa9Fa2aAE65D277Dd6B8e65C9De0",
"contract": "0x3e4A3c668Bf07727b0E27179380B605f91bd7777",
"name": "Finance doesn't care",
"symbol": "FDC",
"decimals": 18,
"value": "49247907781669834776404203"
}
],
"ethereumSpecific": {
"status": 1,
"nonce": 22813,
"gasLimit": 914642,
"gasUsed": 457321,
"gasPrice": "565800000",
"effectiveGasPrice": "565800000",
"data": "0x0b3f5cf90000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028bca66e2c3e7a6e2860eb000000000000000000000000000000000000000000000000000a34623a9b30080000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000003e4a3c668bf07727b0e27179380b605f91bd7777000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"parsedData": {
"methodId": "0x0b3f5cf9",
"name": ""
},
"internalTransfers": [
{
"type": 0,
"from": "0xe2cE6ab80874Fa9Fa2aAE65D277Dd6B8e65C9De0",
"to": "0x8a08D98CBB218fceB318Ecf3aBc1BA43D8A7aB0E",
"value": "2984255856410206"
},
{
"type": 0,
"from": "0xe2cE6ab80874Fa9Fa2aAE65D277Dd6B8e65C9De0",
"to": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"value": "8206703605128068"
}
]
},
"addressAliases": {
"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c": {
"Type": "Contract",
"Alias": "Wrapped BNB"
}
}
}
}Get transaction specific
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "8",
"method": "getTransactionSpecific",
"params": {
"txid": "0x1683454a7ef50786a9e5a81ac7f7f8f83f449ec813903c0b8356f230a7635809"
}
}Response: 200
{
"id": "8",
"data": {
"tx": {
"nonce": "0x591d",
"gasPrice": "0x21b96c40",
"baseFeePerGas": "0x0",
"gas": "0xdf4d2",
"to": "0x3508DcA95a64C9378Cb07eF6F40553A50905372a",
"value": "0x0",
"input": "0x0b3f5cf90000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028bca66e2c3e7a6e2860eb000000000000000000000000000000000000000000000000000a34623a9b30080000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000003e4a3c668bf07727b0e27179380b605f91bd7777000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"hash": "0x1683454a7ef50786a9e5a81ac7f7f8f83f449ec813903c0b8356f230a7635809",
"blockNumber": "0x6d6d06c",
"blockHash": "0xfaa7795c104328ecc6570003cbd44ecd823fac920cba7ef0ec878215ccc78d76",
"from": "0xEeAec2b48DD972067e3130EC1c2E4769BC6788f3",
"transactionIndex": "0xa"
},
"receipt": {
"gasUsed": "0x6fa69",
"effectiveGasPrice": "0x21b96c40",
"status": "0x1",
"logs": [
{
"address": "0x3e4A3c668Bf07727b0E27179380B605f91bd7777",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000eeaec2b48dd972067e3130ec1c2e4769bc6788f3"
],
"data": "0x00000000000000000000000000000000000000000028bca66e2c3e7a6e2860eb"
},
{
"address": "0xf84781a39a56cf83Beaad5Ee5f4a33FeF5fA94C3",
"topics": [
"0x958648f1075e43b4e661b739150bd66c627e356790e068b3d6ca6b179bd4faa4",
"0x0000000000000000000000003e4a3c668bf07727b0e27179380b605f91bd7777"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
]
}
}
}Estimate fee
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"9","method":"estimateFee","params":{"blocks":[2,6]}}Response: 200
{
"id": "9",
"data": [
{
"feePerTx": "2689650000000",
"feePerUnit": "50000000",
"feeLimit": "53793",
"eip1559": {
"baseFeePerGas": "0",
"low": {
"maxFeePerGas": "50500002",
"maxPriorityFeePerGas": "50500002"
},
"medium": {
"maxFeePerGas": "75164937",
"maxPriorityFeePerGas": "75164937"
},
"high": {
"maxFeePerGas": "598903870",
"maxPriorityFeePerGas": "598903870"
},
"instant": {
"maxFeePerGas": "9062500000",
"maxPriorityFeePerGas": "9062500000"
}
}
},
{
"feePerTx": "2689650000000",
"feePerUnit": "50000000",
"feeLimit": "53793",
"eip1559": {
"baseFeePerGas": "0",
"low": {
"maxFeePerGas": "50500002",
"maxPriorityFeePerGas": "50500002"
},
"medium": {
"maxFeePerGas": "75164937",
"maxPriorityFeePerGas": "75164937"
},
"high": {
"maxFeePerGas": "598903870",
"maxPriorityFeePerGas": "598903870"
},
"instant": {
"maxFeePerGas": "9062500000",
"maxPriorityFeePerGas": "9062500000"
}
}
}
]
}Get long term fee rate
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"10","method":"longTermFeeRate","params":{}}Response: 200
{
"id": "10",
"data": {
"error": {
"message": "not supported"
}
}
}Get block filter
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "11",
"method": "getBlockFilter",
"params": {
"scriptType": "",
"blockHash": "c3dbd80e2bd3e8ef8cb7b218d36ae7a8b25162cd1b9967e3fb1c45992df34169"
}
}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://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"12","method":"getMempoolFilters","params":{"scriptType":"","mempool":true}}Response: 200
{
"id": "12",
"data": {
"error": {
"message": "Not supported"
}
}
}Mempool filters are not built on this endpoint, so
entriescomes back empty.
Send transaction
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"13","method":"sendTransaction","params":{"hex":"<signed raw transaction hex>"}}Response: 200
{
"id": "13",
"data": {
"result": "0x1683454a7ef50786a9e5a81ac7f7f8f83f449ec813903c0b8356f230a7635809"
}
}A transaction the backend rejects returns an error object instead, for example
{"id": "13", "data": {"error": {"message": "failed to decode signed transaction"}}}.
Get fiat rates for timestamps
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "14",
"method": "getFiatRatesForTimestamps",
"params": {
"timestamps": [
1578391200
],
"currencies": [
"usd"
]
}
}Response: 200
{
"id": "14",
"data": {
"tickers": [
{
"ts": 1578441600,
"rates": {
"usd": 14.969517
}
}
]
}
}Get fiat rates for tickers list
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"15","method":"getFiatRatesTickersList","params":{"timestamp":1578391200}}Response: 200
{
"id": "15",
"data": {
"ts": 1578441600,
"available_currencies": [
"aed",
"ars"
]
}
}Get current fiat rates
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"16","method":"getCurrentFiatRates","params":{"currencies":["usd"]}}Response: 200
{
"id": "16",
"data": {
"ts": 1786194239,
"rates": {
"usd": 595.59
}
}
}Subscribe new block
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"17","method":"subscribeNewBlock","params":{}}Response: 200
{
"id": "17",
"data": {
"subscribed": true
}
}Unsubscribe new block
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"18","method":"unsubscribeNewBlock","params":{}}Response: 200
{
"id": "18",
"data": {
"subscribed": false
}
}Subscribe new transaction
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"19","method":"subscribeNewTransaction","params":{}}Response: 200
{
"id": "19",
"data": {
"subscribed": true
}
}Unsubscribe new transaction
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"20","method":"unsubscribeNewTransaction","params":{}}Response: 200
{
"id": "20",
"data": {
"subscribed": false
}
}Subscribe address
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "21",
"method": "subscribeAddresses",
"params": {
"addresses": [
"0x0b4fC8e0FEb6D9a7Afe7182c73083Ed3dd7a1Afe"
]
}
}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://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"22","method":"unsubscribeAddresses","params":{}}Response: 200
{
"id": "22",
"data": {
"subscribed": false
}
}Subscribe new fiat rates
Copied!wss://bsc-blockbook.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://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"24","method":"unsubscribeFiatRates","params":{}}Response: 200
{
"id": "24",
"data": {
"subscribed": false
}
}Get block
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"25","method":"getBlock","params":{"id":"107227326","page":1}}Response: 200
{
"id": "25",
"data": {
"error": {
"message": "Not supported"
}
}
}Not supported on this endpoint. Account-based networks have no per-block transaction index for this method.
Get block filters batch
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "26",
"method": "getBlockFiltersBatch",
"params": {
"scriptType": "",
"bestKnownBlockHash": "c3dbd80e2bd3e8ef8cb7b218d36ae7a8b25162cd1b9967e3fb1c45992df34169",
"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://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "27",
"method": "getContractInfo",
"params": {
"contract": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
}
}Response: 200
{
"id": "27",
"data": {
"type": "BEP20",
"standard": "BEP20",
"contract": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"name": "Wrapped BNB",
"symbol": "WBNB",
"decimals": 18,
"rates": {
"baseRate": 0.9633355140686035
},
"blockHeight": 114743283
}
}RPC call
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "28",
"method": "rpcCall",
"params": {
"to": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"data": "0x18160ddd"
}
}Response: 200
{
"id": "28",
"data": {
"data": "0x0000000000000000000000000000000000000000000175d93a1a9ad4a3420284"
}
}Passthrough for
eth_call: send the contract address intoand the ABI-encoded call indata. The example above callstotalSupply().