Estimate gas for a transaction
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Simulates a transaction and returns an estimate of how much gas would be used.
State access is limited to recent blocks - these are full nodes, not archive nodes. In practice only the last dozen or so blocks resolve; deeper block parameters return -32000 missing trie node <hash> (path ). earliest also works, since genesis state is kept. Use latest or pending for anything that must not fail: the pruning boundary moves continuously, so a height taken from eth_blockNumber can already be out of range by the time you query it.
Block, transaction and receipt history is complete back to block 1 - only state is pruned.
Changed in the 29 August 2026 network upgrade.
- The search ceiling is capped at the per-transaction gas limit
params.MaxTxGasLimit. A request asking for more is silently capped, so an estimate can now come back lower than the caller'sgashint instead of tracking it. - Each probe of the binary search now runs under a 5 second timeout (previously unbounded). A heavy call that used to return a slow estimate can now fail instead - budget for a retry.
Body
jsonrpcstringrequiredJSON-RPC protocol version
methodstringrequiredThe method name
paramsArray<object | string>requiredThe transaction call object and an optional block tag.
idintegerrequiredRequest identifier
Response
Estimated gas amount
Method not served by this endpoint. The body is the plain-text string
Method Not Allowed, not JSON.
Missing API key - the api-key header was absent. The body is the
plain-text string Missing API_key, not JSON.