1. 获取 API 密钥
注册并在 tronrental.com/dashboard/api 创建 API 密钥。2. 查看价格
curl https://api.tronrental.com/v1/prices
{
"energy_trx": { "1h": "1.79" },
"energy_sun": { "1h": "27.54" },
"energy_volume": 65000,
"energy_fixed_fee_trx": "0.2",
"bandwidth_trx": { "1h": "0.34", "1d": "0.42" },
"bandwidth_sun": { "1h": "400", "1d": "630" },
"bandwidth_volume": 350,
"trx_usd_rate": "0.234",
"burn_cost_trx": "6.5",
"savings_percent": "72.5"
}
"1h")。带宽支持 "1h" 或 "1d"。energy_trx 仅为租赁价,结算时需加上 energy_fixed_fee_trx(0.2 TRX)。
3. 充值 TRX
获取您的充值地址:curl https://api.tronrental.com/v1/account/deposit \
-H "X-API-Key: your_api_key"
deposit_address 发送 TRX 或 USDT,充值将自动到账。
4. 购买能量
curl -X POST https://api.tronrental.com/v1/energy/buy \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"target_address": "TYourRecipientAddress1234567890abc",
"volume": 65000,
"duration": "1h"
}'
{
"id": 12345,
"price_trx": "2.75",
"status": "pending",
"txid": null,
"reclaim_at": null,
"activation_cost_trx": "0"
}
5. 验证
查看订单状态:curl https://api.tronrental.com/v1/orders \
-H "X-API-Key: your_api_key"
{
"orders": [
{
"id": 12345,
"type": "energy",
"target_address": "TYourRecipientAddress1234567890abc",
"volume": 65000,
"duration": "1h",
"price_trx": "2.75",
"status": "filled",
"delegate_txid": "abc123...",
"reclaim_at": null,
"source": "api",
"created_at": "2026-06-09T12:00:00Z"
}
],
"total": 1,
"page": 1,
"page_size": 50
}
65,000 能量足够向已持有 USDT 的地址发起一次 USDT 转账。
首次接收 USDT 请使用 131,000 能量。
代码示例
import requests
API_KEY = "your_api_key"
BASE = "https://api.tronrental.com/v1"
headers = {"X-API-Key": API_KEY}
resp = requests.post(
f"{BASE}/energy/buy",
headers=headers,
json={
"target_address": "TYourRecipientAddress1234567890abc",
"volume": 65000,
"duration": "1h",
},
)
print(resp.json())
const API_KEY = "your_api_key";
const BASE = "https://api.tronrental.com/v1";
const res = await fetch(`${BASE}/energy/buy`, {
method: "POST",
headers: {
"X-API-Key": API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
target_address: "TYourRecipientAddress1234567890abc",
volume: 65000,
duration: "1h",
}),
});
console.log(await res.json());