POST

Create an order (one step)

/api/v1/energy/orders

Create an order in a single call. The price is resolved at order time and funds are reserved from your prepaid balance immediately; fulfillment happens asynchronously.

If you need to lock a price before ordering, use the two-step flow instead: create a quote, then apply it.

Request body

FieldTypeRequiredDescription
amountintegeryesAmount of the resource to delegate — energy or bandwidth (≥ 1).
duration_minutesintegeryesRental duration; must be one of the allowed durations.
target_addressstringyesTRON address to delegate to.
productstringnoTRON_ENERGY (default) or TRON_BANDWIDTH.
idempotency_keystringyesYour unique key for safe retries (≤ 200 chars).
{
  "product": "TRON_ENERGY",
  "amount": 64400,
  "duration_minutes": 60,
  "target_address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
  "idempotency_key": "idem-0001"
}

Response

{
  "data": {
    "order_id": "ord_9c2b7f0a",
    "status": "PENDING",
    "product": "TRON_ENERGY",
    "amount": 64400,
    "duration_minutes": 60,
    "target_address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
    "customer_price": "2.093",
    "currency": "TRX",
    "created_at": "2026-09-22T12:00:00.000Z",
    "completed_at": null,
    "failure_reason": null
  },
  "request_id": "…"
}
FieldTypeDescription
order_idstringThe order id.
statusstringPENDING, COMPLETED, FAILED, or RECONCILIATION_REQUIRED.
customer_pricestringThe order price, in TRX (decimal string, not SUN; 1 TRX = 10^6 SUN).
currencystringAlways TRX.

Errors

  • INVALID_ADDRESS — target_address is not a valid TRON address.
  • INVALID_DURATION — duration_minutes is not in the allowed catalog.
  • INVALID_REQUEST — product is unknown, or amount is outside the supported range.
  • INSUFFICIENT_BALANCE — your prepaid balance cannot cover the order.
  • IDEMPOTENCY_CONFLICT — the idempotency key was reused with a different payload.