/calculate-energy-price
Request the estimated rental cost of energy and the available number of energy can be rented.
https://api.tronenergyrent.com/calculate-energy-price?period=[RENTAL_DURATION]&energyAmount=[ENERGY_AMOUNT]
| Request parameter | Type | Required | Description |
|---|---|---|---|
period |
string | Yes |
Rental duration. One of the following values: "1h" – 1 hour "1d" – 1 day "3d" – 3 days "30d" – 30 days |
energyAmount |
int | Yes | Amount of TRON energy to rent (minimum 15000 units). |
preActivateDestinationAddress |
int | No |
On the TRON network, addresses must be active before they can receive energy. Send preActivateDestinationAddress=1 if you want to calculate the cost of renting energy including TRON address activation, otherwise set "0" or ignore this parameter.
|
{
"status": "SUCCESS",
"errorCode": null,
"errorDescription": null,
"requestId": "9d13d94d-4",
"payload": {
"availableEnergy": 75820891,
"totalEnergy": 561779790,
"minimumOrderEnergy": 15000,
"maximumOrderEnergy": 200000000,
"totalPriceSun": 2860000,
"totalPriceTrx": 2.86,
"explanation": "The price for each unit of energy is 44 SUN. The final price is calculated as 65000 ENERGY × 44 SUN = 2860000 SUN (2.860000 TRX)."
}
}
/place-energy-order
Request energy rental to the specified TRON wallet.
https://api.tronenergyrent.com/place-energy-order?apiKey=[YOUR_API_KEY]&period=[RENTAL_DURATION]&energyAmount=[ENERGY_AMOUNT]&destinationAddress=[WALLET]
| Request parameter | Type | Required | Description |
|---|---|---|---|
apiKey |
string | Yes | Your API key from the dashboard |
period |
string | Yes |
Rental duration. One of the following values: "1h" – 1 hour "1d" – 1 day "3d" – 3 days "30d" – 30 days |
energyAmount |
int | Yes | Amount of TRON energy to rent (minimum 15000 units). |
destinationAddress |
string | Yes | The target Tron address where you want to receive energy |
preActivateDestinationAddress |
int | No |
On the TRON network, addresses must be active before they can receive energy. If you would like to activate your address before receiving energy, set preActivateDestinationAddress=1, otherwise set "0" or ignore this parameter.An activation fee of 1.5 TRX will be charged from your balance if you set "1" |
{
"status": "SUCCESS",
"errorCode": null,
"errorDescription": null,
"requestId": "2651eacd-2428",
"payload": {
"orderId": "128de799-501e-44b2-8d6f-1fa825c2deed",
"totalPriceSun": 5662800,
"totalPriceTrx": 5.6628,
"state": "PAID_BY_USER"
}
}
/calculate-bandwidth-price
Request the estimated rental cost of bandwidth and the available number of bandwidth can be rented.
https://api.tronenergyrent.com/calculate-bandwidth-price?period=[RENTAL_DURATION]&bandwidthAmount=[BANDWIDTH_AMOUNT]
| Request parameter | Type | Required | Description |
|---|---|---|---|
period |
string | Yes |
Rental duration. One of the following values: "1h" – 1 hour "1d" – 1 day "3d" – 3 days "30d" – 30 days |
bandwidthAmount |
int | Yes | Amount of TRON bandwidth to rent (minimum 1000 units). |
preActivateDestinationAddress |
int | No |
On the TRON network, addresses must be active before they can receive bandwidth. Send preActivateDestinationAddress=1 if you want to calculate the cost of renting bandwidth including TRON address activation, otherwise set "0" or ignore this parameter.
|
{
"status": "SUCCESS",
"errorCode": null,
"errorDescription": null,
"requestId": "464879de-43",
"payload": {
"availableBandwidth": 283260,
"totalBandwidth": 1977490,
"minimumOrderBandwidth": 1000,
"maximumOrderBandwidth": 5000,
"totalPriceSun": 637000,
"totalPriceTrx": 0.637,
"explanation": "The price for each unit of bandwidth is 637 SUN. The final price is calculated as (1000 BANDWIDTH × 637 SUN) = 637000 SUN (0.637000 TRX)."
}
}
/place-bandwidth-order
Request bandwidth rental to the specified TRON wallet.
https://api.tronenergyrent.com/place-bandwidth-order?apiKey=[YOUR_API_KEY]&period=[RENTAL_DURATION]&bandwidthAmount=[BANDWIDTH_AMOUNT]&destinationAddress=[WALLET]
| Request parameter | Type | Required | Description |
|---|---|---|---|
apiKey |
string | Yes | Your API key from the dashboard |
period |
string | Yes |
Rental duration. One of the following values: "1h" – 1 hour "1d" – 1 day "3d" – 3 days "30d" – 30 days |
bandwidthAmount |
int | Yes | Amount of TRON bandwidth to rent (minimum 1000 units). |
destinationAddress |
string | Yes | The target Tron address where you want to receive bandwidth |
preActivateDestinationAddress |
int | No |
On the TRON network, addresses must be active before they can receive bandwidth. If you would like to activate your address before receiving bandwidth, set preActivateDestinationAddress=1, otherwise set "0" or ignore this parameter.An activation fee of 1.5 TRX will be charged from your balance if you set "1" |
{
"status": "SUCCESS",
"errorCode": null,
"errorDescription": null,
"requestId": "2fb29976-17",
"payload": {
"orderId": "81a6ccd3-9d4c-41d3-b03c-34e78c2eed8f",
"totalPriceSun": 637000,
"totalPriceTrx": 0.637,
"state": "PAID_BY_USER"
}
}