Skip to content

eth_gasPrice ​

served · same as reth

Returns a gas price for a legacy transaction, in wei. It is the latest base fee plus a suggested tip.

When to use ​

Use it to set gasPrice on a legacy transaction. For an EIP-1559 transaction, use eth_maxPriorityFeePerGas and eth_feeHistory.

Example ​

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_gasPrice", "params": []}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice",
  "params": []
}

Response ​

Live mainnet, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x7965569"
}

The answer changes with time, so it is compared by shape (keys and types; for a list, its first item), not by value.

Full response

Parameters ​

None.

Returns ​

The price in wei as a hex number.

Notes and limits ​

  • The tip comes from the gas price oracle of reth. It reads the 3 lowest tips of each of the last 20 blocks with transactions.
  • The oracle skips the transactions of the block producer. It takes the 60th percentile of the tips, at most 500 gwei.
  • The oracle looks back at most 2 048 blocks, and only at blocks that the node has.

Compared with reth ​

The same oracle as reth, with the same constants (20 blocks, 3 samples, 60th percentile, 500 gwei maximum).

The live example above gives the same answer on Cinder and on reth 2.7.

eth_maxPriorityFeePerGas, eth_feeHistory, eth_blobBaseFee.

Schema (OpenRPC) ​

The official specification: eth_gasPrice in ethereum/execution-apis.

Result: string
json
{
  "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
  "title": "Gas price",
  "type": "string"
}