Skip to main content

DelegateResource

POST

Delegate bandwidth or energy resources to other accounts in Stake 2.0.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.
networkstringrequired
Parameter specifying the network of the target chain.
Request Body
owner_addressstringrequired
Transaction initiator address. (Format: Base58 or Hex)
receiver_addressstringrequired
Resource receiver address, in Base58 format or HEX format.
balanceintegerrequired
Amount of TRX to delegate or undelegate for resources. (Unit: sun)
resourcestringrequired
Type of resource. (Enum: "BANDWIDTH" or "ENERGY")
lockboolean
Optional. Whether to lock the resource delegation. If true, the delegation cannot be canceled during the lock_period.
lock_periodinteger
Lock duration in blocks (1 block ≈ 3 seconds). Only valid if lock is true. (e.g., 1 day = 28800)
visibleboolean
Optional. Set to true to format addresses in Base58; set to false for hex format. (Default: false)
Permission_idinteger
Optional. Permission ID used for multi-signature account operations. Defaults to the owner permission (0) if unspecified.
Responses
owner_addressstring
Transaction initiator address. (Format: Base58 or Hex)
resourcestring
Type of resource. (Enum: BANDWIDTH, ENERGY)
receiver_addressstring
Resource receiver address.
balanceinteger
Amount of TRX for resource delegation. (Unit: sun)
lockboolean
Whether to lock the resource delegation. If true, the delegation cannot be canceled during the lock_period.
lock_periodinteger
Lock duration in blocks (1 block ≈ 3 seconds). Only valid if lock is true. (e.g., 1 day = 28800)
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "400"
}
cURL
curl -X POST 'https://tron-mainnet.nodit.io/wallet/delegateresource' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{}'