Skip to content

Rent bandwidth​

POST
/bandwidth

Bandwidth rental on TRON, delegated to a recipient address for five minutes or an hour. The bandwidth is reclaimed automatically when the period ends.

Access is tiered. Accredited accounts rent any amount within the pool and the limits, with several concurrent orders. Without accreditation you may rent 400 units, one order at a time: the next is possible only after the previous rental ends. A request for any other amount is rejected with 5008, a second concurrent order with 5007. Accreditation is granted by NETTS support.

There is no buffer here: exactly the requested amount is delegated. One order may produce up to ten delegation hashes — the hash field is always an array.

Fixed surcharges are added to the price: 0.372 TRX for an order below 1000 units (compensation for the on-chain delegation and reclaim), or 0.268 TRX if the order is fulfilled by sending TRX.

Idempotency works through the X-Idempotency-Key header. The result of the first attempt is cached whether it succeeded or failed: a repeat with the same key returns 208 with that result plus an idempotency object, and the order is not attempted again. To try again after a failure, send a new key. Rejections before the request is accepted (400, 401, 422, 429, the access tier 5008) are not cached.

Authorizations​

ApiKeyAuth

API key from the dashboard. Some Host Mode endpoints also accept the key as an api_key field in the request body — this is stated in the schema of the particular operation.

Type
API Key (header: X-API-KEY)

Parameters​

Header Parameters

X-Idempotency-Key

Idempotency key, base64, 16–64 characters from A–Z a–z 0–9 + / = _ -. Built as base64(HMAC-SHA256(api_key, "receiveAddress:amount:period:nonce")), where nonce is stable across retries of one order and differs between distinct orders. The period must be part of the string: renting the same address for 5m and for 1h are different orders. If the header is omitted, the server derives the key itself from the request parameters within a short time window. A malformed or over-long key is rejected with 400 (5004). type: string pattern: '^[A-Za-z0-9+/=_-]{16,64}$'

Type
string
Pattern
"^[A-Za-z0-9+/=_-]{16,64}$"

Request Body​

application/json
JSON
{
  
"amount": 1500,
  
"receiveAddress": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
  
"period": "string",
  
"trx_send": false,
  
"check": false,
  
"test": false
}

Responses​

The order was processed. Read detail.code: 10000 — bandwidth delegated or TRX sent, 10002 — the recipient already had enough bandwidth and nothing was charged, 10003 — a test run.

application/json
JSON
{
  
"detail": {
  
  
"code": 10000,
  
  
"status": "completed",
  
  
"msg": "Successful, 1.24 TRX",
  
  
"data": {
  
  
  
"orderId": "B5Ma1b2c3d4e5f6",
  
  
  
"paidTRX": 1.24,
  
  
  
"fulfilledBy": "bandwidth",
  
  
  
"hash": [
  
  
  
  
"a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456"
  
  
  
],
  
  
  
"bandwidth": 1500,
  
  
  
"period": "5m"
  
  
}
  
}
}

Playground​

Authorization
Headers
Body

Samples​

Powered by VitePress OpenAPI