githubEdit

delegateEnergy - TRON energy

Example code for the delegateEnergy JSON RPC method. Сomplete guide on how to use delegateEnergy JSON RPC in GetBlock Web3 documentation.

This endpoint delegates energy to a TRON address. In most cases, the order completes immediately with status "success".

Parameter

Parameter

Type

Required

Description

target_address

string

Yes

TRON wallet address (starts with T, 34 characters)

volume

integer

Yes

Energy amount: 30,000 — 5,000,000

duration

string

Yes

"1h", "1d", "3d", "7d", "14d"

Request

curl -X POST https://api.getblock.io/tron-energy/delegateEnergy \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "target_address": "TUo8pycbvje9w2XYsNnnzw67bpPs4GLFyD",
    "volume": 65000,
    "duration": "3d"
  }'

Response

{
  "order_id": "clxyz123...",
  "status": "success",
  "target_address": "TUo8pycbvje9w2XYsNnnzw67bpPs4GLFyD",
  "resource_type": "energy",
  "volume": 65000,
  "duration": "3d",
  "price_usd": "4.97",
  "trx_spent": 20.12,
  "provider_order_id": 12345,
  "txid": "abc123def...",
  "message": "Order completed successfully."
}

Last updated

Was this helpful?