Docs
Supported ChainsTRONEthereum JSON-RPC APITransaction Methods

eth_gasPrice - TRON RPC Method

Get current gas price on TRON. Essential for transaction cost estimation for TRC-20 transfers, wallet operations, and EVM-compatible smart contract integrations.

Returns the current gas price on TRON in wei.

Why TRON? Build on the TVM-compatible Layer 1 for TRC-20 payments, wallet APIs, and low-cost smart contract execution with TVM compatibility paired with native TRON wallet APIs, DPoS block production, and low-cost transaction flows.

Use Cases

The eth_gasPrice method is essential for:

  • Transaction pricing - Set appropriate gas prices
  • Cost estimation - Calculate transaction costs before sending
  • Gas monitoring - Track network congestion
  • DeFi operations - Optimize costs for TRC-20 transfers, wallet operations, and EVM-compatible smart contract integrations

Request Parameters

Request

This method accepts no parameters.

Response Body

Response
resultQUANTITY

Current TRON gas price in hex. Dwellir's shared mainnet endpoint currently returns 0x64 (100 sun).

Error Responses

Errors
Error Response-32601

Code Examples

Bash
curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/jsonrpc \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_gasPrice",
    "params": [],
    "id": 1
  }'

Error Handling

Error CodeMessageDescription
-32603Internal errorNode error
  • eth_maxPriorityFeePerGas - Get priority fee (EIP-1559)
  • eth_feeHistory - Get historical fee data
  • eth_estimateGas - Estimate gas needed