/blocks/head/header REST API Endpoint
路径参数
查询参数
已最终确定
布尔型
正在加载...
退货
数字
字符串
正在加载...
parentHash
字符串
正在加载...
stateRoot
字符串
正在加载...
extrinsicRoot
字符串
正在加载...
digest
对象
正在加载...
日志
数组
正在加载...
preRuntime
数组
正在加载...
seal
数组
正在加载...
consensus
数组
正在加载...
请求
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 = {7方法: "GET",8标题: myHeaders,9重定向: "follow"10};1112fetch("https://docs-demo.dot-mainnet.quiknode.pro/blocks/head/header?finalized=true", requestOptions)13.然后((响应) => 响应.文本())14.然后((结果) => 控制台.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 = {7方法: "GET",8标题: myHeaders,9重定向: "follow"10};1112fetch("https://docs-demo.dot-mainnet.quiknode.pro/blocks/head/header?finalized=true", requestOptions)13.然后((响应) => 响应.文本())14.然后((结果) => 控制台.log(result))15.catch((error) => console.error(error));16
1导入 请求2# 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"6有效载荷 = {}7标题 = {8'Accept': 'application/json'9}1011回复 = 请求.请求("GET", url, headers=headers, data=有效载荷)12打印(响应.text)13
1导入 请求2# 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"6有效载荷 = {}7标题 = {8'Accept': 'application/json'9}1011回复 = 请求.请求("GET", url, headers=headers, data=有效载荷)12打印(响应.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.主机, url.端口)9https.use_ssl = true1011请求 = Net::HTTP::Get.new(url)1213回复 = https.请求(请求)14返回响应.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.主机, url.端口)9https.use_ssl = true1011请求 = Net::HTTP::Get.new(url)1213回复 = https.请求(请求)14返回响应.read_body15