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
| Field | Type | Required | Description |
|---|---|---|---|
quote_id | string | yes | Id from a quote you created. |
target_address | string | yes | Must match the quote's target address. |
idempotency_key | string | yes | Your 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": "…"
}
| Field | Type | Description |
|---|---|---|
order_id | string | The order id. |
status | string | PENDING, COMPLETED, FAILED, or RECONCILIATION_REQUIRED. |
customer_price | string | The order price, in TRX (decimal string, not SUN; 1 TRX = 10^6 SUN). |
currency | string | Always 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.
