Buy energy
rent_energyBuy energy for an address and charge the TRX balance. The lowest offer is tried first; price_trx in the answer is the full charge. Spends money: confirm with the user first. Needs an API key at the rent or full level.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"address": "<address>",
"volume": "<volume>",
"duration": "<duration>"
},
"name": "rent_energy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| volume | Yes | Energy amount, 30000 to 4000000. One USDT transfer usually needs about 65000, or about 131000 to an address that holds no USDT. | |
| address | Yes | Address that receives the energy. | |
| duration | Yes | Energy rental length. | |
| exact_volume | No | Optional, default false. True excludes suppliers that do not sell exactly this amount. | |
| no_activation | No | Optional, default false. True fails with inactive_address instead of adding the activation fee for an address that is not activated. | |
| exact_duration | No | Optional, default false. True excludes suppliers that do not sell exactly this duration; false allows the shortest longer one. | |
| idempotency_key | No | Recommended. A new random value for each purchase. Reuse it only to retry the same purchase after a lost response: the original result comes back and nothing is charged twice. |