Developer documentation
API workspacehttps://api.rentron.xyz/v1Production API · 7 endpoints
Rentron Energy API
Production API for quoting, ordering, and tracking TRON Energy rentals.
Quick request
POST /v1/energy/quotes
curl https://api.rentron.xyz/v1/energy/quotes \
-X POST \
-H "Authorization: HMAC-SHA256 {api_key}:{base64_signature}" \
-H "X-Request-Timestamp: 1784376000" \
-H "Content-Type: application/json" \
-d '{
"address": "TXYZ",
"energy": 65000,
"duration_hours": 1
}' 200 OK
{ "total_trx": "3.200000", "can_afford": true }Endpoint map
API basics
04/v1/time Read API Unix time before signing requests and diagnose clock drift.
/v1/balance Read available and held TRX before creating an order.
/v1/energy/options Read valid Energy amounts, rental durations, and current order-intake availability.
/v1/energy/quotes Calculate the current rental price for a TRON address without changing account balance.
Energy orders
03/v1/energy/orders Create an idempotent Energy rental and receive its fixed amount and polling URL.
/v1/energy/orders/{id} Read one owned order and determine whether delivery and the full rental lifecycle are final.
/v1/energy/orders?limit=20&cursor=... Read orders from newest to oldest with opaque cursor pagination.
Overview
Rentron Energy API lets your server rent TRON Energy without manual dashboard work. The integration uses regular HTTPS requests with HMAC authentication and order-status polling.
One-minute summary
| Setting | Value |
|---|---|
| Base URL | https://api.rentron.xyz/v1 |
| Format | JSON with snake_case fields |
| Authentication | HMAC-SHA256 except for GET /v1/time |
| Order updates | Polling only; no webhooks or callbacks |
| Errors | RFC 9457, application/problem+json |
| OpenAPI | https://rentron.xyz/openapi/rentron-energy-v1.json |
The API uses your production account balance. There is no separate sandbox API.
Order flow
- Read the current rental options and request a quote.
- Create an order with a unique
client_request_idand the quote's exacttotal_trxasexpected_total_trx. - Store the returned
idandLocationheader. - Poll
GET /v1/energy/orders/{id}until bothlifecycle_finalanddelivery_finalaretrue.
Contract guarantees
- The server fixes the final amount at order creation and returns it as
total_trx. - Money values are strings with exactly six decimal places.
- Replaying an identical request with the same
client_request_iddoes not create a duplicate. - Missing and foreign-account order IDs return the same
404. - Application logic should use the stable error
code, never parsedetail.
Continue with the quickstart, then centralize the authentication logic in one server-side HTTP client.
Rentron