发票
账单列表
列出您的账单,支持可选筛选
GET
/
api
/
v1
/
invoices
/
my
账单列表
curl --request GET \
--url https://api.example.com/api/v1/invoices/myimport requests
url = "https://api.example.com/api/v1/invoices/my"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/invoices/my', 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/invoices/my",
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/invoices/my"
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/invoices/my")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/invoices/my")
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账单列表
返回您的账单分页列表。查询参数
number
默认值:"1"
页码
string
按状态筛选:
pending、paid、delegated、expired、failedstring
周期的第一天,
YYYY-MM-DD,含当天。两个日期都不传则返回完整列表。string
周期的最后一天,
YYYY-MM-DD,含当天 —— 按您的时区计到 23:59:59.999。string
解析这两个日期所用的 IANA 时区,例如
Europe/Berlin。不传则按 UTC。与报表不同,列表没有一年的上限——它是分页的。两个日期都可选:只传
from 表示「从该日起」,只传 to 表示「截至该日(含)」。响应
返回包含invoices 数组和 total 计数的分页对象。
示例
curl "https://api.tronrental.com/v1/invoices/my?page=1&status=delegated" \
-H "X-API-Key: your_api_key"
Response
{
"invoices": [
{
"invoice_id": "265ba22d-6c76-4ec5-820c-d2ad153be42f",
"payment_address": "TPaymentAddress...",
"target_address": "TRecipientAddress...",
"resource": "energy",
"energy_amount": 65000,
"transfer_count": 1,
"duration": null,
"price_trx": "2.150000",
"price_usdt": "0.740000",
"status": "delegated",
"expires_at": "2026-03-05T12:30:00Z",
"created_at": "2026-03-05T12:00:00Z",
"paid_at": null,
"completed_at": null
}
],
"total": 1,
"page": 1,
"page_size": 20
}
⌘I
账单列表
curl --request GET \
--url https://api.example.com/api/v1/invoices/myimport requests
url = "https://api.example.com/api/v1/invoices/my"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/invoices/my', 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/invoices/my",
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/invoices/my"
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/invoices/my")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/invoices/my")
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