POST

Apply a quote

/api/v1/energy/apply_quote_orders

Create an order from a previously created quote. This is the two-step flow: create a quote to lock a price, then apply it here. Funds are reserved from your prepaid balance and fulfillment happens asynchronously.

If you do not need to lock a price first, use the one-step order endpoint instead.

Request body

FieldTypeRequiredDescription
quote_idstringyesId from a quote you created.
target_addressstringyesMust match the quote's target address.
idempotency_keystringyesYour unique key for safe retries (≤ 200 chars).
{
  "quote_id": "qte_1a2b3c4d5e6f7g8h",
  "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

  • ORDER_NOT_FOUND — the quote id does not exist or is not yours.
  • QUOTE_EXPIRED — the quote is no longer open or has expired.
  • INVALID_REQUEST — the target address does not match the quote.
  • INSUFFICIENT_BALANCE — your prepaid balance cannot cover the order.
  • IDEMPOTENCY_CONFLICT — the idempotency key was reused with a different payload.