Establish a websocket connection to the node to receive real-time updates on new blocks.
This endpoint can also be used to resume a subscription from a specific point in time.
Example:
const ws = new WebSocket('ws://localhost:8669/subscriptions/block')
ws.onmessage = (event) => {
console.log(event.data)
}
/subscriptions/block
A saved block ID for resuming the subscription. If omitted, the best block ID is assumed.
Note: If the provided position is too far behind the best block, a 403 error will be thrown. The allowable difference depends on the configuration of each node.
See the argument api-backtrace-limit
when starting a node.
^(0x)?[0-9a-fA-F]{64}$