TRON Energy API for developers and businesses

Everything you can do in the dashboard, from code: top up a balance in TRX or USDT, buy Energy or Bandwidth for any address, activate new addresses and run automations. Prices follow the network; every delivery is charged once, and retries never buy twice.

Exchanges and payment processors

Buy Energy right before each withdrawal or deposit sweep, so USDT transfers cost a fraction of the TRX they would burn.

Hot wallets

Keep an address supplied with auto-refill: Energy is added whenever it drops below your threshold, billed per delivery.

Wallets and bots

Check whether a recipient address exists, activate it if needed, and buy exactly the Energy one transfer needs.

Getting started

  1. Create an account and an API key in the dashboard under Settings → API keys.
  2. Top up the balance: GET /account returns your TRX / USDT (TRC-20) deposit address.
  3. Buy Energy with POST /orders and a unique Idempotency-Key, then poll GET /orders/{id}.
Base URL https://getgas.io/api/v1. Authentication: Authorization: Bearer <key>. Limits: 120 requests per minute per key, 30 new orders per minute per account. The full reference is plain Markdown at https://getgas.io/api/v1/docs, readable by people and AI agents alike.

Endpoints

GET /docsThis reference as Markdown, always matching the deployed API.
GET /pricesCurrent prices and order limits.
GET /accountBalance, the deposit address for topping it up, and this account's prices.
GET /depositsPayments received at the deposit address, newest first.
POST /ordersBuy Energy or Bandwidth for any TRON address, paid from the balance.
GET /ordersOrders on this account, newest first.
GET /orders/{id}One order, with its current status.
GET /addresses/{address}Whether an address exists on-chain, and what activating it costs.
POST /addresses/{address}/activateActivate a new address, paid from the balance.
GET /automationsThis account's automations (not removed), newest first.
POST /automationsStart auto-refill, auto-renewal or smart mode on an address.
GET /automations/{id}One automation.
POST /automations/{id}/pausePause an automation.
POST /automations/{id}/resumeResume a paused automation.
DELETE /automations/{id}Remove an automation for good.
GET /deliveriesDeliveries made by automations, newest first, with what each cost.

Example: buy Energy and wait for delivery

javascript
const API = 'https://getgas.io/api/v1';
const headers = {Authorization: `Bearer ${process.env.GETGAS_API_KEY}`};
​
async function buyEnergy(address, volume, term = '1h') {
// One key per purchase: a retry after a timeout returns the same order instead of buying twice.
const idempotencyKey = crypto.randomUUID();
let order;
for (let attempt = 0; attempt < 3 && !order; attempt++) {
const res = await fetch(`${API}/orders`, {
method: 'POST',
headers: {...headers, 'Content-Type': 'application/json', 'Idempotency-Key': idempotencyKey},
body: JSON.stringify({address, volume, term}),
}).catch(() => null);
if (!res) continue; // network error: retry with the same key
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
order = body.data;
}
if (!order) throw new Error('Could not reach the API');
​
// Wait until the order is final.
while (['pending', 'submitted', 'unknown'].includes(order.status)) {
await new Promise(resolve => setTimeout(resolve, 3000));
order = (await (await fetch(`${API}/orders/${order.id}`, {headers})).json()).data;
}
return order; // "filled", "refunded" or "failed"
}