Auto Refill
List Energy Rules
All energy Auto Refill rules on your account
GET
/
api
/
v1
/
energy
/
auto-refill
List Energy Rules
curl --request GET \
--url https://api.example.com/api/v1/energy/auto-refillimport requests
url = "https://api.example.com/api/v1/energy/auto-refill"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/energy/auto-refill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/energy/auto-refill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/energy/auto-refill"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/energy/auto-refill")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/energy/auto-refill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"rules": [
{
"id": 123,
"target_address": "<string>",
"label": {},
"threshold_energy": 123,
"add_volume": 123,
"duration": "<string>",
"status": "<string>",
"stopped_reason": {},
"consecutive_failures": 123,
"last_checked_at": {},
"last_available_energy": {},
"last_read_error_at": {},
"last_refill_at": {},
"refill_count": 123,
"total_spent_trx": "<string>",
"created_at": "<string>",
"estimated_cost_per_refill_trx": {},
"volume_below_threshold": true
}
]
}List Energy Rules
Returns every energy Auto Refill rule on your account, oldest first. Deleted rules are not included. Requires theview scope.
Response
array
Your energy rules.
Show rule object
Show rule object
number
Rule ID — use it in the edit and delete paths
string
The address the rule keeps supplied
string | null
Your name for the rule
number
The rule buys when available energy is below this
number
Energy bought per refill
string
Rental duration of each refill — always
1hstring
active, paused or stopped_insufficient_balance — see Rule statusstring | null
Why the rule was paused or stopped:
insufficient_balance, order_failed, activation_failed or invalid_params. null when there is none.number
Failed refills in a row. The rule is paused when this reaches 5; a successful refill resets it to 0.
string | null
When we last checked the address (ISO 8601, UTC), whether or not the read succeeded.
null before the first check.number | null
Energy available on the address at the last successful check.
null before the first successful read.string | null
When a check last failed to read the address (ISO 8601, UTC).
null when the last check succeeded. While it is set, last_available_energy is from an earlier check and may be out of date. A check that cannot read the address buys nothing.string | null
When the last refill was made.
null if there has been none.number
Successful refills since the rule was created
string
TRX spent on those refills, in total
string
When the rule was created (ISO 8601, UTC)
string | null
Full price of one refill for your account at current prices, fixed fee included. Address activation, when needed, is charged on top.
null if the price is temporarily unavailable.boolean
true when add_volume is smaller than threshold_energy. One refill may then not lift the address above the threshold, and the rule buys again after every spend — see the warning in the overview.Example
curl https://api.tronrental.com/v1/energy/auto-refill \
-H "X-API-Key: your_api_key"
import requests
resp = requests.get(
"https://api.tronrental.com/v1/energy/auto-refill",
headers={"X-API-Key": "your_api_key"},
)
print(resp.json())
const resp = await fetch("https://api.tronrental.com/v1/energy/auto-refill", {
headers: { "X-API-Key": "your_api_key" },
});
console.log(await resp.json());
Response
{
"rules": [
{
"id": 12,
"target_address": "TYourRecipientAddress1234567890abc",
"label": "Hot wallet",
"threshold_energy": 65000,
"add_volume": 131000,
"duration": "1h",
"status": "active",
"stopped_reason": null,
"consecutive_failures": 0,
"last_checked_at": "2026-10-14T09:41:02Z",
"last_available_energy": 212480,
"last_read_error_at": null,
"last_refill_at": "2026-10-14T08:57:40Z",
"refill_count": 3,
"total_spent_trx": "7.854000",
"created_at": "2026-10-14T08:12:05Z",
"estimated_cost_per_refill_trx": "2.618000",
"volume_below_threshold": false
}
]
}
Errors
| Status | Code | When |
|---|---|---|
403 | FORBIDDEN | The API key lacks the view scope |
⌘I
List Energy Rules
curl --request GET \
--url https://api.example.com/api/v1/energy/auto-refillimport requests
url = "https://api.example.com/api/v1/energy/auto-refill"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/energy/auto-refill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/energy/auto-refill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/energy/auto-refill"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/energy/auto-refill")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/energy/auto-refill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"rules": [
{
"id": 123,
"target_address": "<string>",
"label": {},
"threshold_energy": 123,
"add_volume": 123,
"duration": "<string>",
"status": "<string>",
"stopped_reason": {},
"consecutive_failures": 123,
"last_checked_at": {},
"last_available_energy": {},
"last_read_error_at": {},
"last_refill_at": {},
"refill_count": 123,
"total_spent_trx": "<string>",
"created_at": "<string>",
"estimated_cost_per_refill_trx": {},
"volume_below_threshold": true
}
]
}