You can now fetch gas price and fee estimates using Gas Price API to optimize transaction execution, avoid unnecessary costs, and prevent your transactions from getting stuck in the mempool.
Once you send a request, tenderly_gasPrice and tenderly_suggestGasFees return estimates with three probability levels for inclusion in the next block:
- High probability
- Medium probability
- Low probability
Additionally, every estimate includes:
maxPriorityFeePerGasmaxFeePerGaswaitTime
Take a look at the example Gas Price API response and head over to the documentation to get started.
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"currentBlockNumber": "0x149d2bb",
"baseFeePerGas": "0x1ae83fb67",
"price": {
"low": {
"maxPriorityFeePerGas": "0x2e52175",
"maxFeePerGas": "0x25c18920d",
"waitTime": 36000
},
"medium": {
"maxPriorityFeePerGas": "0x203158d5",
"maxFeePerGas": "0x284ee83f4",
"waitTime": 24000
},
"high": {
"maxPriorityFeePerGas": "0x2709e6e0",
"maxFeePerGas": "0x28e794289",
"waitTime": 12000
}
}
}
}