Skip to content

Preview an order's cost

GET
/api/v1/orders/preview
curl --request GET \
--url 'https://trongas.ai/api/v1/orders/preview?volume=1&days=example&resource=energy' \
--header 'X-Api-Key: <X-Api-Key>'

Price an order before placing it: resource price, the address-activation fee if target is not activated yet, the estimated saving versus burning TRX (energy only), and your current TRX balance. Read-only — charges nothing. resource is energy (default) or bandwidth.

volume
required
integer | string format: int64
/^-?(?:0|[1-9]\d*)$/

Amount of the resource: energy units or bandwidth bytes. Limits: see GET /orders/options (orders) or GET /automations/options (automations).

days
required
string

Rental period (despite the name): 15m, 1h or 1d. Same values as duration elsewhere; see GET /orders/options.

resource
string
Allowed values: energy bandwidth

energy or bandwidth. Defaults to energy where optional.

target
string

Recipient TRON address (T…). Lets the preview include the exact address-activation fee.

OK

object
priceTrx
required
string
baseCostTrx
required
string
commissionTrx
required
string
activationTrx
required
string
burnCostTrx
required
string
savingsPercent
required
string
balanceTrx
required
string