Tron Energy Marketplace API
Welcome to the official documentation for our Tron Energy Marketplace API. Here you can find details about the public endpoints that allow you to:
- Retrieve current platform parameters (energy price, available supply, minimum order size, and deposit address).
- Check the status of a specific energy purchase order by deposit hash.
Currently, two GET endpoints are available and do not require authentication.
Endpoint Overview
GET
https://api.tron.discount/energy/info
Returns the platform's live settings such as whether the system is active, how much energy is available, the energy price, deposit address, etc.
GET
https://api.tron.discount/energy/order/{depositHash}
Returns the status of a specific purchase order, including transaction hashes and delegation details.
Detailed Endpoints
/energy/info
Description
Provides parameters like current energy price, how much energy is available, the deposit address, and other info (e.g., server time, whether the system is active).
Request
curl -X GET https://api.tron.discount/energy/info
Response
{
"isSystemActive": true,
"maximumEnergyAvailable": 1207542371,
"energyUnitPriceInSun": 65,
"minEnergyOrderAmount": 32000,
"depositAddress": "TW7X17SRk3PMPDK7WomSWEwGSRwuCntDM2",
"serverTime": "2025-04-05T15:24:05.785059Z"
}
Field Descriptions
Field | Type | Description |
---|---|---|
isSystemActive |
Boolean | Indicates if the marketplace is operational. |
maximumEnergyAvailable |
Integer | The total energy units currently available for purchase. |
energyUnitPriceInSun |
Integer | The cost (in SUN) per unit of energy. (1 TRX = 1,000,000 SUN) |
minEnergyOrderAmount |
Integer | Minimum amount of energy (units) for a single order. |
depositAddress |
String | Tron address to which buyers send TRX. The system automatically delegates energy to the sender once payment is received. |
serverTime |
String | Server timestamp in ISO format. |
/energy/order/{depositHash}
Description
Retrieves the status of a purchase order associated with the provided deposit transaction hash.
Request
curl -X GET https://api.tron.discount/energy/order/d663302b6a303053b8de9a018ea14cbaca9d0cf0e38a498cc86d04748e3bec14
Response
{
"depositHash": "d663302b6a303053b8de9a018ea14cbaca9d0cf0e38a498cc86d04748e3bec14",
"delegationHash": "b9458d06b1f05ff5d1b2448afa6efb548f7792dd6997ab9cb4e2ce6fbbd560a0",
"refundHash": null,
"status": "ResourcesDelegated",
"created": "2024-06-01T14:38:32",
"executed": "2024-06-01T14:40:10",
"targetAddress": "TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf",
"depositAmount": 3.89,
"energyAmount": 32416
}
Field Descriptions
Field | Type | Description |
---|---|---|
depositHash |
String | Transaction hash of the deposit (TRX sent to the platform). |
delegationHash |
String | Transaction hash of the on-chain delegation (if any). |
refundHash |
String | Transaction hash of any refund (if applicable, otherwise null). |
status |
String | Order status (e.g., "ResourcesDelegated", "Refunded", "Pending", etc.). See the status descriptions below. |
created |
String | Timestamp when the order was first detected. |
executed |
String | Timestamp when the system successfully delegated or processed the order. |
targetAddress |
String | Tron address that received the delegated energy. |
depositAmount |
Number | Amount of TRX received from the deposit transaction. |
energyAmount |
Integer | Quantity of energy units delegated to the target address. |
Order Status Values
Possible values for the status
field:
Status | Description |
---|---|
Created |
Order has been created but not yet processed. |
Pending |
Payment received and order is being processed. |
ResourcesDelegated |
Energy has been successfully delegated to the target address. |
RefundRequested |
A refund has been requested but not yet processed. |
PendingRefund |
Refund is being processed. |
Refunded |
TRX has been refunded to the sender. |
Additional Notes
No Authentication
Currently, these endpoints are public. We may introduce API keys or tokens in the future.
Energy Units & SUN
Remember, 1 TRX = 1,000,000 SUN. So if energyUnitPriceInSun is 65, that means 0.000065 TRX per unit of energy.
Implicit Order Creation
An "order" is created automatically whenever TRX is sent to the deposit address. Use the deposit transaction hash to track the status.
Server Time
Times are given in ISO 8601 format (UTC). Keep timezones in mind when comparing to local times.