ऑटो रिफिल
एनर्जी नियमों की सूची
आपके खाते के सभी एनर्जी ऑटो रिफिल नियम
GET
/
api
/
v1
/
energy
/
auto-refill
एनर्जी नियमों की सूची
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
}
]
}एनर्जी नियमों की सूची
आपके खाते के सभी एनर्जी ऑटो रिफिल नियम लौटाता है, सबसे पुराने पहले। हटाए गए नियम शामिल नहीं होते।view स्कोप आवश्यक है।
रिस्पॉन्स
array
आपके एनर्जी नियम।
दिखाएं नियम ऑब्जेक्ट
दिखाएं नियम ऑब्जेक्ट
number
नियम ID — इसे बदलने और हटाने वाले पाथ में उपयोग करें
string
वह एड्रेस जिस पर नियम आपूर्ति बनाए रखता है
string | null
नियम के लिए आपका नाम
number
जब उपलब्ध एनर्जी इससे नीचे होती है, नियम खरीदता है
number
प्रति रिफिल खरीदी जाने वाली एनर्जी
string
हर रिफिल के किराये की अवधि — हमेशा
1hstring
active, paused या stopped_insufficient_balance — देखें नियम की स्थितिstring | null
नियम क्यों रोका गया या रुका:
insufficient_balance, order_failed, activation_failed या invalid_params। कोई कारण न हो तो null।number
लगातार विफल रिफिल। यह संख्या 5 तक पहुँचने पर नियम रोक दिया जाता है; सफल रिफिल इसे 0 पर रीसेट कर देता है।
string | null
हमने आखिरी बार एड्रेस की जाँच कब की (ISO 8601, UTC), चाहे पढ़ना सफल रहा हो या नहीं। पहली जाँच से पहले
null।number | null
आखिरी सफल जाँच के समय एड्रेस पर उपलब्ध एनर्जी। पहली सफल रीडिंग से पहले
null।string | null
आखिरी बार कब कोई जाँच एड्रेस को पढ़ने में विफल रही (ISO 8601, UTC)। आखिरी जाँच सफल रही हो तो
null। जब तक यह सेट है, last_available_energy किसी पिछली जाँच का है और पुराना हो सकता है। जो जाँच एड्रेस को पढ़ नहीं पाती, वह कुछ नहीं खरीदती।string | null
आखिरी रिफिल कब हुआ। यदि अब तक कोई रिफिल नहीं हुआ तो
null।number
नियम बनने के बाद से सफल रिफिल की संख्या
string
उन रिफिल पर कुल खर्च हुए TRX
string
नियम कब बनाया गया (ISO 8601, UTC)
string | null
मौजूदा कीमतों पर आपके खाते के लिए एक रिफिल की पूरी कीमत, फिक्स्ड शुल्क सहित। ज़रूरत पड़ने पर एड्रेस सक्रियण का शुल्क अलग से जुड़ता है। यदि कीमत अस्थायी रूप से उपलब्ध नहीं है तो
null।boolean
true जब add_volume threshold_energy से छोटा हो। तब एक रिफिल शायद एड्रेस को थ्रेशोल्ड से ऊपर न ला पाए, और नियम हर खर्च के बाद फिर खरीदता है — देखें अवलोकन में चेतावनी।उदाहरण
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
}
]
}
त्रुटियाँ
| स्थिति | कोड | कब |
|---|---|---|
403 | FORBIDDEN | API कुंजी के पास view स्कोप नहीं है |
⌘I
एनर्जी नियमों की सूची
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
}
]
}