API Reference

The TronSave REST API — base URLs, authentication, versioning, the response envelope, and links to every endpoint group.

The TronSave API lets you buy, extend, and sell Energy and Bandwidth on the TRON network programmatically. Every endpoint is a JSON REST call over HTTPS.

Base URLs

Environment
API base URL

Production

https://api.tronsave.io

Testnet (Nile)

https://api-dev.tronsave.io

Endpoints are versioned by path prefix — the current version is v2, e.g. https://api.tronsave.io/v2/buy-resource. See Environments & Networks for the full list of hosts and chains.

Authentication

Most write endpoints require an API key passed in the apikey request header:

curl -X POST https://api.tronsave.io/v2/buy-resource \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

There are two ways to pay for and authorize an order:

  • Using an API key — fund a TronSave internal account, then authenticate each request with your API key. Fast, easy to integrate, and saves transaction fees, but funds are held in a TronSave-managed internal account.

  • Using a signed transaction — build a transaction, sign it with your private key, and submit it. Gives you full control of funds and a higher security bar, at the cost of on-chain transaction fees and a more complex integration.

See Authentication for how to obtain a key, fund your account, and choose between the two methods.

Versioning

v2 is the current API and the one documented throughout this reference. The previous v0 API is still available for existing integrations.

Response envelope

Every API response is wrapped in a consistent JSON envelope:

Field
Description

error

Boolean flag — false on success, true on failure.

message

Human-readable status or error message.

data

The response payload (object) — the shape depends on the endpoint.

For error codes, HTTP status mapping, and rate-limit behavior, see Errors & Rate Limits.

Endpoint groups

Group
What it does

Estimate cost and create orders to buy Energy or Bandwidth, via signed transaction or API key.

Find extendable delegations and extend the duration of existing orders.

List and manage resources you provide to the marketplace.

Quickly top up resources — estimate, create, track, confirm, and cancel orders.

Use the TronSave Model Context Protocol server to drive the API from AI agents.

Next steps

Last updated