Home

Get block hash

POST
wss://bsc-blockbook.nownodes.io/wss/{api_key}

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.

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":"4","method":"getBlockHash","params":{"height":118649759}}

Body

application/json
object

Parameters

api_keystringrequiredpath

Your NOWNodes API key.

Response

200OK

A successful response.