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:
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:
POSThttps://api-dev.tronsave.io/v2/estimate-buy-resourceCreate order:
POSThttps://api-dev.tronsave.io/v2/buy-resourceGet Internal Account Info:
GEThttps://api-dev.tronsave.io/v2/user-infoGet Internal Account Order History:
GEThttps://api-dev.tronsave.io/v2/ordersGet the order details:
GEThttps://api-dev.tronsave.io/v2/order/:idGet Order Book:
GEThttps://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
Learn the difference between Energy and Bandwidth.
Review the Order Types before placing orders.
Last updated