Saltar para o conteúdo principal
POST
/
api
/
v1
/
bandwidth
/
buy
Comprar Largura 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 Largura de Banda

Delega largura de banda ao endereço TRON especificado.

Corpo da requisição

address
string
obrigatório
Endereço TRON de destino
bandwidth_amount
number
obrigatório
Quantidade de largura de banda (mín. 350, máx. 100.000)
duration_hours
number
obrigatório
Duração do aluguel em horas

Resposta

Retorna um objeto de pedido com order_id, status e price_trx.

Preços

Preço da largura de banda: (volume / 1000) × 9.6 / 24 + 0.2 TRX A taxa fixa de 0,2 TRX se aplica a todos os pedidos de largura de banda.

Exemplo

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