TriportRPC

getenergyprices

POSThttps://triport.io/rpc/tron/wallet/getenergyprices

Returns native Tron energy price changes through wallet HTTP.

Tron mainnettron:rpcfree+; tron_read_rpc: 15 / 20 / 100 / 250 RPS (free / basic / pro / business; default, unmeasured)

getenergyprices returns the native wallet representation of Tron energy price changes. It is intended for consumers using Tron resource accounting rather than a generic EVM gas-price interface. It does not estimate how much energy a particular contract call uses.

The result format is distinct from eth_gasPrice, which returns one EVM hex quantity. The wallet operation accepts no range or historical selector in its request.

Parameters

The request body is a required empty JSON object.

bodyobjectrequired
Must be {}; no request parameters are defined.

Response

The concrete response example is unknown. The OpenAPI response is an extensible wallet object with no example, so {} is a schema-valid placeholder and no undocumented history fields are claimed.

responseobject
Native energy-price result; fields are not enumerated by the contract.

Errors

Wallet failures use HTTP status plus JSON. See Tron errors.

HTTPMeaningWhen it happens
400Bad requestThe request body is malformed or not empty.
401UnauthorizedThe API key is missing or invalid.
403ForbiddenThe scope or tier does not permit the request.
429Rate limitedThe tron_read_rpc budget is exceeded.

Examples

const response = await fetch("https://triport.io/rpc/tron/wallet/getenergyprices", {
  method: "POST",
  headers: { "x-token": process.env.TRIPORT_API_KEY, "Content-Type": "application/json" },
  body: "{}",
});
const energyPrices = await response.json();

Notes

  • Do not parse this response as an EVM quantity.
  • No response-field units are documented because the contract supplies neither fields nor an example.
  • Related: eth_gasPrice.