getenergyprices - Tron

getenergyprices. Returns the historical and current price schedule for energy on the network.

getenergyprices - tron [Value: 20CU]
Returns the historical and current price schedule for energy on the network.
Use cases

Use cases

  • Also available as GET
  • Estimate historical smart contract call costs in TRX for accounting/reporting
Constraints

Constraints

  • Price string format requires client-side parsing (timestamp:price pairs)
  • Also available under /walletsolidity/ for confirmed (solidified) data instead of the latest state
Get started
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --request POST \
     --url https://lb.drpc.live/tron/{API-KEY}/wallet/getenergyprices \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{}'
Copy
Response
200
{
  "prices": "0:100,1653436800000:140,1687233600000:210"
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
ParametersThis method does not accept any parameters.

Response

200
Returns the historical and current price schedule for energy on the network.

Response params

object
pricesstring
Semicolon/comma-separated list of timestamp:price_in_sun entries, most recent last