Get an exact price quote for a resource, volume and duration
const url = 'https://trongas.ai/api/v1/pricing/quote?resource=energy&duration=example&volume=1';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://trongas.ai/api/v1/pricing/quote?resource=energy&duration=example&volume=1'Exact price (TRX) for a specific resource (energy/bandwidth), volume and duration (15m/1h/1d) — same formula as a real order. priceTrx is the live provider price with no commission — anonymous endpoints don’t disclose our per-transaction fee; the itemized total is only shown to the authenticated owner of an order/automation preview. Per-user individual prices are not applied here (anonymous). Public — no API key required.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”energy or bandwidth. Defaults to energy where optional.
Rental period, e.g. 15m, 1h, 1d. Allowed values per resource: see GET /orders/options.
Amount of the resource: energy units or bandwidth bytes. Limits: see GET /orders/options (orders) or GET /automations/options (automations).
Responses
Section titled “ Responses ”OK
object
object
Examplegenerated
{ "priceTrx": "example"}object
Examplegenerated
{ "priceTrx": "example"}Bad Request
object
Machine-readable error code, e.g. wallet.insufficient_balance. Branch on this, not on title. Always present: validation_failed for request validation (400, with per-field errors), unauthorized for 401, domain codes otherwise.
object
Machine-readable error code, e.g. wallet.insufficient_balance. Branch on this, not on title. Always present: validation_failed for request validation (400, with per-field errors), unauthorized for 401, domain codes otherwise.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}object
Machine-readable error code, e.g. wallet.insufficient_balance. Branch on this, not on title. Always present: validation_failed for request validation (400, with per-field errors), unauthorized for 401, domain codes otherwise.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}