API documentation
Order energy and retrieve transaction history from your application or bot.
Connection
Create an API key in your account and send it with every request. No separate client code is required.
Authorization: Bearer YOUR_API_KEY Accept: application/json Content-Type: application/json
Limit: 60 requests per minute.
/api/v1/ordersOrder energy
Only the recipient address is required. The default is 65,000 energy for one hour.
curl -X POST "https://energy-rent.com/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"address":"TRON_RECIPIENT_ADDRESS"}'
| Field | Description |
|---|---|
| address | Required TRON recipient address. |
| energy_amount | Optional: 32000, 65000, or 131000. The default is 65000. |
| source_system | Optional application label, such as telegram_bot. The default is api. |
Example response
{
"data": {
"order_id": "ord_8db12451-16af-42b2-915e-8a711609e357",
"request_id": "ord_8db12451-16af-42b2-915e-8a711609e357",
"success": true,
"status": "success",
"address": "TRON_RECIPIENT_ADDRESS",
"energy_amount": 65000,
"price_trx": "5.500000",
"created_at": "2026-09-17 12:00:00"
}
}The order_id is generated automatically. Save it to check the status. request_id is a compatible name for the same identifier. The sample price is illustrative: the cost is calculated from your rate in proportion to the energy amount and rounded to SUN.
PHP bot example
function orderEnergy(string $address, int $energy = 65000): array
{
$ch = curl_init('https://energy-rent.com/api/v1/orders');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'address' => $address,
'energy_amount' => $energy,
'source_system' => 'telegram_bot',
], JSON_THROW_ON_ERROR),
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 120,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($body === false) {
throw new RuntimeException('No response received: check the order history.');
}
return ['http_status' => $status,
'body' => json_decode($body, true, 512, JSON_THROW_ON_ERROR)];
}
$result = orderEnergy($address);Check the HTTP status and body.data.status. The function does not retry the request automatically.
/api/v1/orders/{order_id}Order status
Use the ID returned when the order was created. This method returns order data without making another purchase. Special characters in the ID must be URL-encoded.
curl "https://energy-rent.com/api/v1/orders/ORDER_ID" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
/api/v1/accountAccount and balance
Returns client_id, name, balance_trx, rate_trx_per_65k, deposit_address, and network. The address is null if it has not been assigned yet.
The balance includes credited deposits and completed charges. Funds for pending orders may be reserved.
Available for new orders
GET /api/v1/processing-balance returns balance_trx, reserved_trx, available_balance_trx, and rate_trx_per_65k. Use available_balance_trx to check the available balance.
Transaction history
GET /api/v1/orders?page=1 — orders: order_id, id, request_id, address, energy_amount, status, price_trx, charged_trx, created_at. charged_trx is the amount charged for a completed order.
GET /api/v1/deposits?page=1 — deposits: id, tx_hash, amount_trx, status, created_at. The hash is null when transaction details are unavailable. amount_trx is present only for credited deposits.
Up to 25 records per page. Pagination: meta.current_page, meta.last_page, meta.total. Amounts are decimal TRX strings. Times use UTC: ISO 8601 in history and YYYY-MM-DD HH:mm:ss in order responses.