POST /apiv2/bandwidth/daily
Rent TRON bandwidth for 24 hours and delegate it to a recipient address. The bandwidth is reclaimed automatically when the 24 hours end.
⚠️ Available on request only. Daily rental is enabled for an account by Netts support. Without it every request is rejected with
5009. Contact support to request access.
The limits of daily rental are set for your account when access is granted:
- the minimum and maximum amount of one order;
- the maximum amount on one recipient address;
- the maximum amount on all your addresses together.
Only your active daily rentals count against these limits. Rentals made with POST /apiv2/bandwidth (5 minutes, 1 hour) do not.
Endpoint URL
POST https://netts.io/apiv2/bandwidth/dailyRequest Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| X-API-KEY | Yes | Your API key from Netts dashboard |
| X-Idempotency-Key | No | Optional client-generated key (base64) to safely retry without double-ordering. If omitted, the server generates one automatically |
Request Body
{
"amount": 20000,
"receiveAddress": "TXXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"reclaimOldest": false,
"test": false
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | integer | Yes | Bandwidth units to rent, within the per-order limits of your account |
| receiveAddress | string | Yes | TRON address that will receive the bandwidth (T…, 34 chars, base58) |
| reclaimOldest | boolean | No | What to do when the order would exceed your total limit. true — reclaim your oldest daily rental (on any address) first, then delegate the new one. false — reject the order with 5010. Default false |
| test | boolean | No | Dry run. Checks access, limits and balance and shows what would happen, without any on-chain action and without charging. Default false |
The rental period is always 24 hours, so the body has no period field. Unknown fields are rejected with HTTP 422.
Limits
Per-address limit. If the new order would take the recipient address above your per-address limit, your oldest daily rental on that address is reclaimed in full first, and then the new order is delegated. This happens automatically; reclaimOldest is not needed for it.
Total limit. If the new order would take the sum of all your daily rentals above your total limit:
- with
reclaimOldest: trueyour oldest daily rental on any address is reclaimed in full first, and then the new order is delegated; - with
reclaimOldest: falsethe order is rejected with5010and nothing changes.
Reclaimed rentals are listed in the reclaimed field of the response. If a reclaim does not complete, no new order is created and nothing is charged (5012).
The cost of a reclaimed rental is not refunded, the same as for a voluntary early reclaim.
Daily orders of one account are processed one at a time. While another of your daily orders is being processed, a new one may get 5013 — retry in a few seconds.
Example Requests
cURL
API_KEY="your_api_key"
ADDR="TXXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
AMOUNT=20000
NONCE=$(uuidgen) # one value per order; resend the same key on every retry
# X-Idempotency-Key = base64( HMAC-SHA256( API_KEY, "addr:amount:1d:nonce" ) )
IDEMP=$(printf '%s' "${ADDR}:${AMOUNT}:1d:${NONCE}" \
| openssl dgst -sha256 -hmac "$API_KEY" -binary | base64)
curl -X POST https://netts.io/apiv2/bandwidth/daily \
--max-time 120 \
-H "Content-Type: application/json" \
-H "X-API-KEY: $API_KEY" \
-H "X-Idempotency-Key: $IDEMP" \
-d "{\"amount\": $AMOUNT, \"receiveAddress\": \"$ADDR\"}"Python
import uuid, hmac, hashlib, base64, requests
API_KEY = "your_api_key"
url = "https://netts.io/apiv2/bandwidth/daily"
payload = {
"amount": 20000,
"receiveAddress": "TXXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"reclaimOldest": False,
}
# X-Idempotency-Key = base64( HMAC-SHA256( API_KEY, "addr:amount:1d:nonce" ) )
# Generate ONCE per order and resend the same value on every retry.
nonce = str(uuid.uuid4())
message = f"{payload['receiveAddress']}:{payload['amount']}:1d:{nonce}"
idem_key = base64.b64encode(
hmac.new(API_KEY.encode(), message.encode(), hashlib.sha256).digest()
).decode()
headers = {
"Content-Type": "application/json",
"X-API-KEY": API_KEY,
"X-Idempotency-Key": idem_key,
}
response = requests.post(url, headers=headers, json=payload, timeout=120)
detail = response.json().get("detail", {})
if response.status_code == 200 and detail.get("status") == "completed":
d = detail["data"]
print(f"Order ID: {d['orderId']}")
print(f"Hashes: {d['hash']}")
print(f"Expires: {d['expiresAt']}")
print(f"Cost: {d['paidTRX']} TRX")
for r in d["reclaimed"]:
print(f"Reclaimed: {r['orderId']} ({r['bandwidth']} units)")
else:
print(f"Code: {detail.get('code')} | {detail.get('msg', detail)}")Set the HTTP timeout to at least 120 seconds: when an older rental is reclaimed first, the response comes after both the reclaim and the new delegation are confirmed.
Response
The examples show the cost as <cost>: it is a number in TRX.
Success — bandwidth delegated (200 OK)
{
"detail": {
"code": 10000,
"status": "completed",
"msg": "Successful, <cost> TRX",
"data": {
"orderId": "B1D<key14>",
"paidTRX": "<cost>",
"fulfilledBy": "bandwidth",
"hash": ["a1b2c3..."],
"bandwidth": 20000,
"period": "1d",
"expiresAt": "2026-12-03T13:40:12.512340+00:00",
"reclaimed": [
{ "orderId": "B1D<key14>", "bandwidth": 20000, "reclaimHash": ["d4e5f6..."] }
]
}
}
}reclaimed is an empty array when nothing had to be reclaimed.
Test run (200 OK, only with test=true)
Nothing is reclaimed, nothing is delegated and nothing is charged. wouldReclaim lists the rentals that a real order would reclaim first. The other fields show your current daily rentals and limits.
{
"detail": {
"code": 10003,
"status": "test",
"msg": "Test run — no on-chain action, no charge",
"data": {
"orderId": "B1D<key14>",
"testAction": "would_delegate",
"wouldCostTRX": "<cost>",
"paidTRX": 0,
"bandwidth": 20000,
"period": "1d",
"wouldReclaim": [{ "orderId": "B1D<key14>", "bandwidth": 20000 }],
"addressUnits": 40000,
"maxUnitsPerAddress": 50000,
"totalUnits": 60000,
"maxUnitsTotal": 200000
}
}
}Response Fields
| Field | Type | Description |
|---|---|---|
| detail.code | integer | 10000 delegated, 10003 test run |
| detail.status | string | completed / test / failed |
| detail.data.orderId | string | Order ID, format B1D… — use it for the status and reclaim endpoints |
| detail.data.paidTRX | number | Amount charged in TRX (0 in a test run) |
| detail.data.wouldCostTRX | number | Amount a real order would cost, in TRX (test run only) |
| detail.data.hash | array | Delegation transaction hashes |
| detail.data.bandwidth | integer | Bandwidth units delegated |
| detail.data.period | string | Always 1d |
| detail.data.expiresAt | string | When the rental ends, ISO 8601 in UTC |
| detail.data.reclaimed | array | Your earlier daily rentals reclaimed by this order: orderId, bandwidth, reclaimHash |
| detail.data.wouldReclaim | array | Rentals a real order would reclaim (test run only) |
| detail.data.addressUnits | integer | Your active daily bandwidth on this address (test run only) |
| detail.data.maxUnitsPerAddress | integer | Your per-address limit (test run only) |
| detail.data.totalUnits | integer | Your active daily bandwidth on all addresses (test run only) |
| detail.data.maxUnitsTotal | integer | Your total limit (test run only) |
Status and Early Reclaim
Daily orders use the same endpoints as other bandwidth orders:
GET https://netts.io/apiv2/bandwidth/status/{orderId}— order status;POST https://netts.io/apiv2/bandwidth/reclaim/{orderId}— voluntary early reclaim. The rental charge is not refunded.
See POST /apiv2/bandwidth for the request and response formats.
Error Responses
Not Available for the Account (403)
{ "detail": { "code": 5009, "status": "failed", "msg": "Daily bandwidth rental is available on request. Contact support." } }Amount Outside Your Limits (400)
{ "detail": { "code": 5004, "status": "failed", "msg": "amount out of range 1000..50000" } }Total Limit Exceeded (400)
The data object shows your current daily rentals and limits.
{
"detail": {
"code": 5010,
"status": "failed",
"msg": "Total daily bandwidth limit exceeded. Send reclaimOldest=true to reclaim your oldest daily order first.",
"data": { "addressUnits": 0, "maxUnitsPerAddress": 50000, "totalUnits": 200000, "maxUnitsTotal": 200000 }
}
}Another Order in Progress (409)
{ "detail": { "code": 5013, "status": "failed", "msg": "Another daily order of yours is being processed. Try again shortly." } }Reclaim Did Not Complete (503)
No new order was created and nothing was charged. Retry shortly.
{
"detail": {
"code": 5012,
"status": "failed",
"msg": "Could not reclaim your oldest daily order. No new order was created; try again shortly.",
"data": { "reclaimed": [], "notReclaimed": "B1D<key14>" }
}
}Temporarily Unavailable (503)
{ "detail": { "code": 5011, "status": "failed", "msg": "Daily bandwidth rental is temporarily unavailable. Try again later." } }{ "detail": { "code": 5003, "status": "failed", "msg": "Bandwidth delegation failed", "data": { "orderId": "B1D<key14>", "reclaimed": [] } } }Authentication (-1, -2), insufficient balance (1004), the 422 validation error and the 429 rate limit look the same as for POST /apiv2/bandwidth.
Error Code Reference
| Code | Description | HTTP Status |
|---|---|---|
10000 | Success — bandwidth delegated | 200 |
10003 | Test run — nothing reclaimed, delegated or charged (test=true) | 200 |
| any | Repeat of an already processed request — the result of the first attempt, successful or not | 208 |
- | Duplicate request still processing | 409 |
-1 | API key missing or unknown | 401 |
-2 | IP not in the key's whitelist | 401 |
1004 | Insufficient balance | 403 |
1005 | No payer address for user | 400 |
5004 | Amount outside your per-order limits, or malformed idempotency key | 400 |
5009 | Daily rental is not enabled for the account — available on request | 403 |
5010 | Total limit exceeded and reclaimOldest is false | 400 |
5013 | Another daily order of yours is being processed — retry shortly | 409 |
- | Invalid or unknown request body field (validation) | 422 |
5011 | Daily rental is temporarily unavailable — try again later | 503 |
5012 | An older rental could not be reclaimed — no new order, nothing charged | 503 |
5003 | Bandwidth delegation failed, or the service is temporarily unavailable — nothing charged | 503 |
Rate Limits
| Period | Limit | Description |
|---|---|---|
| 1 second | 10 requests | Maximum 10 requests per second per IP |
Rate Limit Exceeded (429)
{ "message": "API rate limit exceeded" }Idempotency
Works the same as for POST /apiv2/bandwidth, with 1d in place of the period: the message is receiveAddress:amount:1d:nonce.
- A repeat with the same key returns the result of the first attempt with HTTP 208, successful or not. Nothing is reclaimed, delegated or charged again. To try again after a failure, send a new key.
409withduplicate_request_processing— the same request is still being processed; wait, do not retry yet.- A malformed key is rejected with HTTP 400 (
5004). The key lives 24 hours and is scoped to your account.
Notes
- Access: on request only, enabled by Netts support (
5009without it). - Period: 24 hours. The bandwidth is reclaimed automatically when it ends.
- Limits: per order, per address and in total — set for your account. Only active daily rentals count.
- Payment: charged in TRX from your account balance when the bandwidth is delegated. A rejected order, a failed order and a test run cost nothing.
- No buffer: exactly the requested amount is delegated.
- Order ID format:
B1D….