Wei and gwei
Last updated:
The RPC method
eth_gasPrice: Returns the current gas price in wei as a hex quantity. 1 gwei = 1,000,000,000 wei (10^9), so divide by 10^9 for gwei; 1 ETH = 10^18 wei. eth_gasPrice reference →
Applies to: EVM chains
In more detail
JSON-RPC returns balances, values and gas prices in wei as hex quantities, so they must be converted before display. Gwei is often used to describe gas costs on Ethereum.