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:
| Resource | Purpose | How to Obtain |
|---|---|---|
| Bandwidth | Required for all transactions | Freeze TRX or pay TRX fee |
| Energy | Required for smart contract calls | Freeze 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
| Parameter | Values | Description |
|---|---|---|
options.type | freeze | Freeze operation |
options.resource | BANDWIDTH or ENERGY | Resource type to acquire |
amount | TRX amount | Amount 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
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
| Operation | options.type | options.resource | Description |
|---|---|---|---|
| Freeze | freeze | BANDWIDTH or ENERGY | Lock TRX to acquire resources |
| Unfreeze | unfreeze | BANDWIDTH or ENERGY | Unlock TRX (14-day waiting period) |
| Delegate | delegate | BANDWIDTH or ENERGY | Lend resources to another address |
| Undelegate | undelegate | BANDWIDTH or ENERGY | Reclaim delegated resources |
Exact options field names for TRON operations are being finalized. Contact your account manager for the latest parameters.