getenergyprices
https://triport.io/rpc/tron/wallet/getenergypricesReturns native Tron energy price changes through wallet HTTP.
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{}; 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.
responseobjectErrors
Wallet failures use HTTP status plus JSON. See Tron errors.
| HTTP | Meaning | When it happens |
|---|---|---|
400 | Bad request | The request body is malformed or not empty. |
401 | Unauthorized | The API key is missing or invalid. |
403 | Forbidden | The scope or tier does not permit the request. |
429 | Rate limited | The 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.