eth_feeHistory RPC Method
Parâmetros
blockCount
string/integer
OBRIGATÓRIO
Carregando...
newestBlock
cadeia de caracteres
OBRIGATÓRIO
Carregando...
rewardPercentiles
número inteiro
OBRIGATÓRIO
Carregando...
Devoluções
oldestBlock
Carregando...
taxaBásicaPorGas
Carregando...
gasUsedRatio
Carregando...
reward
Carregando...
Pedido
1curl https://docs-demo.flow-mainnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_feeHistory","params":[4, "latest", [25, 75]],"id":1,"jsonrpc":"2.0"}'
1curl https://docs-demo.flow-mainnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_feeHistory","params":[4, "latest", [25, 75]],"id":1,"jsonrpc":"2.0"}'
1require 'eth'23client = Eth::Client.create 'https://docs-demo.flow-mainnet.quiknode.pro/'4carga útil = {5"jsonrpc": "2.0",6"method": "eth_feeHistory",7"params": [4, "latest", [25, 75]],8"id": "1"9}1011response = client.send(payload.to_json)12puts response
1require 'eth'23client = Eth::Client.create 'https://docs-demo.flow-mainnet.quiknode.pro/'4carga útil = {5"jsonrpc": "2.0",6"method": "eth_feeHistory",7"params": [4, "latest", [25, 75]],8"id": "1"9}1011response = client.send(payload.to_json)12puts response
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider(4"https://docs-demo.flow-mainnet.quiknode.pro/"5);6const response = await provider.send("eth_feeHistory", [4, "latest", [25, 75]]);7console.log(response);8})();
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider(4"https://docs-demo.flow-mainnet.quiknode.pro/"5);6const response = await provider.send("eth_feeHistory", [4, "latest", [25, 75]]);7console.log(response);8})();
1var myHeaders = new Headers();2myHeaders.acrescentar("Content-Type", "application/json");34var raw = JSON.stringify({5"method": "eth_feeHistory",6«params»: [74,8"latest",9[1025,117512]13],14"id": 1,15"jsonrpc": "2.0"16});1718var requestOptions = {19método: 'POST',20cabeçalhos: myHeaders,21body: raw,22redirect: 'follow'23};2425fetch("https://docs-demo.flow-mainnet.quiknode.pro/", requestOptions)26.then(response => response.text())27.then(result => console.log(result))28.catch(error => console.log('error', error));
1var myHeaders = new Headers();2myHeaders.acrescentar("Content-Type", "application/json");34var raw = JSON.stringify({5"method": "eth_feeHistory",6«params»: [74,8"latest",9[1025,117512]13],14"id": 1,15"jsonrpc": "2.0"16});1718var requestOptions = {19método: 'POST',20cabeçalhos: myHeaders,21body: raw,22redirect: 'follow'23};2425fetch("https://docs-demo.flow-mainnet.quiknode.pro/", requestOptions)26.then(response => response.text())27.then(result => console.log(result))28.catch(error => console.log('error', error));
1importar pedidos2import json34url = "https://docs-demo.flow-mainnet.quiknode.pro/"56carga útil = json.dumps({7"method": "eth_feeHistory",8«params»: [94,10"latest",11[1225,137514]15],16"id": 1,17"jsonrpc": "2.0"18})19cabeçalhos = {20'Content-Type': 'application/json'21}2223resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)2425imprimir(resposta.texto)26
1importar pedidos2import json34url = "https://docs-demo.flow-mainnet.quiknode.pro/"56carga útil = json.dumps({7"method": "eth_feeHistory",8«params»: [94,10"latest",11[1225,137514]15],16"id": 1,17"jsonrpc": "2.0"18})19cabeçalhos = {20'Content-Type': 'application/json'21}2223resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)2425imprimir(resposta.texto)26
1exigir "uri"2require "json"3necessita de "net/http"45url = URI("https://docs-demo.flow-mainnet.quiknode.pro/")67https = Net::HTTP.novo(url.host, url.porta)8https.use_ssl = true910pedido = Líquido::HTTP::POST.novo(url)11pedido["Content-Type"] = "application/json"12request.body = JSON.dump({13"method": "eth_feeHistory",14«params»: [154,16"latest",17[1825,197520]21],22"id": 1,23"jsonrpc": "2.0"24})2526resposta = https.pedido(pedido)27insere a resposta.read_body28
1exigir "uri"2require "json"3necessita de "net/http"45url = URI("https://docs-demo.flow-mainnet.quiknode.pro/")67https = Net::HTTP.novo(url.host, url.porta)8https.use_ssl = true910pedido = Líquido::HTTP::POST.novo(url)11pedido["Content-Type"] = "application/json"12request.body = JSON.dump({13"method": "eth_feeHistory",14«params»: [154,16"latest",17[1825,197520]21],22"id": 1,23"jsonrpc": "2.0"24})2526resposta = https.pedido(pedido)27insere a resposta.read_body28
1de web3 import Web3, HTTPProvider2provider = Web3.HTTPProvider("https://docs-demo.flow-mainnet.quiknode.pro/")3result = provider.make_request('eth_feeHistory', [4, "latest", [25, 75]])4print(result)
1de web3 import Web3, HTTPProvider2provider = Web3.HTTPProvider("https://docs-demo.flow-mainnet.quiknode.pro/")3result = provider.make_request('eth_feeHistory', [4, "latest", [25, 75]])4print(result)
Ainda não tem uma conta?
Crieendpoint seuendpoint Quicknode endpoint segundos e comece a desenvolver
Comece gratuitamente