Skip to main content
Plasma API method that returns the current price per gas in Wei.

Parameters

None

Response

  • quantity — the current gas price in Wei

eth_gasPrice code examples

const { JsonRpcProvider } = require("ethers");

const provider = new JsonRpcProvider("CHAINSTACK_NODE_URL");

async function call() {
  const result = await provider.send("eth_gasPrice", []);
  console.log(result);
}

call();