API for TRON (TRX) Energy - Buy and Rent TRON Energy via API
Automate TRON energy purchases, manage bandwidth and reduce USDT transaction costs with a simple REST API.
AI Agent Integration
Let AI agents buy energy automatically via Model Context Protocol (MCP).
TronRental provides an official MCP server that gives AI coding assistants (Claude Code, Cursor, Windsurf) direct access to energy purchasing. The agent can check prices, register, deposit, and buy energy — all autonomously.
Add to your AI agent:
Fully Autonomous
Agent handles registration, API keys, deposits, and purchases without manual steps.
Built-in Savings Calculator
Shows users exactly how much they save before buying.
Zero Configuration
Works out of the box — no API key required to start.
Get Started in Minutes
Code Examples
Buy TRON energy with a single API request. Here's how it looks in your language.
Request
curl -X POST https://tronrental.com/api/v1/energy/buy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"target_address": "TXyz...abc",
"energy_amount": 65000,
"duration_hours": 1
}'Response
{
"order_id": "ord_8f3a2b1c",
"status": "delegated",
"target_address": "TXyz...abc",
"energy_amount": 65000,
"duration_hours": 1,
"price_trx": "1.95",
"tx_hash": "a1b2c3d4e5..."
}Why Developers Choose Us
Secure by Default
API key authentication with optional IP whitelisting. All traffic over HTTPS.
High Performance
Sub-200ms response times. Energy delegated on-chain within 3-5 seconds.
Simple Integration
Standard REST API with JSON responses. No SDK required — use any HTTP client.
Flexible Pricing
Pay-as-you-go with TRX balance. No minimum commitments, no monthly fees.
Webhooks
Get notified when order status changes. No polling needed.
Full Coverage
Energy, bandwidth, smart mode, transfer packages, and premium addresses — all via API.
API Products
Energy & Bandwidth API
Buy and delegate energy and bandwidth to any TRON address. Choose volume and rental duration.
Learn moreAPI Pricing
Live energy and bandwidth prices.
Developer FAQ
How do I authenticate API requests?
Include your API key in the Authorization header: Bearer YOUR_API_KEY. Generate keys in Dashboard → API Keys.
What are the rate limits?
Default rate limit is 60 requests per minute per API key. Contact us if you need higher limits.
How do webhooks work?
Set a webhook URL in your API key settings. We send POST requests with the full order object on every status change.
Which programming languages are supported?
Any language that can make HTTP requests. The API is a standard REST API. We provide examples in cURL, Python, JavaScript, and Go.
How does billing work?
Deposit TRX to your account balance. Each API call deducts from your balance.
Ready to Integrate?
Start building with TronRental API today. Free account, instant API keys, no commitments.