Portal
Search…
eth_gasPrice
Returns the current gas price oracle. The gas price is determined by the last few blocks median gas price.
1
web3.eth.getGasPrice([callback])
Copied!

Returns

Number string of the current gas price in wei

Example

1
> web3.eth.getGasPrice().then(console.log)
2
> 1000000000
Copied!
Last modified 9mo ago
Copy link