Subscribe new block
POST
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"}}}.
Connection URL:
Copied!
wss://bsc-blockbook.nownodes.io/wss/{{api_key}}Open the connection, then send the message below as a text frame.
Example:
Copied!
wscat -c 'wss://bsc-blockbook.nownodes.io/wss/YOUR_API_KEY'
> {"id":"16","method":"subscribeNewBlock","params":{}}Body
application/json
object
Parameters
api_keystringrequiredpathYour NOWNodes API key.
Response
200OK
A successful response.