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

Check capacity

GET /v1/capacity: energy available now and the current wait.

Use this endpoint to see how POST /v1/rentals will respond before you create a rental.

At a glance

Item
Detail

Method and path

GET /v1/capacity

Authentication

Signed request. See Authentication and signing

Retry-safe

Yes. The request only reads data

Rate limit

Per API key. See Conventions and limits

This endpoint takes no path, query or body parameters.

Sample request

Sample values are illustrative.

check-capacity.sh
TIMESTAMP=$(date +%s)
REQUEST_PATH="/v1/capacity"
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 request is signed inline. It needs BASE_URL, API_KEY and API_SECRET in your environment.

check-capacity.mjs
import { signedRequest } from "./tron_energy.mjs";

const { status, data } = await signedRequest("GET", "/v1/capacity");
console.log(status, data);

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

check_capacity.py
from tron_energy import signed_request

status, data = signed_request("GET", "/v1/capacity")
print(status, data)

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

Responses

Response fields

Field
Type
Description

status

string

Current capacity. See Capacity statuses

energy_available_now

integer

Energy ready to delegate now

max_single_rental

integer

Largest energy amount for one rental

daily_remaining

integer

Energy left for today

queue_length

integer

Rentals waiting in the queue

estimated_wait_seconds

integer

Expected wait for a typical USDT transfer joining the queue now

Capacity statuses

Status

Meaning

POST /v1/rentals returns

ok

Energy is available now

201

busy

All energy is in use and frees up in seconds

202 if the wait fits max_wait_seconds, else 503 CAPACITY_EXHAUSTED

daily_limit

Today's energy is used up and recovers over 24 hours

202 if the wait fits max_wait_seconds, else 503 CAPACITY_EXHAUSTED

no_capacity

Energy is unavailable with none freeing up

503 CAPACITY_EXHAUSTED

Errors

These errors can occur on every endpoint. The full list is in Errors.

HTTP
Code
When
Action
Retry?

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