--- title: getEnergyPrices description: "Returns the historical energy unit price history as a string of timestamp:price pairs in sun separated by commas." keywords: ["getenergyprices", "trx", "energy price", "energy unit price", "sun", "tronweb"] --- # getEnergyPrices Query historical energy unit price. ## Usage ```js await tronWeb.trx.getEnergyPrices(); ``` ## Return string - All historical energy unit price information. Each unit price change is separated by a comma. Before the colon is the millisecond timestamp, and after the colon is the energy unit price in sun. ## Example ```js //Example 1 await tronWeb.trx.getEnergyPrices(); // output-start "0:100" // output-end ```