Balance
Read your prepaid balance, history and usage, get a deposit address, set alerts and withdraw.
Your balance is prepaid TRX that pays for relays. There is one per chain and environment; sandbox and live are separate. See Billing.
Amounts on this page are integer strings in sun: "25000000" is 25 TRX. Divide by 10 ^ currencyPrecision (6 for TRX) to display them.
Get your balance
The simplest way to read your balance. Returns TRX, not sun, as exact decimal strings: "125.5" is 125.5 TRX.
{
"ok": true,
"chain": "tron",
"environment": "live",
"currency": "TRX",
"available": "125.5",
"inflight": "2.95",
"total": "128.45"
}available is what you can spend now. inflight is held for relays still running. total is both. Before your first deposit all three are "0".
Get a deposit address
Returns your personal deposit address and creates it on the first call. Send TRX to it to top up. The address does not change.
{
"ok": true,
"payment": {
"depositAddress": "TDepositAddress...",
"chain": "tron",
"environment": "live",
"token": "TRX",
"amount": "1000000",
"status": "requires_action",
"checkpoint": "awaiting_transfer"
}
}token is what to send and amount is the minimum deposit. Deposit progress shows up in List transactions.
GET /api/gas_tank/portal/deposit-address with the same query returns { ok, address, chain, environment } for an address that already exists, and 404 if there is none yet. It never creates one.
List balances
Returns your active balance accounts.
{
"ok": true,
"accounts": [
{
"id": "f3a1...",
"chain": "tron",
"environment": "live",
"status": "active",
"balance": { "available": "125000000", "inflight": "2950000" },
"currency": "TRX",
"currencyPrecision": 6
}
]
}available is what you can spend now. inflight is held for relays still running.
Balance stats
Totals across your accounts.
{
"ok": true,
"totalDeposited": "127950000",
"totalAvailable": "125000000",
"totalInflight": "2950000",
"totalConsumedThisMonth": "61000000",
"activeAccounts": 1,
"pendingDeposits": 0,
"byChain": [
{ "chain": "tron", "available": "125000000", "inflight": "2950000", "deposited": "127950000", "currency": "TRX", "currencyPrecision": 6 }
]
}totalDeposited is your current balance including held amounts (totalAvailable + totalInflight), not a lifetime total. totalConsumedThisMonth counts relay charges from 00:00 UTC on the 1st; withdrawals and refunded deposits are not counted. pendingDeposits is how many of your deposits are seen but not yet credited, in the given environment or in both when it is left out.
List transactions
Deposits, relay charges, withdrawals and refunded deposits, newest first.
curl "https://apiv2.tronergy.io/api/gas_tank/portal/transactions?page=1&pageSize=20&direction=deposit&environment=live" \
-H "x-api-key: $TRONERGY_API_KEY"pagenumberqueryPage number. Defaults to 1.
pageSizenumberqueryItems per page. Default 20, max 100.
direction"deposit" | "usage" | "withdrawal" | "refund"querydeposit (deposits and sandbox credits), usage (relay charges), withdrawal or refund (a deposit taken back after the payment was refunded).
status"posted" | "inflight" | "committed" | "void"queryinflight is a hold for a running relay, committed and posted are final, void is a released hold.
environment"sandbox" | "live"querysandbox or live.
sortDir"asc" | "desc"querySort by date. Defaults to desc.
format"json" | "csv"querycsv downloads a file. Defaults to json.
{
"ok": true,
"items": [
{
"id": "...",
"direction": "deposit",
"amount": "100000000",
"currency": "TRX",
"precision": 6,
"status": "posted",
"chain": "tron",
"environment": "live",
"txHash": "ab12...",
"explorerUrl": "https://tronscan.org/#/transaction/ab12...",
"createdAt": "2026-10-20T08:00:00.000Z"
}
],
"incoming": [],
"total": 1,
"page": 1,
"pageSize": 20,
"totalPages": 1
}incoming lists up to 12 deposits seen on chain but not yet credited, with confirmations, confirmationsRequired and a checkpoint (awaiting_transfer, chain_seen, confirming or finalizing). It is filled only on page 1, and only when direction is left out or deposit and status is left out or inflight.
Usage
Relay spend for a period.
curl "https://apiv2.tronergy.io/api/gas_tank/portal/usage?period=month&environment=live" \
-H "x-api-key: $TRONERGY_API_KEY"period"month" | "week"querymonth (from 00:00 UTC on the 1st through now) or week (from 00:00 UTC seven days ago through now, so up to eight calendar days). Defaults to month.
environment"sandbox" | "live"querysandbox or live.
{
"ok": true,
"totalConsumed": "61000000",
"totalRelays": 21,
"avgCostPerRelay": "2904761",
"byChain": [
{ "chain": "tron", "totalConsumed": "61000000", "relayCount": 21, "avgCostPerRelay": "2904761", "currency": "TRX", "currencyPrecision": 6 }
],
"periodStart": "2026-10-01T00:00:00.000Z",
"periodEnd": "2026-10-21T10:00:00.000Z",
"networkBurnRateSun": 420
}networkBurnRateSun is a fixed reference price (sun per energy unit) for comparing your cost with burning TRX.
Balance alerts
Read the low-balance and budget alerts that apply to you for one account: your own settings if you saved any, otherwise your organization's settings, otherwise the defaults shown below. id is an account id from List balances. Reading and changing alerts both need the portal.gas_tank.manage_alerts permission.
{
"ok": true,
"config": {
"gasTankAccountId": "f3a1...",
"lowBalanceEnabled": false,
"lowBalanceThreshold": null,
"budgetCapEnabled": false,
"budgetCapAmount": null,
"budgetWarnPercent": 80
}
}Change alerts. Only the fields you send change. Dashboard session only, so a leaked key cannot lift your budget cap.
SESSION_REQUIRED.curl -X PUT "https://apiv2.tronergy.io/api/gas_tank/portal/accounts/f3a1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d/alerts" \
-H "Cookie: <portal-session-cookie>" \
-H "Content-Type: application/json" \
-d '{
"lowBalanceEnabled": true,
"lowBalanceThreshold": "50000000"
}'idstringrequiredpathBalance account ID.
lowBalanceEnabledbooleanAlert when the available balance drops below the threshold.
lowBalanceThresholdstringThreshold in sun, digits only.
budgetCapEnabledbooleanTurn on a monthly spending cap. Has no effect until budgetCapAmount is set.
budgetCapAmountstringMonthly cap in sun, digits only.
budgetWarnPercentnumberWarn when this share of the cap is used. Whole number 1-99. Default 80.
With the cap on, a relay that would go over it ends failed with errorCode: "BUDGET_CAP_EXCEEDED". The cap month starts on the 1st at 00:00 UTC.
Withdraw
Sends unused balance to a TRON address. Dashboard session only, so a leaked key cannot move your balance out. Limit: 25 per hour.
SESSION_REQUIRED.curl -X POST "https://apiv2.tronergy.io/api/gas_tank/portal/withdraw" \
-H "Cookie: <portal-session-cookie>" \
-H "Content-Type: application/json" \
-d '{
"chain": "tron",
"amount": "10000000",
"destinationAddress": "TDestinationxxxxxxxxxxxxxxxxxxxxxx",
"environment": "live",
"idempotencyKey": "9c4e2b1a-6d3f-4a8e-b7c5-1f0e2d3c4b5a"
}'chainstringrequiredAlways tron.
amountstringrequiredAmount in sun, positive integer string. Minimum 1000000 (1 TRX), maximum 100000000000 (100,000 TRX).
destinationAddressstringrequiredTRON address with a valid checksum.
environment"sandbox" | "live"sandbox or live. Defaults to sandbox.
idempotencyKeystringrequiredA UUID per withdrawal. Resending it with the same amount and address returns the same withdrawal.
{ "ok": true, "status": "processing", "holdId": "2b7f..." }Errors:
422 Validation failed: the body is wrong, for example the address is not a TRON address.422 Invalid TRON destination address: the address looks right but its checksum is wrong.422 Minimum withdrawal amount is 1000000: send at least 1 TRX.422 Maximum single withdrawal exceeded: send at most 100,000 TRX at a time.422 Insufficient balance for withdrawal.409: theidempotencyKeybelongs to a cancelled withdrawal, or was already used for a different amount, address or user.429: more than 25 withdrawals in an hour.
Get a withdrawal
Returns the payout for a withdrawal, or null if it has not been created yet. status is pending, processing, completed, failed, canceled or returned.
{ "ok": true, "payout": { "payoutId": "7a1c...", "status": "completed", "holdId": "2b7f...", "txHash": "ab12..." } }