Endpoints
tronbase API documentation
Rent TRON Energy and Bandwidth from an account balance. Amounts are whole SUN (1 TRX = 1,000,000 SUN).
https://tronbase.io/api/v1Authentication
Send the key as a bearer token on every request. An energy key from the dashboard, tbc_…. Its scope decides which endpoints it opens.
Amounts are whole SUN: 1 TRX = 1,000,000 SUN. Keys with the purchase scope can place orders; full keys can also manage standing orders.
Authorization: Bearer tbc_xxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxErrors
Failures use an ordinary HTTP status and one JSON envelope. code is stable and safe to branch on; message is for people. Field errors, and amounts such as needed, are in details.
{
"error": {
"code": "insufficient_balance",
"message": "Not enough balance for this order.",
"details": {
"needed": "3.2"
}
}
}Account
Who the key belongs to and what it can spend.
The account behind the key
/accountWho owns the key, the balance in SUN, the deposit address, and the webhooks registered on the account.
Response 200
dataobjectrequireddata.idintegerdata.emailstring · emaildata.balanceSunintegerdata.depositAddressstring | nulldata.webhooksobject[]data.webhooks[].idintegerdata.webhooks[].urlstringdata.webhooks[].activeboolean
Status codes
- 200The account.
- 401Missing, invalid or revoked key, or a blocked owner.
- 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 429Too many requests.
Retry-Aftersays when to come back.
curl https://tronbase.io/api/v1/account/ \
-H "Authorization: Bearer $TRONBASE_KEY"{
"data": {
"id": 41,
"email": "dev@example.com",
"balanceSun": 0,
"depositAddress": "string",
"webhooks": [
{
"id": 41,
"url": "string",
"active": true
}
]
}
}Orders
Buying energy and bandwidth.
Recent orders
/ordersNewest first. A recent-activity feed rather than a full history, so there is no pagination.
Parameters
limitinteger · querydefault 20 · 1 – 100
Response 200
dataobject[]requireddata[].idintegerrequireddata[].statusstringrequiredone of "pending", "sent", "filled", "failed"
data[].resourcestringrequiredone of "energy", "bandwidth"
data[].addressstringrequiredThe address the resource was delegated to.
data[].volumeintegerrequiredUnits of the resource.
data[].durationstringrequiredone of "15m"
data[].priceSunintegerrequiredThe resource itself, in SUN.
data[].feeSunintegerrequiredFlat fee, one per order.
data[].activationSunintegerrequiredCharged once per address, ever. Zero when the address already existed.
data[].totalSunintegerrequiredWhat was charged to the balance.
data[].txIdstring | nulldata[].errorstring | nullThe provider's reason, on a failed order.
data[].createdAtstring · date-timedata[].updatedAtstring · date-time
Status codes
- 200The orders.
- 401Missing, invalid or revoked key, or a blocked owner.
- 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 429Too many requests.
Retry-Aftersays when to come back.
curl https://tronbase.io/api/v1/orders/ \
-H "Authorization: Bearer $TRONBASE_KEY"{
"data": [
{
"id": 41,
"status": "pending",
"resource": "energy",
"address": "TJ8bLmQ4vXFyRkC2nDp7WsEhG6aUz9YtKn",
"volume": 65000,
"duration": "15m",
"priceSun": 0,
"feeSun": 0,
"activationSun": 0,
"totalSun": 0,
"txId": "9f2c1a7e5b3d48c0a6e1f4d2b8c7a3e5d1f0b9c8a7e6d5c4b3a291807f6e5d4c",
"error": "string",
"createdAt": "2026-11-04T09:30:00Z",
"updatedAt": "2026-11-04T09:30:00Z"
}
]
}Buy energy or bandwidth
/ordersCharges the balance immediately, then delegates. Energy is rented for fifteen minutes, so place the order right before the transfer it is for. Send Idempotency-Key to make a retry safe. Needs a purchase key.
Parameters
Idempotency-Keystring · headerA retry with the same key returns the first attempt's answer instead of buying twice. Kept 24 hours.
max 255 chars
Request body · application/json
addressstringrequiredThe address that SENDS the USDT — energy is spent by the sender.
volumeintegerrequired65,000 covers one USDT transfer to a recipient that already holds USDT; 131,000 one to a recipient whose USDT balance is zero.
resourcestringone of "energy", "bandwidth" · default "energy"
durationstringone of "15m" · default "15m"
Response 201
dataobjectrequireddata.idintegerrequireddata.statusstringrequiredone of "pending", "sent", "filled", "failed"
data.resourcestringrequiredone of "energy", "bandwidth"
data.addressstringrequiredThe address the resource was delegated to.
data.volumeintegerrequiredUnits of the resource.
data.durationstringrequiredone of "15m"
data.priceSunintegerrequiredThe resource itself, in SUN.
data.feeSunintegerrequiredFlat fee, one per order.
data.activationSunintegerrequiredCharged once per address, ever. Zero when the address already existed.
data.totalSunintegerrequiredWhat was charged to the balance.
data.txIdstring | nulldata.errorstring | nullThe provider's reason, on a failed order.
data.createdAtstring · date-timedata.updatedAtstring · date-time
Status codes
- 201The order, charged and placed.
- 401Missing, invalid or revoked key, or a blocked owner.
- 402The balance does not cover the order;
details.neededis the amount in TRX. - 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 409The order is in doubt and must not be retried, or an idempotent request is still in flight.
- 422Field errors, an idempotency key reused for a different body, or a refusal by the provider.
- 429Too many requests.
Retry-Aftersays when to come back. - 503Orders are not being taken right now.
curl -X POST https://tronbase.io/api/v1/orders/ \
-H "Authorization: Bearer $TRONBASE_KEY" \
-H "Idempotency-Key: 7f3a9c52-order-0001" \
-H "Content-Type: application/json" \
-d '{
"address": "TJ8bLmQ4vXFyRkC2nDp7WsEhG6aUz9YtKn",
"volume": 65000,
"resource": "energy",
"duration": "15m"
}'{
"data": {
"id": 41,
"status": "pending",
"resource": "energy",
"address": "TJ8bLmQ4vXFyRkC2nDp7WsEhG6aUz9YtKn",
"volume": 65000,
"duration": "15m",
"priceSun": 0,
"feeSun": 0,
"activationSun": 0,
"totalSun": 0,
"txId": "9f2c1a7e5b3d48c0a6e1f4d2b8c7a3e5d1f0b9c8a7e6d5c4b3a291807f6e5d4c",
"error": "string",
"createdAt": "2026-11-04T09:30:00Z",
"updatedAt": "2026-11-04T09:30:00Z"
}
}One order
/orders/{id}Parameters
idinteger · pathrequired
Response 200
dataobjectrequireddata.idintegerrequireddata.statusstringrequiredone of "pending", "sent", "filled", "failed"
data.resourcestringrequiredone of "energy", "bandwidth"
data.addressstringrequiredThe address the resource was delegated to.
data.volumeintegerrequiredUnits of the resource.
data.durationstringrequiredone of "15m"
data.priceSunintegerrequiredThe resource itself, in SUN.
data.feeSunintegerrequiredFlat fee, one per order.
data.activationSunintegerrequiredCharged once per address, ever. Zero when the address already existed.
data.totalSunintegerrequiredWhat was charged to the balance.
data.txIdstring | nulldata.errorstring | nullThe provider's reason, on a failed order.
data.createdAtstring · date-timedata.updatedAtstring · date-time
Status codes
- 200The order.
- 401Missing, invalid or revoked key, or a blocked owner.
- 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 404No such order, or it belongs to someone else.
- 429Too many requests.
Retry-Aftersays when to come back.
curl https://tronbase.io/api/v1/orders/41/ \
-H "Authorization: Bearer $TRONBASE_KEY"{
"data": {
"id": 41,
"status": "pending",
"resource": "energy",
"address": "TJ8bLmQ4vXFyRkC2nDp7WsEhG6aUz9YtKn",
"volume": 65000,
"duration": "15m",
"priceSun": 0,
"feeSun": 0,
"activationSun": 0,
"totalSun": 0,
"txId": "9f2c1a7e5b3d48c0a6e1f4d2b8c7a3e5d1f0b9c8a7e6d5c4b3a291807f6e5d4c",
"error": "string",
"createdAt": "2026-11-04T09:30:00Z",
"updatedAt": "2026-11-04T09:30:00Z"
}
}Automations
Standing orders that buy without being asked.
Standing orders
/automationsResponse 200
dataobject[]requireddata[].idintegerrequireddata[].kindstringrequiredone of "refill", "renewal"
data[].addressstringrequireddata[].volumeintegerrequiredEnergy bought each time the rule fires.
data[].thresholdEnergyinteger | nullrefill only: buy when the address falls below this.
data[].runAtMinuteinteger | nullrenewal only: minutes past midnight UTC, 0–1439.
data[].statusstringrequiredone of "active", "paused", "suspended", "canceled"
data[].pausedBystring | nullone of "user", "system"
data[].autoResumebooleanrequiredWhether a rule the system suspended restarts after a top-up.
data[].lastFiredAtstring · date-time | nulldata[].silentSincestring · date-time | nullSet when a daily rule has missed its slot.
data[].errorstring | nulldata[].createdAtstring · date-timedata[].updatedAtstring · date-time
Status codes
- 200The rules.
- 401Missing, invalid or revoked key, or a blocked owner.
- 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 429Too many requests.
Retry-Aftersays when to come back.
curl https://tronbase.io/api/v1/automations/ \
-H "Authorization: Bearer $TRONBASE_KEY"{
"data": [
{
"id": 41,
"kind": "refill",
"address": "TJ8bLmQ4vXFyRkC2nDp7WsEhG6aUz9YtKn",
"volume": 65000,
"thresholdEnergy": 0,
"runAtMinute": 0,
"status": "active",
"pausedBy": "user",
"autoResume": true,
"lastFiredAt": "2026-11-04T09:30:00Z",
"silentSince": "2026-11-04T09:30:00Z",
"error": "string",
"createdAt": "2026-11-04T09:30:00Z",
"updatedAt": "2026-11-04T09:30:00Z"
}
]
}Create a standing order
/automationsCommits future spending: the rule buys again tomorrow with nobody watching. Needs a full key.
Request body · application/json
kindstringrequiredone of "refill", "renewal"
addressstringrequiredvolumeintegerrequiredthresholdEnergyintegerrefill only.
runAtMinuteintegerrenewal only.
0 – 1439
Response 201
dataobjectrequireddata.idintegerrequireddata.kindstringrequiredone of "refill", "renewal"
data.addressstringrequireddata.volumeintegerrequiredEnergy bought each time the rule fires.
data.thresholdEnergyinteger | nullrefill only: buy when the address falls below this.
data.runAtMinuteinteger | nullrenewal only: minutes past midnight UTC, 0–1439.
data.statusstringrequiredone of "active", "paused", "suspended", "canceled"
data.pausedBystring | nullone of "user", "system"
data.autoResumebooleanrequiredWhether a rule the system suspended restarts after a top-up.
data.lastFiredAtstring · date-time | nulldata.silentSincestring · date-time | nullSet when a daily rule has missed its slot.
data.errorstring | nulldata.createdAtstring · date-timedata.updatedAtstring · date-time
Status codes
- 201The rule, already running.
- 401Missing, invalid or revoked key, or a blocked owner.
- 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 422Field errors, or the rule was refused — the message says why.
- 429Too many requests.
Retry-Aftersays when to come back.
curl -X POST https://tronbase.io/api/v1/automations/ \
-H "Authorization: Bearer $TRONBASE_KEY" \
-H "Content-Type: application/json" \
-d '{
"kind": "refill",
"address": "TJ8bLmQ4vXFyRkC2nDp7WsEhG6aUz9YtKn",
"volume": 65000
}'{
"data": {
"id": 41,
"kind": "refill",
"address": "TJ8bLmQ4vXFyRkC2nDp7WsEhG6aUz9YtKn",
"volume": 65000,
"thresholdEnergy": 0,
"runAtMinute": 0,
"status": "active",
"pausedBy": "user",
"autoResume": true,
"lastFiredAt": "2026-11-04T09:30:00Z",
"silentSince": "2026-11-04T09:30:00Z",
"error": "string",
"createdAt": "2026-11-04T09:30:00Z",
"updatedAt": "2026-11-04T09:30:00Z"
}
}One standing order
/automations/{id}Parameters
idinteger · pathrequired
Response 200
dataobjectrequireddata.idintegerrequireddata.kindstringrequiredone of "refill", "renewal"
data.addressstringrequireddata.volumeintegerrequiredEnergy bought each time the rule fires.
data.thresholdEnergyinteger | nullrefill only: buy when the address falls below this.
data.runAtMinuteinteger | nullrenewal only: minutes past midnight UTC, 0–1439.
data.statusstringrequiredone of "active", "paused", "suspended", "canceled"
data.pausedBystring | nullone of "user", "system"
data.autoResumebooleanrequiredWhether a rule the system suspended restarts after a top-up.
data.lastFiredAtstring · date-time | nulldata.silentSincestring · date-time | nullSet when a daily rule has missed its slot.
data.errorstring | nulldata.createdAtstring · date-timedata.updatedAtstring · date-time
Status codes
- 200The rule.
- 401Missing, invalid or revoked key, or a blocked owner.
- 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 404No such rule, or it belongs to someone else.
- 429Too many requests.
Retry-Aftersays when to come back.
curl https://tronbase.io/api/v1/automations/41/ \
-H "Authorization: Bearer $TRONBASE_KEY"{
"data": {
"id": 41,
"kind": "refill",
"address": "TJ8bLmQ4vXFyRkC2nDp7WsEhG6aUz9YtKn",
"volume": 65000,
"thresholdEnergy": 0,
"runAtMinute": 0,
"status": "active",
"pausedBy": "user",
"autoResume": true,
"lastFiredAt": "2026-11-04T09:30:00Z",
"silentSince": "2026-11-04T09:30:00Z",
"error": "string",
"createdAt": "2026-11-04T09:30:00Z",
"updatedAt": "2026-11-04T09:30:00Z"
}
}Pause, resume, or change what happens after a top-up
/automations/{id}Resuming is refused while the balance cannot cover one firing. Needs a full key.
Parameters
idinteger · pathrequired
Request body · application/json
statusstringone of "active", "paused"
autoResumeboolean
Response 200
dataobjectrequireddata.idintegerrequireddata.kindstringrequiredone of "refill", "renewal"
data.addressstringrequireddata.volumeintegerrequiredEnergy bought each time the rule fires.
data.thresholdEnergyinteger | nullrefill only: buy when the address falls below this.
data.runAtMinuteinteger | nullrenewal only: minutes past midnight UTC, 0–1439.
data.statusstringrequiredone of "active", "paused", "suspended", "canceled"
data.pausedBystring | nullone of "user", "system"
data.autoResumebooleanrequiredWhether a rule the system suspended restarts after a top-up.
data.lastFiredAtstring · date-time | nulldata.silentSincestring · date-time | nullSet when a daily rule has missed its slot.
data.errorstring | nulldata.createdAtstring · date-timedata.updatedAtstring · date-time
Status codes
- 200The rule as it now stands.
- 401Missing, invalid or revoked key, or a blocked owner.
- 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 404No such rule.
- 422The change was refused — the message says why.
- 429Too many requests.
Retry-Aftersays when to come back.
curl -X PATCH https://tronbase.io/api/v1/automations/41/ \
-H "Authorization: Bearer $TRONBASE_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "active",
"autoResume": true
}'{
"data": {
"id": 41,
"kind": "refill",
"address": "TJ8bLmQ4vXFyRkC2nDp7WsEhG6aUz9YtKn",
"volume": 65000,
"thresholdEnergy": 0,
"runAtMinute": 0,
"status": "active",
"pausedBy": "user",
"autoResume": true,
"lastFiredAt": "2026-11-04T09:30:00Z",
"silentSince": "2026-11-04T09:30:00Z",
"error": "string",
"createdAt": "2026-11-04T09:30:00Z",
"updatedAt": "2026-11-04T09:30:00Z"
}
}Stop a standing order for good
/automations/{id}It cannot be started again; create a new one instead. Needs a full key.
Parameters
idinteger · pathrequired
Status codes
- 204Stopped.
- 401Missing, invalid or revoked key, or a blocked owner.
- 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 404No such rule.
- 429Too many requests.
Retry-Aftersays when to come back.
curl -X DELETE https://tronbase.io/api/v1/automations/41/ \
-H "Authorization: Bearer $TRONBASE_KEY"No body.
Reference
Prices, addresses and the documentation itself.
Current prices
/pricesResponse 200
dataobjectrequireddata.durationstringone of "15m"
data.energyobjectdata.energy.sunPerUnitnumberSUN per unit of energy.
data.energy.minintegerSmallest order, in energy.
data.energy.maxintegerLargest order, in energy.
data.energy.perTransferintegerEnergy one USDT transfer to a funded recipient burns.
data.energy.transferSunintegerWhat one transfer's worth of energy costs, fee included.
data.bandwidthobjectdata.bandwidth.sunPer1knumberSUN per 1,000 units of bandwidth.
data.bandwidth.minintegerdata.bandwidth.maxintegerdata.feeSunintegerFlat fee, one per order.
data.activationSunintegerCharged once per address that does not exist on-chain yet.
data.updatedAtstring · date-time
Status codes
- 200Prices, order sizes and the activation fee.
- 401Missing, invalid or revoked key, or a blocked owner.
- 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 429Too many requests.
Retry-Aftersays when to come back.
curl https://tronbase.io/api/v1/prices/ \
-H "Authorization: Bearer $TRONBASE_KEY"{
"data": {
"duration": "15m",
"energy": {
"sunPerUnit": 0,
"min": 0,
"max": 0,
"perTransfer": 0,
"transferSun": 0
},
"bandwidth": {
"sunPer1k": 0,
"min": 0,
"max": 0
},
"feeSun": 0,
"activationSun": 0,
"updatedAt": "2026-11-04T09:30:00Z"
}
}What an address holds on-chain
/address/{address}Parameters
addressstring · pathrequiredA TRON address.
Response 200
dataobjectrequireddata.addressstringdata.activatedbooleandata.activationSunintegerZero when the address already exists.
data.trxBalanceSunintegerdata.energyobjectdata.energy.availableintegerdata.energy.limitintegerdata.bandwidthobjectdata.bandwidth.availableintegerdata.bandwidth.limitintegerdata.transfersCoveredintegerUSDT transfers the energy on hand pays for.
data.energyForNextTransferintegerEnergy still missing for the next transfer; zero when covered.
data.durationstringone of "15m"
Status codes
- 200What the address has, and whether activation is due.
- 401Missing, invalid or revoked key, or a blocked owner.
- 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 429Too many requests.
Retry-Aftersays when to come back. - 503The address could not be read from the network.
curl https://tronbase.io/api/v1/address/TJ8bLmQ4vXFyRkC2nDp7WsEhG6aUz9YtKn/ \
-H "Authorization: Bearer $TRONBASE_KEY"{
"data": {
"address": "TJ8bLmQ4vXFyRkC2nDp7WsEhG6aUz9YtKn",
"activated": true,
"activationSun": 0,
"trxBalanceSun": 0,
"energy": {
"available": 0,
"limit": 0
},
"bandwidth": {
"available": 0,
"limit": 0
},
"transfersCovered": 0,
"energyForNextTransfer": 0,
"duration": "15m"
}
}These docs as Markdown
/docsSend If-None-Match with the last ETag to get a 304 when nothing has changed.
Status codes
- 200The documentation.
- 304Unchanged since the ETag you sent.
- 401Missing, invalid or revoked key, or a blocked owner.
- 403The key's scope does not reach this endpoint, or it has spent its allowance for the day.
- 429Too many requests.
Retry-Aftersays when to come back.
curl https://tronbase.io/api/v1/docs/ \
-H "Authorization: Bearer $TRONBASE_KEY"# Markdown document