Signed Transaction

Buy Energy or Bandwidth by submitting a signed TRON transaction — estimate cost, get a signed transaction, then create the order.

The signed-transaction flow lets you buy resources by signing a TRON transaction with your own wallet key. Instead of holding a TronSave balance, you pay per order directly from your wallet. The flow has three API steps:

  1. Estimate TRX — calculate the TRX required for the resource amount and rental duration.

  2. Get a signed transaction — produce a signed transaction, either with your own code or via the TronSave API.

  3. Create an order — submit the signed transaction to finalize the resource purchase.

Prefer not to sign transactions yourself? You can also buy with a prepaid balance using your API key. See Buy with API Key.

Before you start

  1. Have access to the private key of the wallet you intend to use for the transaction.

  2. Make sure the wallet holds enough TRX to pay for the order.

The flow

Step 1 — Estimate TRX required

Call the Estimate TRX endpoint to calculate the TRX needed for the desired resource amount and rental duration.

Step 2 — Generate a signed transaction

You have two options:

Step 3 — Create an order

Call the Create Order endpoint to finalize the purchase. Pass:

  • The signed transaction (from the API response, or your own custom-signed transaction).

  • The estimated TRX amount and other required parameters.

Endpoints (TRON Nile Testnet)

  • Estimate TRX: POST https://api-dev.tronsave.io/v2/estimate-buy-resource

  • Get Signed Transaction: POST https://api-dev.tronsave.io/v2/signed-tx

  • Create Order: POST https://api-dev.tronsave.io/v2/buy-resource

To integrate with the Nile Testnet, replace the base URL with https://testnet.tronsave.io/ and follow the same steps.

A ready-to-use Postman collection for this flow is available: Buy with Signed Transaction (Postman).

Next steps

Last updated