/blocks/head/header REST API Endpoint
Path Parameters
Query Parameters
finalized
boolean
Loading...
Returns
number
string
Loading...
parentHash
string
Loading...
stateRoot
string
Loading...
extrinsicRoot
string
Loading...
digest
object
Loading...
logs
array
Loading...
preRuntime
array
Loading...
seal
array
Loading...
consensus
array
Loading...
Request
1# AssetHub (default) - for head block header from AssetHub parachain2curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/blocks/head/header?finalized=true' \3--header 'Accept: application/json'45# Polkadot Relaychain - for head block header from Relaychain (requires /rc prefix)6curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/blocks/head/header?finalized=true' \7--header 'Accept: application/json'
1# AssetHub (default) - for head block header from AssetHub parachain2curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/blocks/head/header?finalized=true' \3--header 'Accept: application/json'45# Polkadot Relaychain - for head block header from Relaychain (requires /rc prefix)6curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/blocks/head/header?finalized=true' \7--header 'Accept: application/json'
1// For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)23const myHeaders = new Headers();4myHeaders.append("Accept", "application/json");56const requestOptions = {7method: "GET",8headers: myHeaders,9redirect: "follow"10};1112fetch("https://docs-demo.dot-mainnet.quiknode.pro/blocks/head/header?finalized=true", requestOptions)13.then((response) => response.text())14.then((result) => console.log(result))15.catch((error) => console.error(error));16
1// For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)23const myHeaders = new Headers();4myHeaders.append("Accept", "application/json");56const requestOptions = {7method: "GET",8headers: myHeaders,9redirect: "follow"10};1112fetch("https://docs-demo.dot-mainnet.quiknode.pro/blocks/head/header?finalized=true", requestOptions)13.then((response) => response.text())14.then((result) => console.log(result))15.catch((error) => console.error(error));16
1import requests2# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)345url = "https://docs-demo.dot-mainnet.quiknode.pro/blocks/head/header?finalized=True"6payload = {}7headers = {8'Accept': 'application/json'9}1011response = requests.request("GET", url, headers=headers, data=payload)12print(response.text)13
1import requests2# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)345url = "https://docs-demo.dot-mainnet.quiknode.pro/blocks/head/header?finalized=True"6payload = {}7headers = {8'Accept': 'application/json'9}1011response = requests.request("GET", url, headers=headers, data=payload)12print(response.text)13
1require "uri"2require "net/http"3# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)456url = URI("https://docs-demo.dot-mainnet.quiknode.pro/blocks/head/header?finalized=true")78https = Net::HTTP.new(url.host, url.port)9https.use_ssl = true1011request = Net::HTTP::Get.new(url)1213response = https.request(request)14puts response.read_body15
1require "uri"2require "net/http"3# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)456url = URI("https://docs-demo.dot-mainnet.quiknode.pro/blocks/head/header?finalized=true")78https = Net::HTTP.new(url.host, url.port)9https.use_ssl = true1011request = Net::HTTP::Get.new(url)1213response = https.request(request)14puts response.read_body15
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free