跳转到主要内容
POST
/
api
/
v1
/
energy
/
buy
购买能量
curl --request POST \
  --url https://api.example.com/api/v1/energy/buy \
  --header 'Content-Type: application/json' \
  --data '
{
  "target_address": "<string>",
  "volume": 123,
  "duration": "<string>"
}
'
{
  "id": 123,
  "status": "<string>",
  "txid": {},
  "price_trx": "<string>",
  "reclaim_at": {},
  "activation_cost_trx": "<string>"
}

购买能量

将能量委托给指定的 TRON 地址。费用从您的账户余额中扣除。

请求体

target_address
string
必填
目标 TRON 地址(T… 格式,34 个字符)
volume
number
必填
要委托的能量数量(最小 32,000,最大 5,000,000)
duration
string
必填
租赁时长:"1h"(1 小时)或 "1d"(1 天,仅用于带宽订单)

响应

id
number
唯一订单标识符
status
string
订单状态:pendingfilledfailed
txid
string | null
委托广播后的链上交易 ID(pending 期间为 null)
price_trx
string
从余额中扣除的总费用,以 TRX 计
reclaim_at
string | null
带宽租赁回收的 ISO 8601 时间戳(能量由提供方自动回收)
activation_cost_trx
string
地址激活费用(以 TRX 计),如已激活则为 "0"

示例

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"
  }'
Response
{
  "id": 12345,
  "price_trx": "2.75",
  "status": "pending"
}
65,000 能量可覆盖一笔向已持有 USDT 地址的转账。 对于首次接收 USDT 的地址(新建存储槽),请使用 131,000