TriportRPC

eth_gasPrice

Tron / https://triport.io/rpc/tron

Minimum tier: Free

Tron method guide

Last updated:

eth_gasPrice returns the EVM-facing gas price as a hex quantity. The measured example returned 0x64; consumers should parse the quantity rather than rely on that sample value remaining current.

This method is for software using the EVM compatibility layer. It is distinct from the native wallet getenergyprices method, which returns Tron energy price changes in a wallet response object.

Parameters

This method takes no parameters.

Returns

eth_gasPrice return value
FieldType
gasPriceQuantity

Examples

curl https://triport.io/rpc/tron \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_gasPrice","params":[]}'
const res = await fetch("https://triport.io/rpc/tron", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice",
  "params": []
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/rpc/tron",
    headers={"Authorization": "Bearer <api-key>"},
    json={"jsonrpc":"2.0","id":1,"method":"eth_gasPrice","params":[]},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Chain: Tron.
  3. Clusters: mainnet.
  4. Credit cost: 1 per call.

FAQ

What does eth_gasPrice do?
Returns the current EVM gas price exposed by the Tron JSON-RPC layer.
How many credits does eth_gasPrice cost?
eth_gasPrice costs 1 credit(s) per call on Triport by default.
Is eth_gasPrice available over WebSocket?
eth_gasPrice is an HTTP JSON-RPC method.