Skip to main content
The RPC API enables you to query the gas price for a specific block or hash.

Quick Reference

ParameterTypeDescription
block_heightnumberSpecific block height to query gas price for
block_hashstringSpecific block hash to query gas price for
nullnullReturns gas price for the latest block

Gas Price

Returns gas price for a specific block_height or block_hash. Using [null] will return the most recent block’s gas price.
  • method: gas_price
  • params: [block_height], ["block_hash"], or [null]
{
  "jsonrpc": "2.0",
  "id": "dontcare",
  "method": "gas_price",
  "params": [null]
}
{
  "jsonrpc": "2.0",
  "id": "dontcare",
  "result": {
    "gas_price": "100000000"
  }
}