自动带宽
列出订阅
您账户中的所有自动带宽订阅
GET
/
v1
/
bandwidth
/
auto
列出订阅
curl --request GET \
--url https://api.tronrental.com/v1/bandwidth/autoimport requests
url = "https://api.tronrental.com/v1/bandwidth/auto"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.tronrental.com/v1/bandwidth/auto', 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.tronrental.com/v1/bandwidth/auto",
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.tronrental.com/v1/bandwidth/auto"
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.tronrental.com/v1/bandwidth/auto")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tronrental.com/v1/bandwidth/auto")
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{
"subscriptions": [
{
"id": 123,
"address": "<string>",
"label": {},
"token": "<string>",
"contract": {},
"volume": 123,
"auto_pause": true,
"threshold": 123,
"stop_after_transfer": true,
"notify_free_bw": true,
"status": "<string>",
"stopped_reason": {},
"address_change_to": {},
"free_bw": {},
"delegated_bw": 123,
"transfers": 123,
"delivery_state": "<string>",
"paid_until": {},
"total_charged_trx": "<string>",
"daily_trx": {},
"transfer_trx": {},
"transfer_bw_trx": {},
"transfer_fee_trx": {},
"created_at": "<string>"
}
],
"balance_trx": "<string>",
"enabled": true
}列出订阅
返回您账户中的所有自动带宽订阅,以及您的余额和当前是否可以创建新订阅。不包含已删除的订阅。需要view 权限。
响应
订阅中的价格是该订阅自己的价格:按其创建时所用的 API 密钥计价,或按网站购买计价。
示例
curl https://api.tronrental.com/v1/bandwidth/auto \
-H "X-API-Key: your_api_key"
import requests
resp = requests.get(
"https://api.tronrental.com/v1/bandwidth/auto",
headers={"X-API-Key": "your_api_key"},
)
print(resp.json())
const resp = await fetch("https://api.tronrental.com/v1/bandwidth/auto", {
headers: { "X-API-Key": "your_api_key" },
});
console.log(await resp.json());
Response
{
"subscriptions": [
{
"id": 42,
"address": "TYourSenderAddress12345678901234ab",
"label": "Payouts",
"token": "USDT",
"contract": null,
"volume": 350,
"auto_pause": false,
"threshold": 600,
"stop_after_transfer": false,
"notify_free_bw": false,
"status": "active",
"stopped_reason": null,
"address_change_to": null,
"free_bw": 330,
"delegated_bw": 350,
"transfers": 12,
"delivery_state": "ok",
"paid_until": "2026-11-14T08:15:04Z",
"total_charged_trx": "5.100000",
"daily_trx": "0.340000",
"transfer_trx": "0.340000",
"transfer_bw_trx": "0.140000",
"transfer_fee_trx": "0.200000",
"created_at": "2026-11-10T08:15:00Z"
}
],
"balance_trx": "48.250000",
"enabled": true
}
错误
| 状态 | 代码 | 触发条件 |
|---|---|---|
403 | FORBIDDEN | API 密钥缺少 view 权限 |
⌘I
列出订阅
curl --request GET \
--url https://api.tronrental.com/v1/bandwidth/autoimport requests
url = "https://api.tronrental.com/v1/bandwidth/auto"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.tronrental.com/v1/bandwidth/auto', 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.tronrental.com/v1/bandwidth/auto",
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.tronrental.com/v1/bandwidth/auto"
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.tronrental.com/v1/bandwidth/auto")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tronrental.com/v1/bandwidth/auto")
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{
"subscriptions": [
{
"id": 123,
"address": "<string>",
"label": {},
"token": "<string>",
"contract": {},
"volume": 123,
"auto_pause": true,
"threshold": 123,
"stop_after_transfer": true,
"notify_free_bw": true,
"status": "<string>",
"stopped_reason": {},
"address_change_to": {},
"free_bw": {},
"delegated_bw": 123,
"transfers": 123,
"delivery_state": "<string>",
"paid_until": {},
"total_charged_trx": "<string>",
"daily_trx": {},
"transfer_trx": {},
"transfer_bw_trx": {},
"transfer_fee_trx": {},
"created_at": "<string>"
}
],
"balance_trx": "<string>",
"enabled": true
}