Estimate Buy Resource
tronsave_estimate_buy_resourceQuote TRON ENERGY or BANDWIDTH price and availability for a receiver address before creating an order, returning unit price, duration, total TRX cost, and available resource.
Instructions
Quote price and availability for buying ENERGY or BANDWIDTH for a receiver address before placing an order. Returns { unitPrice (SUN/unit), durationSec, estimateTrx (total cost in SUN), availableResource, systemDepositAddress } — map them to tronsave_create_order as orderUnitPrice, orderDurationSec, paymentPaymentAmount. Defaults: ENERGY, 100000 units (1000 for BANDWIDTH), 900 s. Read-only and safe to call repeatedly; no session is required, but backend rate limits apply. For order-book depth use tronsave_list_order_books; for the minimum unit price only use tronsave_get_min_price.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| receiver | No | TRON address that will receive the resource. Strongly recommended: quotes depend on it. | |
| unitPrice | No | Desired unit price in SUN. Values below the market minimum are raised to the minimum. Omit for the MEDIUM market price. | |
| durationSec | No | Delegation duration in seconds. Default 900 (15 minutes). | |
| resourceType | No | Resource type to buy. Default ENERGY. | ENERGY |
| allowPartialFill | No | Allow partial fill of the order. | |
| buyResourceAmount | No | Resource units to buy. Default 100000 for ENERGY and 1000 for BANDWIDTH. | |
| minResourceDelegateRequiredAmount | No | Minimum resource amount per matching provider. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unitPrice | No | Quoted unit price in SUN per resource unit → `orderUnitPrice`. | |
| durationSec | No | Delegation duration in seconds → `orderDurationSec`. | |
| estimateTrx | No | Estimated total cost in SUN (despite the name; TRX = value / 1e6) → `paymentPaymentAmount`. | |
| availableResource | No | Resource units currently available at this price; if lower than requested, the order may fill partially. | |
| systemDepositAddress | No | TronSave deposit address; destination of the signed TRX transfer for `paymentMethod=onchain`. |