eth_gasPrice

Returns the current gas price on the network in wei.

Ethereum.org API Reference

Parameters

None

Returns

QUANTITY - integer of the current gas price in wei.

Example

Request

curl --request POST \
     --url https://endpoints.omniatech.io/v1/RPC_ENDPOINT \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_gasPrice"
}
'

Response

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x1dfd14000" // 8049999872 Wei
}

Last updated