⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

chain_subscribeFinalizedHeads - JSON-RPC Method

Description

Subscribe to finalized block headers. Requires WebSocket.

Examples

const ws = new WebSocket('wss://api-acala.n.dwellir.com/YOUR_API_KEY');
ws.onopen = () => {
ws.send(JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'chain_subscribeFinalizedHeads',
params: []
}));
};
ws.onmessage = (e) => console.log(JSON.parse(e.data));