Skip to main content

TRON

TRON has a unique resource model where bandwidth and energy are required to execute transactions. Instead of paying gas fees directly, users can freeze TRX to acquire these resources, or the platform handles fees automatically.

TRC-20 Token Transfers

Transfer TRC-20 tokens using the standard transaction endpoint:

curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"orderId": "d0e1f2a3-b4c5-4d6e-7f8a-9b0c1d2e3f4a",
"vaultId": "kR7mNpX2wQvL9sYhBjD4eT",
"destination": "TRecipientAddress...",
"network": "tron-mainnet",
"asset": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"amount": "1000.00",
"feePriority": "medium"
}' \
https://api.carabaas.com/api/v1/transactions

TRON Resource Model

TRON uses two resources instead of gas:

ResourcePurposeHow to Obtain
BandwidthRequired for all transactionsFreeze TRX or pay TRX fee
EnergyRequired for smart contract callsFreeze TRX or pay TRX fee

If an address has insufficient bandwidth or energy, the network deducts TRX as a fee instead. Freezing TRX is more cost-effective for frequent operations.

Freeze TRX

Freeze TRX to acquire bandwidth or energy. Frozen TRX also earns staking rewards.

curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"orderId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
"vaultId": "kR7mNpX2wQvL9sYhBjD4eT",
"addressId": "gMP71sR5sNUnGdKFTsNzp6",
"network": "tron-mainnet",
"asset": "c195",
"amount": "1000",
"options": {
"type": "freeze",
"resource": "ENERGY"
}
}' \
https://api.carabaas.com/api/v1/transactions

Freeze Parameters

ParameterValuesDescription
options.typefreezeFreeze operation
options.resourceBANDWIDTH or ENERGYResource type to acquire
amountTRX amountAmount of TRX to freeze

Unfreeze TRX

Unfreeze previously frozen TRX to make it liquid again:

curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"orderId": "f2a3b4c5-d6e7-4f8a-9b0c-1d2e3f4a5b6c",
"vaultId": "kR7mNpX2wQvL9sYhBjD4eT",
"addressId": "gMP71sR5sNUnGdKFTsNzp6",
"network": "tron-mainnet",
"asset": "c195",
"amount": "500",
"options": {
"type": "unfreeze",
"resource": "ENERGY"
}
}' \
https://api.carabaas.com/api/v1/transactions
note

After unfreezing, there is a 14-day waiting period before the TRX becomes available for withdrawal.

Delegate Resources

Delegate bandwidth or energy to another address without transferring TRX:

curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"orderId": "a3b4c5d6-e7f8-4a9b-0c1d-2e3f4a5b6c7d",
"vaultId": "kR7mNpX2wQvL9sYhBjD4eT",
"addressId": "gMP71sR5sNUnGdKFTsNzp6",
"destination": "TDelegateRecipient...",
"network": "tron-mainnet",
"asset": "c195",
"amount": "1000",
"options": {
"type": "delegate",
"resource": "ENERGY"
}
}' \
https://api.carabaas.com/api/v1/transactions

This allows you to pay for another address's transaction fees without giving them TRX.

Undelegate Resources

Reclaim previously delegated resources:

curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"orderId": "b4c5d6e7-f8a9-4b0c-1d2e-3f4a5b6c7d8e",
"vaultId": "kR7mNpX2wQvL9sYhBjD4eT",
"addressId": "gMP71sR5sNUnGdKFTsNzp6",
"destination": "TDelegateRecipient...",
"network": "tron-mainnet",
"asset": "c195",
"amount": "1000",
"options": {
"type": "undelegate",
"resource": "ENERGY"
}
}' \
https://api.carabaas.com/api/v1/transactions

TRON Operations Summary

Operationoptions.typeoptions.resourceDescription
FreezefreezeBANDWIDTH or ENERGYLock TRX to acquire resources
UnfreezeunfreezeBANDWIDTH or ENERGYUnlock TRX (14-day waiting period)
DelegatedelegateBANDWIDTH or ENERGYLend resources to another address
UndelegateundelegateBANDWIDTH or ENERGYReclaim delegated resources
note

Exact options field names for TRON operations are being finalized. Contact your account manager for the latest parameters.

See Also