For the complete documentation index, see llms.txt. This page is also available as Markdown.

List rentals

GET /v1/rentals: your rentals, newest first, for reconciliation.

Use this endpoint to reconcile transfers with delegations, or to find a rental when you do not have its ID.

At a glance

Item
Detail

Method and path

GET /v1/rentals

Authentication

Signed request. See Authentication and signing

Retry-safe

Yes. The request only reads data

Rate limit

Per API key. See Conventions and limits

Query parameters

Name
Type
Required
Default
Description

status

string

No

None

pending, active, reclaimed, expired or failed

receiver

string

No

None

Filter by the receiver, the address that sends the transaction and receives the energy

from

string

No

None

Start of the date range. from and to are at most 31 days apart

to

string

No

None

End of the date range. from and to are at most 31 days apart

limit

integer

No

50

1 to 100

cursor

string

No

None

next_cursor from the previous page

Sample request

Sample IDs, addresses and hashes are illustrative.

list-rentals.sh
TIMESTAMP=$(date +%s)
REQUEST_PATH="/v1/rentals?status=reclaimed&limit=50"
BODY=""
SIGNATURE=$(printf '%s\n%s\n%s\n%s' "GET" "$REQUEST_PATH" "$TIMESTAMP" "$BODY" | openssl dgst -sha256 -hmac "$API_SECRET" | sed 's/^.* //')
curl -X GET "$BASE_URL$REQUEST_PATH" \
  -H "X-API-Key: $API_KEY" \
  -H "X-Timestamp: $TIMESTAMP" \
  -H "X-Signature: $SIGNATURE"

The path includes the query string, and the signature covers it. The request is signed inline and needs BASE_URL, API_KEY and API_SECRET in your environment.

list-rentals.mjs
import { signedRequest } from "./tron_energy.mjs";

const { status, data } = await signedRequest("GET", "/v1/rentals?status=reclaimed&limit=50");
console.log(status, data);

signedRequest is the helper from Authentication and signing, saved as tron_energy.mjs.

list_rentals.py
from tron_energy import signed_request

status, data = signed_request("GET", "/v1/rentals?status=reclaimed&limit=50")
print(status, data)

signed_request is the helper from Authentication and signing, saved as tron_energy.py.

Responses

Response fields

Field
Type
Description

data

array

Rentals, newest first. Each item has the same fields as Get a rental; the sample shows three of them

data[].rental_id

string

Rental ID

data[].status

string

Rental status. See Rental lifecycle

data[].energy_used

integer or null

Energy the transaction consumed. Final once reclaimed

next_cursor

string or null

Cursor for the next page. null on the last page

Paging through results

Pass the next_cursor from one response as cursor on the next request, with the same filters. Stop when next_cursor is null.

Errors

The full list is in Errors.

HTTP
Code
When
Action
Retry?

400

INVALID_REQUEST

A query parameter has the wrong type

Fix the request

No

401

UNAUTHORIZED

Invalid API key, signature or timestamp

Check your credentials and server clock

After a fix

429

RATE_LIMITED

Too many requests

Retry after Retry-After

Yes, after Retry-After

503

SERVICE_UNAVAILABLE

Planned maintenance or an outage

Retry after Retry-After

Yes, after Retry-After

Last updated