Guide

How It Works

The process of using Tron.Discount to exchange TRX for Energy is straightforward. Here’s a step-by-step guide to help you navigate our system:

Step 1: Check System Status and Energy Pricing First, you need to query the current parameters of the exchange to ensure the system is active and to understand the current energy pricing and availability. Pay close attention to each parameter in the response, as they can change. If you do not consider the current parameter values immediately before sending the funds to initiate an energy purchase order, the result may not be as expected

curl https://api.tron.discount/energy/info
{
  "isSystemActive": true,
  "maximumEnergyAvailable": 1500000000,
  "energyUnitPriceInSun": 119,
  "minEnergyOrderAmount": 32000,
  "depositAddress": "TDPrK8oatkEcwASXCBLMovyD6LWDSanDWJ",
  "serverTime": "2024-01-01T16:01:44.7661545Z"
}

Step 2: Calculate the Required TRX After obtaining the necessary details, calculate the amount of TRX you need to send to purchase the desired amount of Energy. Confirm that there is sufficient energy available and the system is operational. Ensure that the amount of Energy you wish to purchase meets or exceeds the minEnergyOrderAmount specified in the system parameters.

Step 3: Send TRX to the Deposit Address Transfer the calculated TRX to the deposit address provided. If you wish to delegate the Energy to a different TRON address, specify this in the extra data of your transaction.

Step 4: Track Your Order Status You can track the status of your energy purchase order using the provided order tracking API. You need to pass the deposit hash initiating the energy purchase order to the URL /energy/order/. In case the delegation was executed through more than one transaction, the delegationHash field will list the hashes of all these transactions separated by commas.

curl https://api.tron.discount/energy/order/d663302b6a303053b8de9a018ea14cbaca9d0cf0e38a498cc86d04748e3bec14
{
  "depositHash": "d663302b6a303053b8de9a018ea14cbaca9d0cf0e38a498cc86d04748e3bec14",
  "delegationHash": "b9458d06b1f05ff5d1b2448afa6efb548f7792dd6997ab9cb4e2ce6fbbd560a0",
  "refundHash": null,
  "status": "ResourcesDelegated",
  "created": "2024-01-01T14:38:32",
  "executed": "2024-01-01T14:40:10",
  "targetAddress": "TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf",
  "depositAmount": 3.89,
  "energyAmount": 32416
}

Step 5: Verify the Energy Delegation Once your transaction is processed, verify that the Energy has been correctly delegated to the specified TRON address. You can use TRON’s network tools to check the status of the Energy or other resources (e.g. your own full node). If the service fails to complete the energy purchase request within 300 seconds, a refund will be sent to the payment wallet.

curl -X POST \
     --url https://api.trongrid.io/wallet/getaccountresource \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{ "address": "TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf", "visible": true }'
{
  "freeNetLimit": 600,
  "TotalNetLimit": 43200000000,
  "TotalNetWeight": 84038587217,
  "TotalEnergyLimit": 33209232473744,
  "TotalEnergyWeight": 564739185945
}

Step 6: Start Using Your Purchased Energy Now that the Energy is delegated to your address, you can start conducting transactions on the TRON network using the Energy to cover transaction fees instead of TRX.

Note: If the Energy is not used within 1 hour, it will be retracted. Additionally, in the event of any system errors, the TRX you sent will be refunded.

Loading maximum energy...
Loading energy price...

Tron Blockchain

TRON is a blockchain-based decentralized platform designed to build a free, global digital content entertainment system with distributed storage technology, and allows easy and cost-effective sharing of digital content. It is known for its high throughput, high scalability, and high availability for all Decentralized Applications (DApps) in the ecosystem.


Learn how Tron.Discount works to exchange TRX for Energy efficiently