Blockbook WSS
Connect to wss://bsc-blockbook.nownodes.io/wss/{{api_key}} with your NOWNodes API key in the path. Requests are {"id", "method", "params"}} objects sent as text messages; responses are {"id", "data"} objects on the same connection and may arrive out of order. Subscription notifications are pushed with the id of the subscribe request that created them. The handshake is rejected without a valid API key.
Get Info
Returns the indexed coin metadata, the current best block and backend version.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"2","method":"getInfo","params":{}}Response: 200
{
"id": "2",
"data": {
"name": "BNB Smart Chain",
"shortcut": "BNB",
"network": "BNB",
"decimals": 18,
"version": "0.6.0",
"bestHeight": 118649762,
"bestHash": "0x4d8cf2a4cdd84037b927b849a6b7342bb526c1853693b2bb76546554820b5fa2",
"block0Hash": "",
"testnet": false,
"backend": {
"version": "Geth/v1.7.8-cdb7548b-20260811/linux-amd64/go1.25.12"
}
}
}Ping
Empty-roundtrip request; replies with an empty data object. Useful as a keep-alive.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"3","method":"ping","params":{}}Response: 200
{
"id": "3",
"data": {}
}Get block hash
Returns the hash of the block at the given height on the main chain. Verified live: heights outside the range kept by this indexer (for example 1000000 or 0 on BSC) return an empty string in hash instead of an error.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"4","method":"getBlockHash","params":{"height":118649759}}Response: 200
{
"id": "4",
"data": {
"hash": "0xcfa6b8cade5001838da97753d8159e086611d9dca232e7d04209c21909f1993d"
}
}Get account info
Returns confirmed and unconfirmed balances, transaction counters and (on EVM chains) the account nonce for a single address. details, tokens, page, pageSize, from, to and contractFilter mirror the REST /api/v2/address parameters.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"5","method":"getAccountInfo","params":{"descriptor":"0xba98d6a5ac827632e3457de7512d211e4ff7e8bd","details":"basic","tokens":"derived","page":null,"pageSize":10,"from":null,"to":null,"contractFilter":""}}Response: 200
{
"id": "5",
"data": {
"address": "0xba98D6a5ac827632E3457De7512d211e4ff7e8bD",
"balance": "0",
"unconfirmedTxs": 0,
"txs": 0,
"nonce": "0"
}
}Get balance history
Returns aggregated balance history for an address or descriptor. from and to are Unix timestamps; groupBy is the aggregation interval in seconds (default 3600); currencies filters fiat rates. Verified live: an address without history returns an empty array, and a range that spans more than 1000000 transactions is rejected with a data.error message. Live error example for an over-wide range: "balance history spans more than 1000000 transactions in the requested range; narrow the from/to range".
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"7","method":"getBalanceHistory","params":{"descriptor":"0xba98d6a5ac827632e3457de7512d211e4ff7e8bd","from":null,"to":null,"currencies":[""],"groupBy":null}}Response: 200
{
"id": "7",
"data": []
}Get transaction
Returns a normalized transaction by hash. For an unknown hash the socket replies with data.error (message "Transaction ... not found").
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"9","method":"getTransaction","params":{"txid":"0xbbce39214e80e3b5e80c34dbd20247e725f28171118b5e67ae88e284752bef15"}}Response: 200
{
"id": "9",
"data": {
"txid": "0xbbce39214e80e3b5e80c34dbd20247e725f28171118b5e67ae88e284752bef15",
"vin": [
{
"n": 0,
"addresses": [
"0xfD8CeD47a3eDA557AF470E04A877aaf6560Fe469"
],
"isAddress": true
}
],
"vout": [
{
"value": "0",
"n": 0,
"addresses": [
"0x1266C6bE60392A8Ff346E8d5ECCd3E69dD9c5F20"
],
"isAddress": true
}
],
"blockHash": "0xa5ca4eb31036d2df8e857a4dcb6b7bc065be17c7b6a7d5d8e6cd9d57c242b249",
"blockHeight": 118649402,
"confirmations": 363,
"blockTime": 1787953321,
"value": "0",
"fees": "0",
"ethereumSpecific": {
"status": 1,
"nonce": 0,
"gasLimit": 55000,
"gasUsed": 51840,
"gasPrice": "0",
"data": "0x426c6f636b206275696c7420627920426c6f636b52617a6f720a0ae29a99efb88f20506f776572696e6720486967682d506572666f726d616e636520496e66726173747275637475726520666f7220424e4220436861696e0a5b68747470733a2f2f7777772e626c6f636b72617a6f722e696f5d0a0af09f9ba120476f205072697661746520e280942046756c6c2050726976616379205472616e73616374696f6e205375626d697373696f6e205250430a5a65726f206c6f67732e205a65726f20646973636c6f737572652e0a5b68747470733a2f2f707269766163792e6273632e626c6f636b72617a6f722e78797a5d0a0af09f92b02047657420526566756e6420e28094204d45562d50726f746563746564205472616e73616374696f6e205375626d697373696f6e20525043207769746820526566756e64730a50726f74656374206576657279207472616e73616374696f6e2e204361707475726520796f7572207368617265206f66204d45562e0a5b68747470733a2f2f726566756e642e6273632e626c6f636b72617a6f722e78797a5d0a0af09f93a1204361707475726520416c706861204265666f72652074686520436f6d7065746974696f6e0a46617374657374204d656d706f6f6c2053747265616d20c2b7204e657720426c6f636b7320c2b7204e6f64652053747265616d0a4561726c696572207369676e616c732c20667265736865722073746174652c20616e6420726573696c69656e7420696e667261737472756374757265e280946275696c7420746f20696d70726f76652073747261746567792077696e2072617465732c20657865637574696f6e2072656c696162696c6974792c20616e6420726576656e756520636170747572652e0a5b68747470733a2f2f646f63732e626c6f636b72617a6f722e696f2f73747265616d732f6f766572766965775d0a0a436f6e746163743a20446973636f7264205b68747470733a2f2f646973636f72642e67672f516241477078583642365d207c204244205b68747470733a2f2f742e6d652f6d72416c6578444b5d",
"parsedData": {
"methodId": "0x426c6f63",
"name": ""
}
}
}
}Get transaction specific
Returns the transaction in the backend (geth) format, wrapped in data.tx together with the receipt in data.receipt. For an unknown hash the socket replies with data.error ("Tx not found").
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"10","method":"getTransactionSpecific","params":{"txid":"0xbbce39214e80e3b5e80c34dbd20247e725f28171118b5e67ae88e284752bef15"}}Response: 200
{
"id": "10",
"data": {
"tx": {
"nonce": "0x0",
"gasPrice": "0x0",
"baseFeePerGas": "0x0",
"gas": "0xd6d8",
"to": "0x1266C6bE60392A8Ff346E8d5ECCd3E69dD9c5F20",
"value": "0x0",
"input": "0x426c6f636b206275696c7420627920426c6f636b52617a6f720a0ae29a99efb88f20506f776572696e6720486967682d506572666f726d616e636520496e66726173747275637475726520666f7220424e4220436861696e0a5b68747470733a2f2f7777772e626c6f636b72617a6f722e696f5d0a0af09f9ba120476f205072697661746520e280942046756c6c2050726976616379205472616e73616374696f6e205375626d697373696f6e205250430a5a65726f206c6f67732e205a65726f20646973636c6f737572652e0a5b68747470733a2f2f707269766163792e6273632e626c6f636b72617a6f722e78797a5d0a0af09f92b02047657420526566756e6420e28094204d45562d50726f746563746564205472616e73616374696f6e205375626d697373696f6e20525043207769746820526566756e64730a50726f74656374206576657279207472616e73616374696f6e2e204361707475726520796f7572207368617265206f66204d45562e0a5b68747470733a2f2f726566756e642e6273632e626c6f636b72617a6f722e78797a5d0a0af09f93a1204361707475726520416c706861204265666f72652074686520436f6d7065746974696f6e0a46617374657374204d656d706f6f6c2053747265616d20c2b7204e657720426c6f636b7320c2b7204e6f64652053747265616d0a4561726c696572207369676e616c732c20667265736865722073746174652c20616e6420726573696c69656e7420696e667261737472756374757265e280946275696c7420746f20696d70726f76652073747261746567792077696e2072617465732c20657865637574696f6e2072656c696162696c6974792c20616e6420726576656e756520636170747572652e0a5b68747470733a2f2f646f63732e626c6f636b72617a6f722e696f2f73747265616d732f6f766572766965775d0a0a436f6e746163743a20446973636f7264205b68747470733a2f2f646973636f72642e67672f516241477078583642365d207c204244205b68747470733a2f2f742e6d652f6d72416c6578444b5d",
"hash": "0xbbce39214e80e3b5e80c34dbd20247e725f28171118b5e67ae88e284752bef15",
"blockNumber": "0x712723a",
"blockHash": "0xa5ca4eb31036d2df8e857a4dcb6b7bc065be17c7b6a7d5d8e6cd9d57c242b249",
"from": "0xfD8CeD47a3eDA557AF470E04A877aaf6560Fe469",
"transactionIndex": "0x0"
},
"receipt": {
"gasUsed": "0xca80",
"effectiveGasPrice": "0x0",
"status": "0x1",
"logs": []
}
}
}Estimate fee
Returns one fee estimate per requested confirmation target (in blocks): feePerTx and feePerUnit in wei and the gas feeLimit.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"11","method":"estimateFee","params":{"blocks":[2,5,10,20]}}Response: 200
{
"id": "11",
"data": [
{
"feePerTx": "2689650000000",
"feePerUnit": "50000000",
"feeLimit": "53793"
},
{
"feePerTx": "2689650000000",
"feePerUnit": "50000000",
"feeLimit": "53793"
},
{
"feePerTx": "2689650000000",
"feePerUnit": "50000000",
"feeLimit": "53793"
},
{
"feePerTx": "2689650000000",
"feePerUnit": "50000000",
"feeLimit": "53793"
}
]
}Send transaction
WRITE OPERATION. The success scenario is intentionally not executed and not documented from a live broadcast; only the validation-error scenario was verified live. On success the reply is expected to contain the broadcast transaction id in data.result. Live-verified error (safe invalid payload "zz-not-hex"): data.error.message explains that BSC raw transactions must be hex strings with a 0x prefix. Success scenario not executed intentionally; error scenario validated with a safely invalid payload.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"1","method":"sendTransaction","params":{"hex":"zz-not-hex"}}Response: 200
{
"id": "1",
"data": {
"error": {
"message": "invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go value of type hexutil.Bytes"
}
}
}Get fiat rates for timestamps
Returns rate tickers for the requested Unix timestamps. When no exact rate exists for a timestamp, the closest available one is returned (live: a request for 1676591569 returned the rate stamped 1748908800).
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"13","method":"getFiatRatesForTimestamps","params":{"timestamps":[1575288000],"currencies":["usd"]}}Response: 200
{
"id": "13",
"data": {
"tickers": [
{
"ts": 1748908800,
"rates": {
"usd": 666.0561
}
}
]
}
}Get fiat rates for tickers list
Returns the currency codes available for the requested timestamp together with the actual rate timestamp used.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"15","method":"getFiatRatesTickersList","params":{"timestamp":1676591569}}Response: 200
{
"id": "15",
"data": {
"ts": 1748908800,
"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"
]
}
}Get current fiat rates
Returns the most recent rates for the requested currencies; omitting the filter returns all currencies.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"6","method":"getCurrentFiatRates","params":{"currencies":["usd"]}}Response: 200
{
"id": "6",
"data": {
"ts": 1787953400,
"rates": {
"usd": 688.28
}
}
}Subscribe new block
After subscribing, one notification per block is pushed with the id of this request. Notification data (live capture): {"height", "hash", "evmData": {"baseFeePerGas", "blockGasUsed", "blockGasLimit"}}. BSC produces blocks sub-second. Live notification example: {"id": "16", "data": {"height": 118649769, "hash": "0x69a49b5243b268bb150354ad1ab3182d7bbd458d12d8324ca3781ad953136bf7", "evmData": {"baseFeePerGas": "0", "blockGasUsed": "17245715", "blockGasLimit": "55000000"}}}.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"16","method":"subscribeNewBlock","params":{}}Response: 200
{
"id": "16",
"data": {
"subscribed": true
}
}Unsubscribe new block
Cancels the matching subscription; the reply contains {"subscribed": false}.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"160","method":"unsubscribeNewBlock","params":{}}Response: 200
{
"id": "160",
"data": {
"subscribed": false
}
}Subscribe new transaction
After subscribing, a notification is pushed for every transaction entering the mempool, with the id of this request. Notification data (live capture) is a normalized transaction: txid, vin, vout and related fields. Live notification data example: {"txid": "0x1709a081629b22b2b26eb4a2dbcd9c67356b50fd3361a0b8e9c7165195d17e64", "vin": [{"n": 0, "addresses": ["0x79370CC8e1FDf2653a7dde9d6D38f819936471F9"], "isAddress": true}], "vout": [{"value": "0", "n": 0, "addresses": ["0xb300000b72DEAEb607a12d5f54773D1C19c7028d"], "isAddress": true}]} (truncated).
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"17","method":"subscribeNewTransaction","params":{}}Response: 200
{
"id": "17",
"data": {
"subscribed": true
}
}Unsubscribe new transaction
Cancels the matching subscription; the reply contains {"subscribed": false}.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"170","method":"unsubscribeNewTransaction","params":{}}Response: 200
{
"id": "170",
"data": {
"subscribed": false
}
}Subscribe address
Subscribes to balance and transaction updates for the listed addresses. newBlockTxs=true also pushes transactions touching the addresses while they are in the mempool. Notifications arrive with the id of this request and contain the updated address state.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"18","method":"subscribeAddresses","params":{"addresses":["0xba98d6a5ac827632e3457de7512d211e4ff7e8bd"],"newBlockTxs":true}}Response: 200
{
"id": "18",
"data": {
"subscribed": true
}
}Unsubscribe address
Cancels the matching subscription; the reply contains {"subscribed": false}.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"180","method":"unsubscribeAddresses","params":{}}Response: 200
{
"id": "180",
"data": {
"subscribed": false
}
}Subscribe new fiat rates
Subscribes to rate updates for one currency; notifications arrive with the id of this request.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"19","method":"subscribeFiatRates","params":{"currency":"usd"}}Response: 200
{
"id": "19",
"data": {
"subscribed": true
}
}Unsubscribe new fiat rates
Cancels the matching subscription; the reply contains {"subscribed": false}.
Copied!wss://bsc-blockbook.nownodes.io/wss/{{api_key}}
Body
{"id":"190","method":"unsubscribeFiatRates","params":{}}Response: 200
{
"id": "190",
"data": {
"subscribed": false
}
}