> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# jsonrpc eth_estimateGas | TRON

> TRON API method that estimates the amount of gas needed to execute a transaction. This method provides Ethereum-compatible interface for TRON blockchain.

TRON API method that estimates the gas required to execute a transaction, providing an Ethereum-compatible interface for accessing TRON blockchain data.

## Parameters

* `jsonrpc` — the JSON-RPC protocol version (always "2.0")
* `method` — the method name (always "eth\_estimateGas")
* `params` — array containing method parameters
  * `transaction` — transaction object containing to, from, gas, gasPrice, value, and data fields
* `id` — request identifier (number or string)

## Response

* `jsonrpc` — the JSON-RPC protocol version ("2.0")
* `id` — the request identifier that matches the request
* `result` — the estimated gas amount as hex string

## Use case

The `jsonrpc eth_estimateGas` method is used for:

* Calculating gas requirements before sending transactions through Web3 interfaces
* Building transaction fee estimation features in wallets and dApps
* Optimizing gas usage and preventing failed transactions due to insufficient gas
* Implementing dynamic gas pricing and transaction cost calculations


## OpenAPI

````yaml openapi/tron_node_api/jsonrpc_eth_estimateGas.json POST /95e61622bf6a8af293978377718e3b77/jsonrpc
openapi: 3.0.0
info:
  title: eth_estimateGas example
  version: 1.0.0
  description: >-
    This is an API example for eth_estimateGas, a method to estimate gas needed
    to execute a transaction on the TRON network through Ethereum-compatible
    JSON-RPC interface.
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/jsonrpc:
    post:
      tags:
        - TRON JSON-RPC Operations
      summary: eth_estimateGas
      operationId: estimateGas
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - method
                - id
                - params
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_estimateGas
                id:
                  type: integer
                  default: 1
                params:
                  type: array
                  default:
                    - to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b'
                      from: '0xb60e8dd61c5d32be8058bb8eb970870f07233155'
                      value: '0x9184e72a'
                  items:
                    type: object
                    description: >-
                      Transaction object with to, from, gas, gasPrice, value,
                      data fields
      responses:
        '200':
          description: Estimated gas amount needed for the transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
                    description: The estimated gas amount as hex string

````