# Eth\_estimateGas

## Estimate Gas for Transaction

> Simulates a transaction and returns an estimate of how much gas would be used.<br>

```json
{"openapi":"3.0.0","info":{"title":"Ethereum JSON-RPC","version":"1.0.0"},"servers":[{"url":"https://arbitrum.nownodes.io"}],"security":[{"api-keyAuth":[]}],"components":{"securitySchemes":{"api-keyAuth":{"type":"apiKey","in":"header","name":"api-key"}}},"paths":{"/":{"post":{"tags":["eth_estimateGas"],"summary":"Estimate Gas for Transaction","description":"Simulates a transaction and returns an estimate of how much gas would be used.\n","operationId":"ethEstimateGas","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","description":"JSON-RPC protocol version"},"method":{"type":"string","description":"The method name"},"params":{"type":"array","minItems":1,"maxItems":2,"description":"The transaction call object and an optional block tag.\n","items":{"oneOf":[{"type":"object","required":["to"],"properties":{"from":{"type":"string","description":"Address the transaction is sent from (optional)"},"to":{"type":"string","description":"Destination address of the call"},"gas":{"type":"string","description":"Gas limit provided for execution (optional)"},"gasPrice":{"type":"string","description":"Gas price in wei (optional)"},"value":{"type":"string","description":"Amount of ETH to send, in hexadecimal wei (optional)"},"data":{"type":"string","description":"The compiled input data for the transaction (optional)"}}},{"type":"string","description":"Optional block tag (e.g., \"latest\", \"earliest\", or a block number)"}]}},"id":{"type":"integer","description":"Request identifier"}}}}}},"responses":{"200":{"description":"Estimated gas amount","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","description":"JSON-RPC version"},"id":{"type":"integer","description":"ID that matches the request"},"result":{"type":"string","description":"Estimated gas needed for the transaction, returned as a hexadecimal string.\nExample: \"0x5208\" equals 21000 in decimal.\n"}}}}}}}}}}}
```
