Saltar para o conteúdo principal
POST
/
api
/
v1
/
energy
/
buy
Comprar Energia
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>"
}

Comprar Energia

Delega energia ao endereço TRON especificado. O custo é deduzido do saldo da sua conta.

Corpo da requisição

target_address
string
obrigatório
Endereço TRON de destino (formato T…, 34 caracteres)
volume
number
obrigatório
Quantidade de energia a delegar (mín. 32.000, máx. 5.000.000)
duration
string
obrigatório
Duração do aluguel: "1h" (1 hora) ou "1d" (1 dia, somente bandwidth)

Resposta

id
number
Unique order identifier
status
string
Order status: pending, filled, failed
txid
string | null
On-chain transaction id once the delegation is broadcast (null while pending)
price_trx
string
Total cost charged from your balance, in TRX
reclaim_at
string | null
ISO 8601 timestamp when the bandwidth rental is reclaimed (energy is reclaimed automatically by the provider)
activation_cost_trx
string
Address activation cost in TRX ("0" if the recipient is already activated)

Exemplo

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 energia cobre uma transferência USDT para um endereço que já possui USDT. Use 131.000 para destinatários de USDT pela primeira vez (criação de novo slot de armazenamento).