# Deposits Source: https://docs.tronrental.com/api-reference/account/deposits Deposit TRX or USDT to your account ## Get Deposit Address
`GET /api/v1/account/deposit`
Returns your personal deposit address and accepted currencies. ```bash theme={null} curl https://api.tronrental.com/v1/account/deposit \ -H "X-API-Key: your_api_key" ``` ```json theme={null} { "deposit_address": "TYourDepositAddress...", "accepted_currencies": ["TRX", "USDT"], "usdt_to_trx_rate": "26.5", "trx_usd_rate": "0.234" } ``` ## List Deposits
`GET /api/v1/account/deposits`
Returns your deposit history. ```bash theme={null} curl https://api.tronrental.com/v1/account/deposits \ -H "X-API-Key: your_api_key" ``` ### Deposit statuses | Status | Description | | ----------- | ------------------------------------------- | | `pending` | Transaction detected, awaiting confirmation | | `confirmed` | Credited to your balance | | `expired` | Deposit address expired | Deposits are credited automatically. TRX deposits are 1:1. USDT deposits are converted to TRX at the current market rate. # Get Balance Source: https://docs.tronrental.com/api-reference/account/get-balance GET /api/v1/account/balance Get your account balance ## Get Balance Returns your current TRX balance. ### Response Account balance in TRX (decimal string) ### Example ```bash theme={null} curl https://api.tronrental.com/v1/account/balance \ -H "X-API-Key: your_api_key" ``` ```json theme={null} { "balance_trx": "156.50" } ``` # Get Profile Source: https://docs.tronrental.com/api-reference/account/get-profile GET /api/v1/account/profile Get your account profile ## Get Profile Returns your account profile information. ### Response User ID Email address (if set) Linked TRON address (if set) Account balance in TRX Whether 2FA is enabled Account creation timestamp ### Example ```bash theme={null} curl https://api.tronrental.com/v1/account/profile \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} { "id": 1, "email": "user@example.com", "tron_address": "TYourAddress...", "balance_trx": "150.50", "totp_enabled": false, "created_at": "2026-01-15T10:00:00Z" } ``` # Withdrawals Source: https://docs.tronrental.com/api-reference/account/withdrawals Withdraw TRX from your account ## Create Withdrawal
`POST /api/v1/account/withdrawal`
Withdraws TRX to any TRON address. Fee: 1 TRX. ### Request body Destination TRON address Amount to withdraw in TRX 2FA code (if 2FA is enabled) ### Example ```bash theme={null} curl -X POST https://api.tronrental.com/v1/account/withdrawal \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "to_address": "TDestinationAddress...", "amount_trx": "100" }' ``` ```json Response theme={null} { "id": 56, "to_address": "TDestinationAddress...", "amount_trx": "100.00", "fee_trx": "1.00", "status": "completed", "tx_hash": "a1b2c3d4e5f6...", "created_at": "2026-03-05T12:00:00Z" } ``` ## List Withdrawals
`GET /api/v1/account/withdrawals`
Returns your withdrawal history. ```bash theme={null} curl https://api.tronrental.com/v1/account/withdrawals \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} [ { "id": 56, "to_address": "TDestinationAddress...", "amount_trx": "100.00", "fee_trx": "1.00", "status": "completed", "tx_hash": "a1b2c3d4e5f6...", "created_at": "2026-03-05T12:00:00Z" } ] ``` ### Withdrawal statuses | Status | Description | | ----------- | ---------------------------- | | `pending` | Queued for processing | | `completed` | TRX sent, tx\_hash available | | `failed` | Failed, amount refunded | # Cancel Auto-renew Rental Source: https://docs.tronrental.com/api-reference/bandwidth-rentals/cancel-rental POST /api/v1/bandwidth/rentals/{rental_id}/cancel Cancel an ongoing bandwidth rental and undelegate it ## Cancel Auto-renew Rental Stops billing and undelegates the bandwidth immediately. ### Path parameters Rental id — the `id` returned by Start Auto-renew Rental ### Response Unique rental identifier Rental status — `cancelled` on success On-chain undelegation transaction id ### Example ```bash theme={null} curl -X POST https://api.tronrental.com/v1/bandwidth/rentals/4321/cancel \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} { "id": 4321, "status": "cancelled", "undelegate_txid": "def456..." } ``` # Start Auto-renew Rental Source: https://docs.tronrental.com/api-reference/bandwidth-rentals/create-rental POST /api/v1/bandwidth/rentals Start an ongoing bandwidth rental, billed daily until cancelled ## Start Auto-renew Rental Delegates bandwidth to a TRON address and keeps it delegated, charging your balance once every 24 hours at the daily (`1d`) rate until you cancel or your balance can't cover the next day. ### Request body Target TRON address (T... format, 34 characters) Amount of bandwidth to keep delegated (min 350, max 100,000) ### Response Unique rental identifier Rental status — `active` on success On-chain delegation transaction id Amount charged per day, in TRX Delegated bandwidth in SUN ISO 8601 timestamp of the next daily charge ### How billing works The first day is charged immediately. Every 24h the daily amount is charged again. If your balance can't cover the next day, the rental ends and the bandwidth is undelegated automatically — and it resumes on its own once you top up. Cancel any time with the cancel endpoint. ### Example ```bash cURL theme={null} curl -X POST https://api.tronrental.com/v1/bandwidth/rentals \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "target_address": "TYourRecipientAddress1234567890abc", "volume": 350 }' ``` ```python Python theme={null} import requests resp = requests.post( "https://api.tronrental.com/v1/bandwidth/rentals", headers={"X-API-Key": "your_api_key"}, json={"target_address": "TYourRecipientAddress1234567890abc", "volume": 350}, ) print(resp.json()) ``` ```javascript JavaScript theme={null} const resp = await fetch("https://api.tronrental.com/v1/bandwidth/rentals", { method: "POST", headers: { "X-API-Key": "your_api_key", "Content-Type": "application/json" }, body: JSON.stringify({ target_address: "TYourRecipientAddress1234567890abc", volume: 350 }), }); console.log(await resp.json()); ``` ```json Response theme={null} { "id": 4321, "status": "active", "txid": "abc123...", "daily_trx": "0.4205", "amount_sun": 1000000, "next_billing_at": "2026-06-11T04:30:00+00:00" } ``` # List Auto-renew Rentals Source: https://docs.tronrental.com/api-reference/bandwidth-rentals/list-rentals GET /api/v1/bandwidth/rentals List your ongoing bandwidth rentals ## List Auto-renew Rentals Returns your auto-renew bandwidth rentals, newest first. ### Query parameters Filter by status: `active`, `cancelled`, or `ended_insufficient_balance` ### Response Returns `rentals` — an array of rental objects with `status`, `volume`, `daily_trx`, `total_charged_trx`, `next_billing_at`, and timestamps. ### Rental statuses | Status | Description | | ---------------------------- | --------------------------------------------------------- | | `active` | Delegated and billing daily | | `cancelled` | Cancelled by the user (or admin) | | `ended_insufficient_balance` | Ended automatically — balance couldn't cover the next day | ### Example ```bash theme={null} curl "https://api.tronrental.com/v1/bandwidth/rentals?status=active" \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} { "rentals": [ { "id": 4321, "address": "TYourRecipientAddress1234567890abc", "volume": 350, "status": "active", "daily_trx": "0.4205", "total_charged_trx": "1.2615", "billing_count": 3, "next_billing_at": "2026-06-11T04:30:00+00:00", "last_billed_at": "2026-06-10T04:30:00+00:00", "delegate_txid": "abc123...", "undelegate_txid": null, "ended_at": null, "created_at": "2026-06-08T04:30:00+00:00" } ] } ``` # Buy Bandwidth Source: https://docs.tronrental.com/api-reference/bandwidth/buy-bandwidth POST /api/v1/bandwidth/buy Purchase bandwidth for a TRON address ## Buy Bandwidth Delegates bandwidth to the specified TRON address. The cost is deducted from your account balance. ### Request body Target TRON address (T... format, 34 characters) Amount of bandwidth to delegate (min 350, max 100,000) Rental duration: `"1h"` (1 hour) or `"1d"` (24 hours). Use `"1d"`, not `"24h"` or numeric hour values. ### Response Unique order identifier Order status: `pending`, `filled`, `failed` On-chain transaction id once the delegation is broadcast (null while `pending`) Total cost charged from your balance, in TRX ISO 8601 timestamp when the bandwidth rental is reclaimed ### Pricing Price = `(volume × price_sun) / 1,000,000 + 0.2 TRX` fixed fee. Get current `price_sun_1h`, `price_sun_1d`, and `fixed_fee_trx` from `GET /v1/bandwidth/prices`. ### Example ```bash cURL theme={null} curl -X POST https://api.tronrental.com/v1/bandwidth/buy \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "target_address": "TYourRecipientAddress1234567890abc", "volume": 16000, "duration": "1d" }' ``` ```python Python theme={null} import requests resp = requests.post( "https://api.tronrental.com/v1/bandwidth/buy", headers={"X-API-Key": "your_api_key"}, json={ "target_address": "TYourRecipientAddress1234567890abc", "volume": 16000, "duration": "1d", }, ) print(resp.json()) ``` ```javascript JavaScript theme={null} const resp = await fetch("https://api.tronrental.com/v1/bandwidth/buy", { method: "POST", headers: { "X-API-Key": "your_api_key", "Content-Type": "application/json", }, body: JSON.stringify({ target_address: "TYourRecipientAddress1234567890abc", volume: 16000, duration: "1d", }), }); console.log(await resp.json()); ``` ```json Response theme={null} { "id": 5678, "price_trx": "10.28", "status": "filled", "txid": "abc123...", "reclaim_at": "2026-06-10T21:00:00+00:00" } ``` **350 bandwidth** covers one USDT TRC-20 transfer when free daily bandwidth is exhausted. # Activate Address Source: https://docs.tronrental.com/api-reference/energy/activate-address POST /api/v1/energy/activate Activate an inactive TRON address on the blockchain ## Activate Address Activates a TRON address that has never received any transaction. Required before the address can receive tokens. **Cost: 1.2 TRX** (deducted from your balance) ### Request body TRON address to activate (T... format) ### Response Whether the activation succeeded `completed` — we broadcast the activation; `already_activated` — the address was already active on-chain Activation transaction hash TRX charged for this activation (0 when the address was already active) Activation record id ### Example ```bash theme={null} curl -X POST https://api.tronrental.com/v1/energy/activate \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{"target_address": "TNewInactiveAddress..."}' ``` ```json Response theme={null} { "success": true, "status": "completed", "txid": "a1b2c3d4e5f6...", "cost_trx": "1.2", "id": 12345 } ``` # Buy Energy Source: https://docs.tronrental.com/api-reference/energy/buy-energy POST /api/v1/energy/buy Purchase energy for a TRON address ## Buy Energy Delegates energy to the specified TRON address. The cost is deducted from your account balance. ### Request body Target TRON address (T... format, 34 characters) Amount of energy to delegate (min 32,000, max 5,000,000) Rental duration: `"1h"` (1 hour only) ### Response Unique order identifier Order status: `pending`, `filled`, `failed` On-chain transaction id once the delegation is broadcast (null while `pending`) Total cost charged from your balance, in TRX ISO 8601 timestamp when the bandwidth rental is reclaimed (energy is reclaimed automatically by the provider) Address activation cost in TRX (`"0"` if the recipient is already activated) ### Example ```bash cURL theme={null} curl -X POST https://api.tronrental.com/v1/energy/buy \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "target_address": "TYourRecipientAddress1234567890abc", "volume": 65000, "duration": "1h" }' ``` ```python Python theme={null} import requests resp = requests.post( "https://api.tronrental.com/v1/energy/buy", headers={"X-API-Key": "your_api_key"}, json={ "target_address": "TYourRecipientAddress1234567890abc", "volume": 65000, "duration": "1h", }, ) print(resp.json()) ``` ```javascript JavaScript theme={null} const resp = await fetch("https://api.tronrental.com/v1/energy/buy", { method: "POST", headers: { "X-API-Key": "your_api_key", "Content-Type": "application/json", }, body: JSON.stringify({ target_address: "TYourRecipientAddress1234567890abc", volume: 65000, duration: "1h", }), }); console.log(await resp.json()); ``` ```json Response theme={null} { "id": 12345, "price_trx": "2.75", "status": "pending" } ``` **65,000 energy** covers one USDT transfer to an address that already holds USDT. Use **131,000** for first-time USDT recipients (new storage slot creation). # Get Prices Source: https://docs.tronrental.com/api-reference/energy/get-prices GET /api/v1/prices Get current energy and bandwidth prices ## Get Prices Returns current market prices for energy and bandwidth. **This endpoint is public — no authentication required.** ### Response Energy price in TRX for 65,000 units, keyed by duration (`1h`) Energy price in SUN per 1 unit, keyed by duration (`1h`) Energy price in USD for 65,000 units, keyed by duration (`1h`) Volume used for energy price calculation (65,000) Bandwidth price in TRX for 350 units, keyed by duration (`1h`) Bandwidth price in SUN per 1 unit, keyed by duration (`1h`) Bandwidth price in USD for 350 units, keyed by duration (`1h`) Volume used for bandwidth price calculation (350) Current TRX/USD exchange rate Cost of burning TRX for 65,000 energy (without rental) Same burn cost in USD Percentage saved by renting vs burning ### Example ```bash cURL theme={null} curl https://api.tronrental.com/v1/prices ``` ```python Python theme={null} import requests resp = requests.get("https://api.tronrental.com/v1/prices") print(resp.json()) ``` ```javascript JavaScript theme={null} const resp = await fetch("https://api.tronrental.com/v1/prices"); const data = await resp.json(); console.log(data); ``` Response values below are examples. Actual prices update in real-time based on market conditions. ```json Response theme={null} { "energy_trx": {"1h": "2.32"}, "energy_sun": {"1h": "35.68"}, "energy_usd": {"1h": "0.69"}, "energy_volume": 65000, "bandwidth_trx": {"1h": "0.14"}, "bandwidth_sun": {"1h": "400.00"}, "bandwidth_usd": {"1h": "0.04"}, "bandwidth_volume": 350, "trx_usd_rate": "0.297", "burn_cost_trx": "6.5", "burn_cost_usd": "1.93", "savings_percent": "64.3", "note": "Energy price is for 65,000 units in TRX" } ``` # Create Invoice Source: https://docs.tronrental.com/api-reference/invoices/create-invoice POST /api/v1/invoices Create a payment invoice for energy delegation ## Create Invoice Creates a payment invoice that generates a unique deposit address. When payment (TRX or USDT) is received, energy is automatically delegated to the target address. **Useful for integrations where end-users pay directly** — no account balance needed. ### Request body Target TRON address to receive energy Energy amount (32,000 – 5,000,000). Use this OR `transfer_count`. Number of USDT transfers (1 – 100). Each transfer = 65,000 energy. Bandwidth amount to rent. Optional add-on: energy and bandwidth can be combined in one invoice. Bandwidth rental duration: `1h` or `1d`. Energy is always hourly. ### Response Unique invoice identifier Unique deposit address — send TRX or USDT here Price in TRX Price in USDT Invoice status: `pending`, `paid`, `delegated`, `expired`, `failed` ISO 8601 expiration timestamp ### Example ```bash theme={null} curl -X POST https://api.tronrental.com/v1/invoices \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "target_address": "TRecipientAddress...", "transfer_count": 1, "duration": "1h" }' ``` ```json Response theme={null} { "invoice_id": 789, "payment_address": "TPaymentAddress...", "target_address": "TRecipientAddress...", "energy_amount": 65000, "duration": "1h", "price_trx": "2.75", "price_usdt": "0.64", "status": "pending", "expires_at": "2026-03-05T12:30:00Z" } ``` Invoices expire after 30 minutes if no payment is received. Both TRX and USDT payments are accepted at the generated address. # Get Invoice Source: https://docs.tronrental.com/api-reference/invoices/get-invoice GET /api/v1/invoices/{invoice_id} Get invoice details by ID ## Get Invoice Returns details and current status of an invoice. ### Path parameters Invoice ID ### Response Returns the full invoice object including `status`, `payment_address`, `price_trx`, `price_usdt`, `tx_hash`, and timestamps. ### Invoice statuses | Status | Description | | ----------- | ---------------------------------------- | | `pending` | Waiting for payment | | `paid` | Payment received, delegation in progress | | `delegated` | Energy successfully delegated | | `expired` | No payment received before expiration | | `failed` | Delegation failed (payment refunded) | ### Example ```bash theme={null} curl https://api.tronrental.com/v1/invoices/12345 \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} { "invoice_id": "7c1f0c2a-3b4d-4e5f-8a9b-0c1d2e3f4a5b", "payment_address": "TPaymentAddress...", "target_address": "TRecipientAddress...", "energy_amount": 65000, "duration": "1h", "price_trx": "2.75", "price_usdt": "0.64", "status": "delegated", "tx_hash": "a1b2c3d4e5f6...", "paid_at": "2026-03-05T12:05:00Z", "delegated_at": "2026-03-05T12:05:30Z", "expires_at": "2026-03-05T12:30:00Z", "created_at": "2026-03-05T12:00:00Z" } ``` # List Invoices Source: https://docs.tronrental.com/api-reference/invoices/list-invoices GET /api/v1/invoices/my List your invoices with optional filtering ## List Invoices Returns a paginated list of your invoices. ### Query parameters Page number Filter by status: `pending`, `paid`, `delegated`, `expired`, `failed` ### Response Returns a paginated object with `invoices` array and `total` count. ### Example ```bash theme={null} curl "https://api.tronrental.com/v1/invoices/my?page=1&status=delegated" \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} { "invoices": [ { "invoice_id": 789, "payment_address": "TPaymentAddress...", "target_address": "TRecipientAddress...", "energy_amount": 65000, "duration": "1h", "price_trx": "2.75", "price_usdt": "0.64", "status": "delegated", "created_at": "2026-03-05T12:00:00Z" } ], "total": 1, "page": 1, "pages": 1 } ``` # Get Order Source: https://docs.tronrental.com/api-reference/orders/get-order GET /api/v1/orders/{order_id} Check the status of an energy or bandwidth order by ID ## Get Order Returns the current status and full details of an energy or bandwidth order. ### Path parameters Order ID — the `id` returned by Buy Energy or Buy Bandwidth. ### Response Returns the full order object including `status`, `type`, `volume`, `price_trx`, `delegate_txid`, and timestamps. ### Order statuses | Status | Description | | ----------- | ------------------------------------------------------------------ | | `pending` | Order received, delegation in progress | | `filled` | Energy or bandwidth successfully delegated | | `failed` | Delegation failed | | `reclaimed` | Bandwidth returned after the rental period (bandwidth orders only) | ### Example ```bash theme={null} curl https://api.tronrental.com/v1/orders/12345 \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} { "id": 12345, "type": "energy", "target_address": "TRecipientAddress...", "volume": 65000, "duration": "1h", "price_trx": "1.79", "status": "filled", "delegate_txid": "a1b2c3d4e5f6...", "undelegate_txid": null, "reclaim_at": null, "source": "api", "created_at": "2026-06-10T04:30:00Z" } ``` # List Orders Source: https://docs.tronrental.com/api-reference/orders/list-orders GET /api/v1/orders List your orders with pagination and filters ## List Orders Returns a paginated list of your orders, newest first. ### Query parameters Page number (default 1) Results per page (default 50, max 100) Filter by status (e.g. `filled`, `pending`, `failed`) Filter by order type — `energy` or `bandwidth` ### Response Returns `orders` (array of order objects), `total`, `page`, and `page_size`. ### Example ```bash theme={null} curl "https://api.tronrental.com/v1/orders?type=energy&status=filled&page=1" \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} { "orders": [ { "id": 12345, "type": "energy", "target_address": "TRecipientAddress...", "volume": 65000, "duration": "1h", "price_trx": "1.79", "status": "filled", "delegate_txid": "a1b2c3d4e5f6...", "undelegate_txid": null, "reclaim_at": null, "source": "api", "created_at": "2026-06-10T04:30:00Z" } ], "total": 42, "page": 1, "page_size": 50 } ``` # Activate Source: https://docs.tronrental.com/api-reference/smart-mode/activate POST /api/v1/smart-mode/activate Activate Smart Mode for a TRON address ## Activate Smart Mode Starts automatic energy delivery for the specified address. The first daily fee is charged immediately. ### Request body TRON address to monitor Optional label for this subscription Enable BW Guarantee (+0.3 TRX per transfer) ### Response Returns the created subscription object with `id`, `address`, `status`, and fee details. ### Example ```bash theme={null} curl -X POST https://api.tronrental.com/v1/smart-mode/activate \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "address": "TYourAddress...", "label": "Main wallet", "bw_guarantee": true }' ``` ```json Response theme={null} { "id": 42, "address": "TYourAddress...", "label": "Main wallet", "status": "active", "bw_guarantee": true, "subscription_fee_trx": "3.0", "transfer_fee_trx": "2.7", "created_at": "2026-03-05T12:00:00Z" } ``` The address cannot have an active Transfer Package at the same time. Smart Mode and Transfer Packages are mutually exclusive per address. # Deactivate Source: https://docs.tronrental.com/api-reference/smart-mode/deactivate POST /api/v1/smart-mode/{sub_id}/deactivate Permanently deactivate a Smart Mode subscription ## Deactivate Subscription Permanently deactivates a Smart Mode subscription. This action cannot be undone — you'll need to create a new subscription to re-enable. ### Path parameters Subscription ID ### Response Returns the deactivated subscription object. ### Example ```bash theme={null} curl -X POST https://api.tronrental.com/v1/smart-mode/42/deactivate \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} { "id": 42, "address": "TYourAddress...", "status": "deactivated", "message": "Subscription permanently deactivated" } ``` # Get Fees Source: https://docs.tronrental.com/api-reference/smart-mode/get-fees GET /api/v1/smart-mode/fees Get current Smart Mode pricing ## Get Smart Mode Fees Returns the current Smart Mode pricing for your account. If custom pricing is configured, returns your personalized rates. ### Response Daily subscription fee in TRX Per-transfer fee in TRX BW Guarantee fee per transfer in TRX ### Example ```bash theme={null} curl https://api.tronrental.com/v1/smart-mode/fees \ -H "X-API-Key: your_api_key" ``` ```json theme={null} { "subscription_fee_trx": "3.0", "transfer_fee_trx": "2.7", "bw_fee_trx": "0.3" } ``` # List Subscriptions Source: https://docs.tronrental.com/api-reference/smart-mode/list-subscriptions GET /api/v1/smart-mode/subscriptions List your active Smart Mode subscriptions ## List Subscriptions Returns all active and paused Smart Mode subscriptions. Deactivated subscriptions are not included. ### Response Array of subscription objects: Subscription ID Monitored TRON address Optional label `active` or `paused` Whether BW Guarantee is enabled ISO 8601 timestamp ### Example ```bash theme={null} curl https://api.tronrental.com/v1/smart-mode/subscriptions \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} [ { "id": 42, "address": "TYourAddress...", "label": "Main wallet", "status": "active", "bw_guarantee": true, "created_at": "2026-03-05T12:00:00Z" }, { "id": 43, "address": "TAnotherAddress...", "label": null, "status": "paused", "bw_guarantee": false, "created_at": "2026-03-04T10:00:00Z" } ] ``` # Smart Mode Overview Source: https://docs.tronrental.com/api-reference/smart-mode/overview Automatic energy for every USDT transfer ## Smart Mode Smart Mode automatically provides energy for every outgoing USDT transfer from a monitored address. No manual API calls needed — just activate and transfer. ### How it works 1. **Activate** Smart Mode for a TRON address 2. Every time that address sends USDT, energy is **automatically delegated** 3. Daily subscription fee + per-transfer fee deducted from your balance 4. If balance runs out, the subscription is paused (not deleted) ### Pricing | Fee | Amount | | ----------------------- | -------------------- | | Daily subscription | 3.0 TRX/day | | Per USDT transfer | 2.7 TRX × multiplier | | BW Guarantee (optional) | +0.3 TRX/transfer | The transfer multiplier is `1` for addresses that already hold USDT (65K energy) and `2` for first-time recipients (131K energy). **BW Guarantee** (enabled by default) delegates 350 bandwidth to cover the transaction's bandwidth cost. Without it, the sender needs \~0.35 TRX worth of bandwidth or frozen TRX. The prices above are defaults. Use [`GET /smart-mode/fees`](/api-reference/smart-mode/get-fees) to check your actual rates — custom pricing may apply. ### Limits * Maximum 5 active subscriptions per account * Custom pricing available for high-volume users (contact support) # Toggle Subscription Source: https://docs.tronrental.com/api-reference/smart-mode/toggle POST /api/v1/smart-mode/{sub_id}/toggle Pause or resume a Smart Mode subscription ## Toggle Subscription Pauses an active subscription or resumes a paused one. While paused, no fees are charged and transfers are not monitored. ### Path parameters Subscription ID ### Response Returns the updated subscription object with new `status`. ### Example ```bash theme={null} curl -X POST https://api.tronrental.com/v1/smart-mode/42/toggle \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} { "id": 42, "address": "TYourAddress...", "label": "Main wallet", "status": "paused", "bw_guarantee": true, "created_at": "2026-03-05T12:00:00Z" } ``` # Buy Package Source: https://docs.tronrental.com/api-reference/transfer-packages/buy POST /api/v1/transfer-packages/buy Buy a transfer package with account balance ## Buy Transfer Package Purchases a transfer package using your account balance. ### Request body TRON address to monitor Number of transfers (1 – 10,000) Enable BW Guarantee ### Response Returns the created package object with `id`, `address`, `remaining_transfers`, `status`, and `price_trx`. ### Example ```bash theme={null} curl -X POST https://api.tronrental.com/v1/transfer-packages/buy \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "address": "TYourAddress...", "package_size": 500, "bw_guarantee": true }' ``` ```json Response theme={null} { "id": 101, "address": "TYourAddress...", "total_transfers": 500, "remaining_transfers": 500, "bw_guarantee": true, "price_trx": "1350.00", "status": "active", "created_at": "2026-03-05T12:00:00Z" } ``` You can also pay via invoice using `POST /api/v1/transfer-packages/buy-invoice` — this generates a payment address for TRX/USDT. # Get Tiers Source: https://docs.tronrental.com/api-reference/transfer-packages/get-tiers GET /api/v1/transfer-packages/tiers Get available package sizes and pricing ## Get Package Tiers Returns available preset package sizes, pricing, and limits. ### Response Array of preset package options with size and total price Price for a single transfer in TRX BW Guarantee fee per transfer in TRX Minimum custom package size (1) Maximum custom package size (10,000) ### Example ```bash theme={null} curl https://api.tronrental.com/v1/transfer-packages/tiers \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} { "tiers": [ { "size": 100, "price_trx": "270.00" }, { "size": 500, "price_trx": "1350.00" }, { "size": 1000, "price_trx": "2700.00" } ], "single_transfer_price": "2.70", "bw_fee_per_transfer": "0.30", "min_custom_size": 1, "max_custom_size": 10000 } ``` # List Packages Source: https://docs.tronrental.com/api-reference/transfer-packages/list GET /api/v1/transfer-packages/my List your transfer packages ## List My Packages Returns all your transfer packages. ### Response Array of package objects with `id`, `address`, `total_transfers`, `remaining_transfers`, `status`, and `created_at`. ### Package statuses | Status | Description | | ----------------- | --------------------------------------- | | `pending_payment` | Awaiting invoice payment | | `active` | Monitoring address, transfers available | | `completed` | All transfers used | | `cancelled` | Cancelled by user | ### Example ```bash theme={null} curl https://api.tronrental.com/v1/transfer-packages/my \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} [ { "id": 101, "address": "TYourAddress...", "total_transfers": 500, "remaining_transfers": 312, "bw_guarantee": true, "status": "active", "created_at": "2026-03-01T10:00:00Z" } ] ``` # Transfer Packages Overview Source: https://docs.tronrental.com/api-reference/transfer-packages/overview Prepaid packages of USDT transfers with guaranteed energy ## Transfer Packages Transfer Packages are prepaid bundles of USDT transfers. Buy a package of N transfers, and each outgoing USDT transfer from the address automatically receives energy until the package is used up. ### How it works 1. **Buy a package** for a specific TRON address (e.g., 500 transfers) 2. Each outgoing USDT transfer **automatically gets energy** 3. Package counter decrements with each transfer 4. When the package is exhausted, monitoring stops ### Pricing | Package size | Price per transfer | | ----------------------- | ------------------ | | 1 – 10,000 transfers | 2.7 TRX | | BW Guarantee (optional) | +0.3 TRX/transfer | **Quick-select presets:** 500, 1,000, 5,000, 10,000 ### Transfer Packages vs Smart Mode | Feature | Transfer Packages | Smart Mode | | -------- | -------------------- | --------------------------------- | | Billing | Prepaid (one-time) | Daily subscription + per-transfer | | Duration | Until transfers used | Ongoing | | Best for | Predictable volume | Continuous usage | An address cannot have both an active Transfer Package and Smart Mode at the same time. # Configure Webhook Source: https://docs.tronrental.com/api-reference/webhooks/configure POST /api/v1/webhooks/configure Set your webhook URL ## Configure Webhook Sets or updates your webhook URL. Only one URL per account. ### Request body HTTPS webhook URL ### Example ```bash theme={null} curl -X POST https://api.tronrental.com/v1/webhooks/configure \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{"url": "https://yourserver.com/webhook/tronrental"}' ``` ```json Response theme={null} { "url": "https://yourserver.com/webhook/tronrental", "secret": "whsec_abc123...", "active": true, "created_at": "2026-03-05T12:00:00Z" } ``` To remove webhook, send an empty URL or delete via dashboard. # Webhook Logs Source: https://docs.tronrental.com/api-reference/webhooks/events GET /api/v1/webhooks/logs View recent webhook delivery logs ## Webhook Logs Returns recent webhook delivery attempts for debugging. ### Response Array of log entries: Log entry ID Event that triggered the webhook The payload that was sent HTTP status code from your server Number of delivery attempts Timestamp ### Example ```bash theme={null} curl https://api.tronrental.com/v1/webhooks/logs \ -H "X-API-Key: your_api_key" ``` ```json Response theme={null} [ { "id": 1, "event_type": "order.filled", "payload": { "order_id": 12345, "address": "TAddress...", "energy_amount": 65000 }, "response_status": 200, "attempts": 1, "created_at": "2026-03-05T12:00:00Z" } ] ``` # Webhooks Overview Source: https://docs.tronrental.com/api-reference/webhooks/overview Receive real-time notifications for account events ## Webhooks Configure a webhook URL to receive real-time HTTP POST notifications when events occur on your account. ### Supported events | Event | Description | | ---------------------- | ----------------------------- | | `order.filled` | Energy order completed | | `order.failed` | Energy order failed | | `deposit.confirmed` | Deposit credited to balance | | `invoice.paid` | Invoice payment received | | `invoice.delegated` | Invoice energy delegated | | `smart_mode.transfer` | Smart Mode transfer processed | | `withdrawal.completed` | Withdrawal sent | ### Webhook payload ```json theme={null} { "event": "order.filled", "data": { "order_id": 1234, "address": "TAddress...", "energy_amount": 65000, "price_trx": "2.75" }, "timestamp": "2026-03-04T12:00:00Z" } ``` ### Requirements * URL must use **HTTPS** * Must respond with `2xx` status within 10 seconds * Failed deliveries are retried up to 3 times with exponential backoff ### Verifying webhook signatures Every webhook request includes an `X-Webhook-Signature` header containing an HMAC-SHA256 signature. Use this to verify that the request is from TronRental. The signature is computed over the raw request body using your webhook secret (returned when you [configure your webhook](/api-reference/webhooks/configure)). ```python Python theme={null} import hmac import hashlib def verify_webhook(payload: bytes, signature: str, secret: str) -> bool: expected = hmac.new( secret.encode(), payload, hashlib.sha256 ).hexdigest() return hmac.compare_digest(expected, signature) # In your webhook handler: # payload = request.body (raw bytes) # signature = request.headers["X-Webhook-Signature"] # secret = "whsec_abc123..." (from configure response) # if not verify_webhook(payload, signature, secret): # return Response(status_code=401) ``` ```javascript JavaScript theme={null} const crypto = require("crypto"); function verifyWebhook(payload, signature, secret) { const expected = crypto .createHmac("sha256", secret) .update(payload) .digest("hex"); return crypto.timingSafeEqual( Buffer.from(expected), Buffer.from(signature) ); } // In your webhook handler: // const payload = req.rawBody; // raw request body string // const signature = req.headers["x-webhook-signature"]; // const secret = "whsec_abc123..."; // if (!verifyWebhook(payload, signature, secret)) { // return res.status(401).send("Invalid signature"); // } ``` Always verify the signature before processing webhook data. Use constant-time comparison (`hmac.compare_digest` / `crypto.timingSafeEqual`) to prevent timing attacks. Webhook URLs cannot point to `localhost`, `127.0.0.1`, or other private addresses. # Authentication Source: https://docs.tronrental.com/authentication How to authenticate with the TronRental API ## API Key Authentication All API requests require an API key passed in the `X-API-Key` header. ```bash theme={null} curl https://api.tronrental.com/v1/account/balance \ -H "X-API-Key: your_api_key" ``` ### Getting an API key 1. Sign up at [tronrental.com](https://tronrental.com/auth/register) 2. Go to [Dashboard → API Keys](https://tronrental.com/dashboard/api) 3. Click **Create API Key** 4. Copy and securely store your key — it's shown only once ### IP Whitelist (optional) You can restrict your API key to specific IP addresses for additional security. Configure this in the dashboard when creating or editing a key. ### Key permissions Each API key has full access to your account's API operations: * Buy energy and bandwidth * Manage Smart Mode subscriptions * Create invoices * Check balance and transaction history Keep your API key secret. Do not expose it in client-side code, public repositories, or URLs. ## Rate Limits API keys are rate-limited per endpoint. See [Rate Limits](/resources/rate-limits) for details. ## Errors Authentication errors return HTTP `401`: ```json theme={null} { "detail": "Invalid or missing API key" } ``` If your key is disabled or blocked, you'll receive HTTP `403`. # Errors Source: https://docs.tronrental.com/errors API error codes and handling ## Error format All errors return a JSON response with a `detail` field: ```json theme={null} { "detail": "Insufficient balance" } ``` Some errors include a structured `code` for programmatic handling: ```json theme={null} { "detail": { "error": { "code": "INSUFFICIENT_BALANCE", "message": "Not enough TRX balance" } } } ``` ## HTTP Status Codes | Code | Meaning | | ----- | ------------------------------------------------- | | `200` | Success | | `400` | Bad request — invalid parameters | | `401` | Unauthorized — missing or invalid API key | | `403` | Forbidden — key disabled or action not allowed | | `404` | Not found | | `409` | Conflict — duplicate request or resource conflict | | `422` | Validation error — check request body | | `429` | Rate limit exceeded | | `500` | Server error | ## Common error codes | Code | Description | | ------------------------ | ------------------------------------------ | | `INSUFFICIENT_BALANCE` | Account balance too low for this operation | | `ADDRESS_ALREADY_ACTIVE` | Smart Mode already active for this address | | `ORDER_NOT_FOUND` | Order ID does not exist | | `INVALID_ADDRESS` | Not a valid TRON address | | `RATE_LIMITED` | Too many requests, retry after cooldown | | `PASSKEY_REQUIRED` | Withdrawal requires passkey verification | | `2FA_REQUIRED` | Withdrawal requires 2FA code | ## Retry strategy For `429` and `5xx` errors, implement exponential backoff: ```python theme={null} import time import requests def api_call_with_retry(url, **kwargs): for attempt in range(3): resp = requests.get(url, **kwargs) if resp.status_code == 429 or resp.status_code >= 500: time.sleep(2 ** attempt) continue return resp raise Exception("Max retries exceeded") ``` # Introduction Source: https://docs.tronrental.com/introduction TronRental API — programmatic access to TRON energy and bandwidth rental ## Welcome to TronRental API TronRental provides a REST API for renting TRON energy and bandwidth. Reduce your USDT transfer costs by up to 80% compared to burning TRX. ### What you can do Purchase energy for any TRON address. Pay per transaction or in bulk. Automatic energy delivery for every outgoing USDT transfer. Prepaid packages of USDT transfers with guaranteed energy. Create payment invoices for energy — no account required for your users. ### Base URL All API requests use the following base URL: ``` https://api.tronrental.com/v1 ``` ### Quick example ```bash theme={null} curl -X POST https://api.tronrental.com/v1/energy/buy \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "target_address": "TYourTronAddress...", "volume": 65000, "duration": "1h" }' ``` ```json Response theme={null} { "id": 12345, "status": "completed", "txid": "a1b2c3d4e5f6...", "price_trx": "2.75", "activation_cost_trx": "0" } ``` ## Next steps Sign up at [tronrental.com](https://tronrental.com/auth/register) and create an API key in the [dashboard](https://tronrental.com/dashboard/api). Call `GET /api/v1/prices` to see current energy and bandwidth prices. Use `POST /api/v1/energy/buy` to buy energy for a TRON address. # Quickstart Source: https://docs.tronrental.com/quickstart Buy TRON energy in under 5 minutes ## 1. Get your API key Sign up and create an API key at [tronrental.com/dashboard/api](https://tronrental.com/dashboard/api). ## 2. Check prices ```bash theme={null} curl https://api.tronrental.com/v1/prices ``` ```json theme={null} { "energy_trx": { "1h": "1.79" }, "energy_sun": { "1h": "27.54" }, "energy_volume": 65000, "energy_fixed_fee_trx": "0.2", "bandwidth_trx": { "1h": "0.34", "1d": "0.42" }, "bandwidth_sun": { "1h": "400", "1d": "630" }, "bandwidth_volume": 350, "trx_usd_rate": "0.234", "burn_cost_trx": "6.5", "savings_percent": "72.5" } ``` Energy rental is **1 hour only** (`"1h"`). Bandwidth supports `"1h"` or `"1d"`. `energy_trx` is rental only — add `energy_fixed_fee_trx` (0.2 TRX) at checkout. ## 3. Deposit TRX Check your deposit address: ```bash theme={null} curl https://api.tronrental.com/v1/account/deposit \ -H "X-API-Key: your_api_key" ``` Send TRX or USDT to the returned `deposit_address`. Deposits are credited automatically. ## 4. Buy energy ```bash theme={null} curl -X POST https://api.tronrental.com/v1/energy/buy \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "target_address": "TYourRecipientAddress1234567890abc", "volume": 65000, "duration": "1h" }' ``` ```json theme={null} { "id": 12345, "price_trx": "2.75", "status": "pending", "txid": null, "reclaim_at": null, "activation_cost_trx": "0" } ``` The energy will be delegated to the target address within seconds. ## 5. Verify Check your order status: ```bash theme={null} curl https://api.tronrental.com/v1/orders \ -H "X-API-Key: your_api_key" ``` ```json theme={null} { "orders": [ { "id": 12345, "type": "energy", "target_address": "TYourRecipientAddress1234567890abc", "volume": 65000, "duration": "1h", "price_trx": "2.75", "status": "filled", "delegate_txid": "abc123...", "reclaim_at": null, "source": "api", "created_at": "2026-06-09T12:00:00Z" } ], "total": 1, "page": 1, "page_size": 50 } ``` **65,000 energy** is enough for one USDT transfer to an address that already holds USDT. For first-time USDT recipients, use **131,000 energy**. ## Code examples ```python Python theme={null} import requests API_KEY = "your_api_key" BASE = "https://api.tronrental.com/v1" headers = {"X-API-Key": API_KEY} resp = requests.post( f"{BASE}/energy/buy", headers=headers, json={ "target_address": "TYourRecipientAddress1234567890abc", "volume": 65000, "duration": "1h", }, ) print(resp.json()) ``` ```javascript JavaScript theme={null} const API_KEY = "your_api_key"; const BASE = "https://api.tronrental.com/v1"; const res = await fetch(`${BASE}/energy/buy`, { method: "POST", headers: { "X-API-Key": API_KEY, "Content-Type": "application/json", }, body: JSON.stringify({ target_address: "TYourRecipientAddress1234567890abc", volume: 65000, duration: "1h", }), }); console.log(await res.json()); ``` # Changelog Source: https://docs.tronrental.com/resources/changelog API updates and changes ## Changelog ### March 2026 * **Transfer Packages** — prepaid bundles of USDT transfers * **BW Guarantee** — optional bandwidth delegation for Smart Mode and Transfer Packages * **Webhooks** — real-time notifications for account events * **Withdrawal API** — withdraw TRX to any TRON address ### February 2026 * **Smart Mode** — automatic energy for USDT transfers * **Invoice API** — create payment invoices for energy * **API Keys** — IP whitelist support * **Bandwidth API** — buy bandwidth for TRON addresses ### January 2026 — Initial Release * Energy purchase API * Account management (balance, deposits, profile) * Real-time pricing # MCP Server Source: https://docs.tronrental.com/resources/mcp-server Use TronRental via AI agents with Model Context Protocol (MCP) ## What is MCP? [Model Context Protocol (MCP)](https://modelcontextprotocol.io) is an open standard that lets AI agents (Claude Code, Cursor, Windsurf, and others) interact with external services through a unified interface. TronRental provides an official MCP server that gives AI agents full access to the energy purchasing API — from checking prices to completing purchases. ## Quick Start Add to your AI agent: ```bash theme={null} npx -y @tronrental-com/mcp-server ``` ### Claude Code ```bash theme={null} # Without API key (agent will register automatically) claude mcp add tronrental -- npx -y @tronrental-com/mcp-server # With API key claude mcp add tronrental -e TRONRENTAL_API_KEY=your_key -- npx -y @tronrental-com/mcp-server ``` ### Cursor / Windsurf Add to your MCP configuration: ```json theme={null} { "mcpServers": { "tronrental": { "command": "npx", "args": ["-y", "@tronrental-com/mcp-server"], "env": { "TRONRENTAL_API_KEY": "your_key" // pragma: allowlist secret } } } } ``` The `TRONRENTAL_API_KEY` environment variable is optional. If not provided, the agent can register a new account and create an API key through the MCP tools. ## Available Tools The MCP server provides 10 tools: | Tool | Auth | Description | | ---------------------------- | ------- | ------------------------------------------- | | `get_prices` | None | Current energy and bandwidth prices | | `calculate_savings` | None | Calculate savings: burn cost vs rental cost | | `register` | None | Register a new account | | `login` | None | Log in to existing account | | `create_api_key` | Token | Create an API key | | `get_deposit_address` | API key | Get TRX deposit address | | `get_balance` | API key | Check account balance | | `buy_energy` | API key | Buy energy for a TRON address | | `get_order` | API key | Check order status | | `regenerate_deposit_address` | API key | Generate a new deposit address | ## Typical Flow ### New user (no API key) 1. `get_prices` — show current pricing 2. `calculate_savings` — calculate savings for user's transfer volume 3. `register` — create account 4. `create_api_key` — generate API key 5. `get_deposit_address` — get deposit address, user sends TRX 6. `get_balance` — verify deposit arrived 7. `buy_energy` — purchase energy 8. `get_order` — confirm delegation ### Existing user (API key set) 1. `get_balance` — check balance 2. `buy_energy` — purchase energy 3. `get_order` — confirm delegation ## Energy Amounts | Scenario | Energy | | -------------------------- | --------- | | Recipient already has USDT | 65,000 | | Recipient never held USDT | 131,000 | | Minimum order | 60,000 | | Maximum order | 5,000,000 | Duration is always `1h` — energy is used within seconds, 1 hour is the rental window. ## Links * **npm:** [@tronrental-com/mcp-server](https://www.npmjs.com/package/@tronrental-com/mcp-server) * **GitHub:** [tronrentalcom/tronrental-com-mcp](https://github.com/tronrentalcom/tronrental-com-mcp) * **MCP Registry:** `io.github.tronrental-com/tronrental` # Rate Limits Source: https://docs.tronrental.com/resources/rate-limits API rate limiting policy ## Rate Limits API endpoints are rate-limited to ensure fair usage and service stability. ### Limits by endpoint | Endpoint | Limit | | --------------------------- | ------------------ | | `GET /prices` | 60 requests/minute | | `POST /energy/buy` | 30 requests/minute | | `POST /bandwidth/buy` | 30 requests/minute | | `POST /invoices` | 20 requests/minute | | `POST /smart-mode/activate` | 10 requests/minute | | `POST /account/withdrawal` | 1 request/minute | | Other endpoints | 60 requests/minute | ### Rate limit headers Responses include rate limit information in headers: ``` X-RateLimit-Limit: 60 X-RateLimit-Remaining: 58 X-RateLimit-Reset: 1709568000 ``` ### Exceeding limits When rate limited, you'll receive HTTP `429`: ```json theme={null} { "detail": "Rate limit exceeded. Try again in 30 seconds." } ``` Implement exponential backoff for retries. Do not retry immediately. ### Need higher limits? Contact us via [Telegram](https://t.me/TronRentalcom_bot) for custom rate limits for high-volume integrations. # TRON Energy Explained Source: https://docs.tronrental.com/resources/tron-energy Understanding TRON energy and why renting saves money ## What is TRON Energy? Energy is a resource on the TRON blockchain required to execute smart contracts. Every TRC-20 token transfer (like USDT) consumes energy. ### Energy consumption for USDT transfers | Scenario | Energy needed | | -------------------------------- | ------------------------------ | | Recipient **has** USDT | **\~65,000** (exact: 64,285) | | Recipient **does not have** USDT | **\~131,000** (exact: 130,285) | The difference is due to storage slot creation — sending USDT to a new holder requires creating a new entry in the token contract. ### Without energy: TRX is burned If you don't have energy, the network burns TRX from your account to cover the cost: ``` 64,285 energy × 100 SUN/energy = 6,428,500 SUN = 6.43 TRX ``` At current rates, that's approximately **\$1.50 per USDT transfer**. ### With rented energy: 60-80% savings Renting energy costs approximately **2.5-3.0 TRX per transfer** — saving you 50-60% compared to burning. ### How renting works Energy is provided through **resource delegation** — a TRON network feature where one account temporarily shares its staked resources with another. The energy appears on the target address and is consumed during the next transaction. Use the [Energy Calculator](https://tronrental.com/energy-calculator) to check if a recipient address needs 65K or 131K energy.