Estimate Buy Resource
tronsave_estimate_buy_resourceQuote price and availability for buying ENERGY or BANDWIDTH for a receiver address before placing an order. Returns estimated unitPrice (SUN per resource unit), paymentAmount, and availability fields used to populate tronsave_create_order inputs (orderUnitPrice, paymentPaymentAmount). Read-only and safe to call repeatedly; no session is required, but backend rate limits apply. FRESHNESS: this is live market data — unitPrice/availability can change roughly every 3 seconds (one TRON block). Re-run this estimate immediately before tronsave_create_order and never reuse a quote more than a few seconds old. 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 | receiver address. | |
| unitPrice | No | Unit price in SUN. | |
| durationSec | No | Duration of the order in seconds. Default 15 minutes | |
| resourceType | No | Resource type to buy. Default ENERGY | ENERGY |
| allowPartialFill | No | Allow partial fill of the order. | |
| buyResourceAmount | No | Amount of resource to buy. Default 100000 for ENERGY and 1000 for BANDWIDTH | |
| minResourceDelegateRequiredAmount | No | Minimum amount of resource to delegate. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unitPrice | Yes | Unit price in SUN | |
| durationSec | Yes | Delegated duration in seconds | |
| estimateTrx | Yes | Estimated TRX cost in SUN | |
| availableResource | Yes | Available resource amount | |
| systemDepositAddress | Yes | System deposit address for onchain payment |