API Key

Buy Energy or Bandwidth with a TronSave API key and a prefunded internal account — no per-order on-chain signing required.

The API-key flow lets you buy resources (Energy and Bandwidth) from a prefunded TronSave internal account. Instead of signing a transaction with your wallet for every order, you authenticate each request with an API key and pay from your internal account balance — so there is no per-order on-chain fee and integration stays simple.

Prefer to pay per order directly from your wallet? Use the Buy with Signed Transaction flow instead.

Before you start

You need a TronSave API key and an internal account with enough balance to cover your orders. There are two ways to create an API key:

  • Option 1: Generate the API key on the TronSave website.

  • Option 2: Generate the API key on Telegram.

See Authentication for how to pass the API key on each request.

Endpoints

Use the API key to call any of the following endpoints:

Endpoint
Description

Read your internal account balance and details.

Fetch the current order book for resource pricing and availability.

Calculate the TRX required for a resource amount and rental duration.

Place an order to buy Energy or Bandwidth, paid from your internal account.

Look up the details and status of a single order by ID.

List the order history for your internal account.

Endpoints (TRON Nile Testnet)

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

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

  • Get Internal Account Info: GET https://api-dev.tronsave.io/v2/user-info

  • Get Internal Account Order History: GET https://api-dev.tronsave.io/v2/orders

  • Get the order details: GET https://api-dev.tronsave.io/v2/order/:id

  • Get Order Book: GET https://api-dev.tronsave.io/v2/order-book

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

Next steps

Last updated