Tovanix
Tovanix

TRON Energy Rental API

Lease TRON energy programmatically instead of burning TRX on fees — 70–80% cheaper per TRC-20 transfer.

  • Ordering: specify recipient address, energy amount and lease period; delegation lands within seconds
  • Order queries: look up delegation status and expiry by order id or address
  • Pricing: live unit price and tiers for cost planning
  • Webhooks: delegation-succeeded and expiry events, signed with HMAC

GET / POST /api/v1/energy/*

Authentication

Energy Rental API uses merchant API Key for authentication. Include the following headers in each request:

Sign in to the console → Tools & Settings → API management, then create and enable an API key to obtain X-API-Key and X-Secret-Key.

Signed calls for charged endpoints

Placing an order, a one-time order and reclaiming are charged endpoints. New API keys require signed requests for them by default (X-Key-ID / X-Timestamp / X-Nonce / X-Sign-Version / X-Signature); below is a complete example for placing an order. Query endpoints still accept X-API-Key + X-Secret-Key alone. If you turn off "Require signed requests for charges and sensitive data" in the key settings, charged endpoints also accept the plain X-Secret-Key, but this is not recommended.

Overview

TRON on-chain USDT transfers consume Energy. Addresses without frozen TRX pay ~6.5-13 TRX gas per transaction. With leased energy, the transfer uses that energy instead of burning TRX for it; how much you save depends on the rental price when you order.

Transfer USDT to an address with existing USDT balance: ~65,000 Energy

Transfer USDT to an address that never received USDT: ~135,000 Energy

Get Platform Info

GET /api/v1/energy/info

Get public info about the energy lease service including available energy, pricing tiers, and limits.

Query account balance

GET /api/v1/energy/balance

Query the balance of the account this API key belongs to. Energy rental is a high-frequency, low-value flow where running out of balance is routine — query it before batch ordering and set a low-balance alert.

List rental periods (endpoint)

GET /api/v1/energy/periods

Returns the supported period values. Anything outside this list is rejected with 400 and no order is created.

Price Estimate

GET /api/v1/energy/price

Estimate the lease cost for a given period and energy amount. Returns API-specific price (TRX).

Estimate Energy Consumption

GET /api/v1/energy/estimate-energy

Estimate how much energy is needed to transfer USDT to a given address.

Create Lease Order

POST /api/v1/energy/order

Place an energy lease order; fee deducted from account balance (USD).

Response Fields

Returns code: 400, message: "Insufficient account balance, please top up first" when balance is insufficient

One-time Energy Order

POST /api/v1/energy/order/onetime

Place a single order using the per-transaction strategy; energy_amount is auto-assigned by the system.

Query Order List

GET /api/v1/energy/orders

Query your energy lease orders.

Query Single Order

GET /api/v1/energy/order/:serial

Query order details and sync the latest status.

Query an order by your own trade number

GET /api/v1/energy/order/by-trade-no/:out_trade_no

Look up an order by your own out_trade_no — our serial is not required.

⚠️ When the create endpoint times out, it returns 504 and at that moment all you hold is out_trade_no (the serial is generated by us and is absent from the timeout response). This endpoint exists for exactly that case: fetch the final outcome using the same out_trade_no.

Reclaim Order

POST /api/v1/energy/order/reclaim

Reclaim an unexpired energy lease order early.

Order result callback

For orders placed with a callback_url (including one-time orders), the platform pushes the result to that URL once, when the order first settles as succeeded (status=40) or failed (status=41). Whether the status is confirmed by a real-time status notification, order polling, reconciliation or the recovery of an order that failed to be saved, each order is pushed only once, and failed deliveries are retried automatically. The exception is an order whose create request returned 504 with an unknown result (recorded internally as a placeholder whose serial starts with LOCAL-): it is resolved manually and never pushed automatically, so confirm its result with the lookup by your own order number. Callbacks are sent and signed by the platform; the old callback format is no longer used, so existing integrations should update their parsing and signature checks to match this section.

The request is a POST with Content-Type: application/json. The body is a flat JSON object in which every value is a string (including status, energy_amount and timestamp), and it contains no price fields. The platform does not follow redirects, and each request times out after 10 seconds.

Verifying the signature

The algorithm is the same as for payment order callbacks: take every field with a non-empty value except sign, sort by field name in ASCII order, join them as k1=v1&k2=v2&…, and compute HMAC-SHA256; the result is lowercase hex. The key is the Secret Key of the API key used to place the order; for orders placed with payment app credentials, it is that app's Push Secret (WebhookSecret, shown on the app's detail page in the console — the same key used for payment order callbacks); older apps that never generated a Push Secret use the App Key.

The push carries no sign when the order was created by platform support on your behalf (there is no key for it), or when the API key or payment app used to place the order has since been deleted. When you receive a push without sign, confirm the order status with the order query endpoint before acting on it.

Response and retries

Any 2xx status code counts as delivered; the response body is not checked. A non-2xx status, timeout, connection failure or redirect counts as a failure, and the platform retries after 30 seconds, 1 minute, 2 minutes and 5 minutes, then every 10 minutes, up to 10 retries (it stops after about 70 minutes). Retries resend exactly the same body, including notify_id and sign.

If the network drops after your server has processed a push but before the platform receives the 2xx, the same order will be pushed again. Deduplicate by notify_id or serial and make sure processing twice has no side effects. The push is a notification, not the only source of truth: if you never receive it, or delivery finally fails, confirm the result with GET /api/v1/energy/order/:serial or the lookup by your own order number.

Lease Periods

These are all the periods currently supported. You can also fetch them from GET /api/v1/energy/periods. Any other value returns 400 and no order is created.

Frequently Asked Questions

How much does the energy rental API actually save?

Burning TRX directly for one TRC-20 USDT transfer typically costs about 6.5-13 TRX. Renting energy instead cuts that by 70–80%, and the gap widens for batch transfers.

How fast is delegation, and can I target another address?

Delegation lands within seconds, and the recipient address is whatever you pass in the request — it does not have to be the ordering account, so you can supply energy to any business address in bulk.

Related pages: TRON Energy Rental · API Documentation · Multi-chain crypto payments

Loading…