Skip to main content

gas_price RPC Method

Returns the gas price for a specific block_height or block_hash.

Updated on
Oct 4, 2023

gas_price RPC Method

Parameters

block_height
string
The height of the block
block_hash
string
The hash of the block
null
Using [null] will return the most recent block's gas price

Returns

gas_price
Integer value of the gas price for the specified block
Request
1
curl https://docs-demo.near-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"jsonrpc": "2.0", "method": "gas_price", "params": [null],"id":1}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free