/blocks/{blockId}/header REST API Endpoint
Parâmetros do caminho
blockId
cadeia de caracteres
OBRIGATÓRIO
Carregando...
Devoluções
número
cadeia de caracteres
Carregando...
parentHash
cadeia de caracteres
Carregando...
stateRoot
cadeia de caracteres
Carregando...
extrinsicRoot
cadeia de caracteres
Carregando...
digest
objeto
Carregando...
registos
matriz
Carregando...
preRuntime
matriz
Carregando...
seal
matriz
Carregando...
extrinsics
cadeia de caracteres
Carregando...
Pedido
1# AssetHub (default) - for block header from AssetHub parachain2curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/blocks/0x409d0bfe677594d7558101d574633d5808a6fc373cbd964ef236f00941f290ee/header' \3--header 'Accept: application/json'45# Polkadot Relaychain - for block header from Relaychain (requires /rc prefix)6curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/blocks/0x409d0bfe677594d7558101d574633d5808a6fc373cbd964ef236f00941f290ee/header' \7--header 'Accept: application/json'
1# AssetHub (default) - for block header from AssetHub parachain2curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/blocks/0x409d0bfe677594d7558101d574633d5808a6fc373cbd964ef236f00941f290ee/header' \3--header 'Accept: application/json'45# Polkadot Relaychain - for block header from Relaychain (requires /rc prefix)6curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/blocks/0x409d0bfe677594d7558101d574633d5808a6fc373cbd964ef236f00941f290ee/header' \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 = {7método: "GET",8cabeçalhos: myHeaders,9redirecionar: "seguir"10};1112fetch("https://docs-demo.dot-mainnet.quiknode.pro/blocks/0x409d0bfe677594d7558101d574633d5808a6fc373cbd964ef236f00941f290ee/header", 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 = {7método: "GET",8cabeçalhos: myHeaders,9redirecionar: "seguir"10};1112fetch("https://docs-demo.dot-mainnet.quiknode.pro/blocks/0x409d0bfe677594d7558101d574633d5808a6fc373cbd964ef236f00941f290ee/header", requestOptions)13.then((response) => response.text())14.then((result) => console.log(result))15.catch((error) => console.error(error));16
1importar pedidos2# 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/0x409d0bfe677594d7558101d574633d5808a6fc373cbd964ef236f00941f290ee/header"6carga útil = {}7cabeçalhos = {8«Aceitar»: 'application/json'9}1011resposta = pedidos.pedido("GET", url, headers=headers, dados=carga útil)12imprimir(resposta.texto)13
1importar pedidos2# 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/0x409d0bfe677594d7558101d574633d5808a6fc373cbd964ef236f00941f290ee/header"6carga útil = {}7cabeçalhos = {8«Aceitar»: 'application/json'9}1011resposta = pedidos.pedido("GET", url, headers=headers, dados=carga útil)12imprimir(resposta.texto)13
1exigir "uri"2necessita de "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/0x409d0bfe677594d7558101d574633d5808a6fc373cbd964ef236f00941f290ee/header")78https = Net::HTTP.novo(url.host, url.porta)9https.use_ssl = true1011pedido = Líquido::HTTP::Get.novo(url)1213resposta = https.pedido(pedido)14insere a resposta.read_body15
1exigir "uri"2necessita de "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/0x409d0bfe677594d7558101d574633d5808a6fc373cbd964ef236f00941f290ee/header")78https = Net::HTTP.novo(url.host, url.porta)9https.use_ssl = true1011pedido = Líquido::HTTP::Get.novo(url)1213resposta = https.pedido(pedido)14insere a resposta.read_body15
Ainda não tem uma conta?
Crieendpoint seuendpoint Quicknode endpoint segundos e comece a desenvolver
Comece gratuitamente