Auto Refill
Create Bandwidth Rule
Top up bandwidth on an address whenever it falls below a threshold
POST
Create Bandwidth Rule
Create Bandwidth Rule
Creates an Auto Refill rule for one address. From the next check on, whenever the address has less available bandwidth thanthreshold_bandwidth, we buy add_volume bandwidth for the chosen duration and charge your balance. See the overview for how checks, cost and statuses work.
The request only creates the rule — it does not buy anything itself. Requires the buy_bandwidth scope. To see the price of one refill first, use Bandwidth Refill Quote.
Available bandwidth counts everything the address can pay for a transaction with: the free 600 a day plus any staked or delegated bandwidth. A threshold of 600 or less is met by the free allowance alone until the address has spent it.
Request body
string
required
TRON address to keep supplied (T… format, 34 characters). Contract addresses are rejected.
number
required
Buy when the address has less available bandwidth than this. From 1 to 1,000,000.
number
required
Bandwidth to buy per refill. From 350 to 100,000. Keep it at or above
threshold_bandwidth — see the warning in the overview.string
default:"1h"
Rental duration of each refill:
"1h" or "1d".string
Your own name for the rule, up to 100 characters. Optional.
Response
The new rule — the same fields as in List Bandwidth Rules — plus two fields about the address right now:number | null
Bandwidth available on the address at the moment the rule was created, free bandwidth included.
null if it could not be read; the rule is created either way.boolean
true if current_bandwidth is already below the threshold, so the next check — usually within a minute — will buy. false if the address has enough, or if the level could not be read.Example
Response
Errors
detail as an array: