Rent TRON Energy via API
View documentation →Energy is the resource the TRON network consumes when a transaction runs a smart contract — most commonly a USDT (TRC-20) transfer. Call one endpoint with a target address and a volume, and we delegate Energy to it directly.
import requests
resp = requests.post(
"https://trongas.ai/api/v1/orders",
headers={
"X-Api-Key": "tgk_4f9a1c8e2b7d...",
"Idempotency-Key": "5c1e2b6a-9e21-4b7a-8f3d-1a2b3c4d5e6f",
},
json={
"resource": "energy",
"targetAddress": "TXYZ...4f9a",
"volume": 65000,
"duration": "1h",
},
)
print(resp.json())Request format
resourcestring"energy" or "bandwidth". Defaults to energy if omitted.
targetAddressstringTRON address that receives the delegated resource.
volumeintegerAmount to delegate. Energy: 65,000–1,000,000. Bandwidth: 350–300,000.
durationstring"15m", "1h" or "1d".
X-Api-KeyYour API key.
Idempotency-KeyA UUID you generate. Retrying with the same key returns the original order instead of charging twice.
idOrder id.
status"Created" at first, then "Filled" once delegated (or "Failed"). Subscribe to the order.filled webhook to know the moment it lands.
priceTrx / activationTrx / totalTrxCharge in TRX. activationTrx is only non-zero when the target address is receiving TRX for the first time.
txIdDelegation transaction hash, populated once the order is filled.