跳转到主要内容
POST
/
api
/
v1
/
bandwidth
/
buy
购买带宽
curl --request POST \
  --url https://api.example.com/api/v1/bandwidth/buy \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": "<string>",
  "bandwidth_amount": 123,
  "duration_hours": 123
}
'

购买带宽

将带宽委托给指定的 TRON 地址。

请求体

address
string
必填
目标 TRON 地址
bandwidth_amount
number
必填
带宽数量(最小 350,最大 100,000)
duration_hours
number
必填
租赁时长,以小时计

响应

返回包含 order_idstatusprice_trx 的订单对象。

定价

带宽价格:(volume / 1000) × 9.6 / 24 + 0.2 TRX 所有带宽订单均收取 0.2 TRX 的固定费用。

示例

curl -X POST https://api.tronrental.com/v1/bandwidth/buy \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "TTargetAddress...",
    "bandwidth_amount": 1000,
    "duration_hours": 24
  }'
Response
{
  "order_id": 5678,
  "address": "TTargetAddress...",
  "bandwidth_amount": 1000,
  "duration_hours": 24,
  "price_trx": "9.80",
  "status": "pending"
}