Get the current gas price
GET/:network/chain/gas-price
Get the current gas price
Request
Path Parameters
Blockchain network name or chain id
Query Parameters
Possible values: [native_transfer
, erc20_transfer
, swap
]
Type of transaction: native token transfer, ERC20 transfer, or swap.
From address for the transaction
To address for the transaction
Amount to transfer
Transaction data
RLP encoded transaction with hex prefix
Custom gas limit for the transaction
Optional block number for which the balance is requested. Provide only block height or timestamp you want to check for.
Optional Date timestamp for which the balance is requested (ISO 8601 format). Provide only block height or timestamp you want to check for.
The id of your project. Can be found in your Histori dashboard.
Responses
- 200
- 400
The current gas price object.
- application/json
- Schema
- Example (from schema)
Schema
Blockchain network name For the requested query
The chain ID of the network.
The block height (block number).
The type of transaction (e.g., native_transfer, erc20_transfer, swap).
The amount of gas required for the transaction.
The gas price in wei.
The gas price in gwei.
The gas price in ETH.
The fee cost in wei.
The fee cost in gwei.
The fee cost in ETH.
The tip cost in wei.
The tip cost in gwei.
The tip cost in ETH.
The currency used (e.g., USD).
The fee cost in traditional currency. This goes to the miner/proposer of the block for the network.
The tip cost in traditional currency. This is paid as priority fee to builders for faster transaction inclusions.
The cost for single compute unit (gas) in traditional currency.
The cost for the whole execution of the logic on the specified network in traditional currency.
The total cost for execution in traditional currency.
{
"network_name": "eth-mainnet",
"chain_id": 1,
"block_height": 20950751,
"event_type": "native_transfer",
"gas_required": "21000",
"gas_cost_wei": "13216708294",
"gas_cost_gwei": "13.216708294",
"gas_cost_eth": "0.000000013216708294",
"fee_wei": "26432216588",
"fee_gwei": "26.432216588",
"fee_eth": "0.000000026432216588",
"tip_wei": "1200000",
"tip_gwei": "0.0012",
"tip_eth": "0.0000000000012",
"currency": "USD",
"fee_cost": "$0.000207106596",
"tip_cost": "$0.000000031662",
"gas_cost": "$0.000103569129",
"execution_cost": "$2.174951709425",
"total_cost": "$2.175158847683"
}
Failed to fetch gas price.