Retrieves the best finalized header via subscription

The most recent completed block headers can be tracked in real time with the help of the chain_subscribeFinalisedHeads function. It creates a subscription that delivers the header information of the most recent blocks that have been finalized on a regular basis. Clients who require the most recent blockchain information without continuous polling may find this especially helpful.

Same results for method chain_subscribeFinalizedHeads!

Example Request and Result for chain_subscribeFinalisedHeads method

In this section, we provide an illustrative example of a request made to retrieve details contents using the chain_subscribeFinalisedHeads method. Additionally, we present the resulting response containing information about getting the best finalised header using WS subscription.


The example in this section uses a non-existing project id.

Make sure you replace it with your Vara Mainnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Retrieves the best finalised header via subscription

POST wss://<project-id>

Request Body

  "jsonrpc": "2.0",
  "method": "chain_finalizedHead",
  "params": {
    "subscription": "ADzDUxSGHfHjOmV8",
    "result": {
      "parentHash": "0xd5264b5847c8684d07995a2738352cc612213d533679951507d3d6fafbb42369",
      "number": "0x99c60a",
      "stateRoot": "0x84ed19f2da6442f66c553c71d9c6d5f913c4c6b4814b975e9d39acc79ac88918",
      "extrinsicsRoot": "0x238409ab3461eb6b2064a0139a8b32cc337d3fb84b5cc2db7285a12090596125",
      "digest": {
        "logs": [

Curl Request example

wscat -c 'wss://<project-id>' 
# wait for connection
    "id": 1,
    "jsonrpc": "2.0",
    "method": "chain_subscribeFinalisedHeads",
    "params": []

Last updated