We're now supporting Polygon zkEVM!
Learn more here.


eth-v1-beacon-headers-{block_id} REST API Endpoint


  1. block_id - string - The state identifier. It can be one of: head (canonical head in node's view), genesis, finalized, justified, slot and blockRoot {hex encoded blockRoot with 0x prefix}


  1. execution_optimistic - Boolean - It's true if the response references an unverified execution payload. The optimistic information may be invalidated at a later time. If the field is not present, assume the false value
  2. data - The object with the following fields:

    root - string - The root hash

    canonical - boolean - The head in node's view

    header - array - The SignedBeaconBlockHeader object envelope from the CL spec

    message - array - The BeaconBlockHeader object from the CL spec

    slot - string - The slot to which this block corresponds

    proposer_index - string - The index of validator in validator registry

    parent_root - string - The signing merkle root of the parent BeaconBlock

    state_root - string - The tree hash merkle root of the BeaconState for the BeaconBlock

    body_root - string - The tree hash merkle root of the BeaconBlockBody for the BeaconBlock

    signature - string - The signature

Code Examples:

require "uri"
require "net/http"

url = URI("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/eth/v1/beacon/headers/head")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"

response = https.request(request)
puts response.read_body
Ready to get started? Create a free account