带宽租赁(自动续费)
列出自动续费租赁
列出您持续的带宽租赁
GET
/
api
/
v1
/
bandwidth
/
rentals
列出自动续费租赁
curl --request GET \
--url https://api.example.com/api/v1/bandwidth/rentalsimport requests
url = "https://api.example.com/api/v1/bandwidth/rentals"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/bandwidth/rentals', 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/bandwidth/rentals",
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/bandwidth/rentals"
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/bandwidth/rentals")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/bandwidth/rentals")
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列出自动续费租赁
返回您的自动续费带宽租赁,最新的在前。查询参数
string
按状态筛选:
active、cancelled 或 ended_insufficient_balance响应
返回rentals —— 租赁对象数组,包含 status、volume、daily_trx、total_charged_trx、next_billing_at 和时间戳。
租赁状态
| 状态 | 说明 |
|---|---|
active | 已委托,按日扣费 |
cancelled | 由用户(或管理员)取消 |
ended_insufficient_balance | 自动结束 —— 余额不足以支付下一天 |
示例
curl "https://api.tronrental.com/v1/bandwidth/rentals?status=active" \
-H "X-API-Key: your_api_key"
Response
{
"rentals": [
{
"id": 4321,
"address": "TYourRecipientAddress1234567890abc",
"volume": 350,
"status": "active",
"daily_trx": "0.4205",
"total_charged_trx": "1.2615",
"billing_count": 3,
"next_billing_at": "2026-06-11T04:30:00+00:00",
"last_billed_at": "2026-06-10T04:30:00+00:00",
"delegate_txid": "abc123...",
"undelegate_txid": null,
"ended_at": null,
"created_at": "2026-06-08T04:30:00+00:00"
}
]
}
⌘I
列出自动续费租赁
curl --request GET \
--url https://api.example.com/api/v1/bandwidth/rentalsimport requests
url = "https://api.example.com/api/v1/bandwidth/rentals"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/bandwidth/rentals', 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/bandwidth/rentals",
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/bandwidth/rentals"
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/bandwidth/rentals")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/bandwidth/rentals")
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