getenergyprices — Tron Wallet API
Returns native Tron energy price changes through wallet HTTP.
https://triport.io/rpc/tron/wallet/getenergyprices- Network
- Tron mainnet
- Scope
- tron:rpc
- Auth
- x-token: $TRIPORT_API_KEY
- Rate limit
- free+; tron_read_rpc: 15 / 20 / 100 / 250 RPS sustained · short burst 30 / 40 / 200 / 500 (free / basic / pro / business; default, unmeasured); Burst capacity
Endpoint and plans: Tron RPC endpoint.
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 OpenAPI response is an extensible wallet object with no example, so {}
is a schema-valid placeholder. The dated history subset below is an observation,
not a closed response schema.
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.
- Treat the dated history format above as an observed response; tolerate additional fields.
- Related:
eth_gasPrice.