Skip to main content
Version: 0.1.0

TronAgg API

What is TronAgg API?

The TronAgg API lets you automate TRON energy purchases at the best price across multiple providers. Your application can programmatically get quotes, purchase energy, and track orders — all through a simple REST API.

Base URL

https://tronagg.ai/api/v1

All endpoints are relative to this base URL.

Authentication

Every request requires an API key in the X-API-Key header. Create one in the TronAgg Dashboard under API Keys.

curl -H "X-API-Key: ta_your_key_here" https://tronagg.ai/api/v1/account

See the Authentication guide for key management, security best practices, and error handling.

Endpoints Overview

The API has four endpoints covering a typical purchase workflow:

EndpointMethodDescription
/accountGETCheck your balance, deposit address, and wallet
/estimateGETGet a price quote before buying
/buyPOSTPurchase energy for a receiver address
/order/{id}GETTrack order status and get delegation TX IDs

Ready to make your first call? Follow the Quickstart for a step-by-step walkthrough, or jump to Code Examples for copy-paste Python and JavaScript snippets.

Error Codes

CodeDescription
400Bad request — check your parameters
401Unauthorized — invalid or missing API key
402Insufficient balance — top up your account
404Resource not found
422Validation error — see detail field for specifics
429Rate limit exceeded — slow down requests
500Server error — retry or contact support

Rate Limits

The API is rate-limited to ensure fair usage. If you exceed the limit, you'll receive a 429 Too Many Requests response. Wait a few seconds before retrying.

Authentication

API key obtained from your TronAgg Dashboard under API Keys. Keys use the format ta_... and must be passed in the X-API-Key header with every request. Keep your key secret — regenerate it immediately if compromised.

Security Scheme Type:

apiKey

Header parameter name:

X-API-Key