🚀 We’re excited to announce our $35m Series A led by Tiger Global: Press Release, Coindesk, Bloomberg, Business Insider & RefreshMiami!

Contents

eth_gasPrice RPC method

Parameters:

  1. None

Returns:

  1. Result - Integer value of current gas price in wei.

Code Examples:

const ethers = require("ethers");
(async () => {
  const provider = new ethers.providers.JsonRpcProvider("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/");
  const gasPrice = await provider.getGasPrice();
  console.log(gasPrice);
})();
Ready to try QuickNode? Start your 7-day free trial