Saltar al contenido principal
POST
/
api
/
v1
/
bandwidth
/
buy
Comprar ancho de banda
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
}
'

Comprar ancho de banda

Delega ancho de banda a la direccion TRON especificada.

Cuerpo de la solicitud

address
string
requerido
Direccion TRON de destino
bandwidth_amount
number
requerido
Cantidad de ancho de banda (min 350, max 100,000)
duration_hours
number
requerido
Duracion del alquiler en horas

Respuesta

Devuelve un objeto de orden con order_id, status y price_trx.

Precios

Precio del ancho de banda: (volumen / 1000) × 9.6 / 24 + 0.2 TRX La tarifa fija de 0.2 TRX se aplica a todas las ordenes de ancho de banda.

Ejemplo

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"
}