POST

Estimate a flash order

/api/v1/energy/flash_quotes

Estimate the price of a flash charge order without creating an order or freezing your balance. This is a dry-run of create flash order: it prices the same tier and freeze margin, so customer_price and freeze_amount match what a real order would charge and freeze at that moment.

Flash orders support energy and bandwidth. The estimate is not a price promise — the actual amount is settled from real usage after the order completes.

Request body

FieldTypeRequiredDescription
energy_numintegeryesResource buffer to estimate (≥ 1). Energy units for TRON_ENERGY, bandwidth units for TRON_BANDWIDTH.
target_addressstringyesTRON address to top up.
productstringnoTRON_ENERGY (default) or TRON_BANDWIDTH.
{
  "product": "TRON_ENERGY",
  "energy_num": 64400,
  "target_address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"
}

Response

{
  "data": {
    "product": "TRON_ENERGY",
    "energy_num": 64400,
    "target_address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
    "currency": "TRX",
    "customer_price": "2.093",
    "freeze_amount": "2.260"
  },
  "request_id": "…"
}
FieldTypeDescription
customer_pricestringEstimated charge in TRX (decimal string, not SUN; 1 TRX = 10^6 SUN).
freeze_amountstringAmount that would be frozen when you create the order: customer_price × (1 + safety margin).

Errors

  • INVALID_ADDRESS — target_address is not a valid TRON address.
  • INVALID_REQUEST — product is neither TRON_ENERGY nor TRON_BANDWIDTH, or energy_num is outside the orderable range.