TRON - Freeze and Unfreeze TRX
Freezing and unfreezing TRX requires access to the accountโs private key in order to sign the transaction.
Notice
The examples in this guide are based on Tron Shasta (Testnet).
How To Freeze TRX
Step_1: Check the Account Balance
Use the "/wallet/getaccount
" method to verify the available balance before freezing (check funds).
- Tron official endpoint HERE.
Example request:
curl --location 'https://tron-testnet.blockchain.tatum.io/wallet/getaccount' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{
"address": "{YOUR_ADDRESS}",
"visible": true //Specifies whether the address is in Base58 format (default: false). Note: Set to true in this example for demonstration purposes
}'
Step_2: Prepare the Transaction to Freeze TRX
Use the "/wallet/freezebalancev2
" method to prepare the transaction for signing.
- Tron official endpoint HERE.
Example request:
curl --location 'https://tron-testnet.blockchain.tatum.io/wallet/freezebalancev2' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{
"owner_address": "{YOUR_ADDRESS}",
"frozenBalance": 1000000, //amount in SUN
"resource": "BANDWIDTH", //TRX stake type, 'BANDWIDTH' or 'ENERGY'
"visible": true //Specifies whether the address is in Base58 format (default: false). Note: Set to true in this example for demonstration purposes
}'
Step_3: Sign the Transaction
Once the freeze transaction is prepared, it must be signed using the accountโs private key.
Tatum does not provide an RPC method for signing TRON transactions. Signing must be done locally, typically using:
- The TronWeb JS library
- A hardware wallet or your own signing implementation
Step_4: Broadcast the Signed Transaction
Use the "/wallet/broadcasttransaction
" method to send the signed transaction.
- Tron official endpoint HERE.
Example request:
curl --location 'https://tron-shasta.blockchain.tatum.io/wallet/broadcasttransaction' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{
"raw_data": "{...}", // Your signed raw_data
"raw_data_hex": "{...}" // Hex version of raw_data
}'
How To Unfreeze TRX
Step_1: Check Frozen Resources
Use the "/wallet/getaccountresource
" method to verify frozen resources before unfreezing (check lock expiry).
- Tron official endpoint HERE.
Example request:
curl --location 'https://tron-testnet.blockchain.tatum.io/wallet/getaccountresource' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{
"address": "{YOUR_ADDRESS}",
"visible": true //Specifies whether the address is in Base58 format (default: false). Note: Set to true in this example for demonstration purposes
}'
Step_2: Prepare the Transaction to Unfreeze TRX
Use the "/wallet/unfreezebalancev2
" method to release the staked TRX.
- Tron official endpoint HERE.
Example request:
curl --location 'https://tron-testnet.blockchain.tatum.io/wallet/unfreezebalancev2' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{
"owner_address": "{YOUR_ADDRESS}",
"resource": "BANDWIDTH", // or "ENERGY", depending on what was frozen
"visible": true //Specifies whether the address is in Base58 format (default: false). Note: Set to true in this example for demonstration purposes
}'
Then:
- Sign the unfreeze transaction with your PrivateKey
- Broadcast it using the same
/wallet/broadcasttransaction
method
Common Issues When Freezing or Unfreezing TRX
If the transaction fails or behaves unexpectedly, consider the following troubleshooting steps:
Freezing
Symptom | Possible Cause | Suggested Action |
---|---|---|
INVALID_PARAMETER or CONTRACT_VALIDATE_ERROR | Incorrect address format or invalid freeze amount (e.g., not in SUN) | - Ensure the address is in Base58 format (if visible: true )- Freeze amount must be โฅ 1 TRX (1 TRX = 1,000,000 SUN) |
ACCOUNT_PERMISSION_ERROR | Transaction not signed correctly | - Double-check that the correct private key was used to sign the transaction |
Broadcast returns success but no frozen balance is shown | Transaction not confirmed or sent to the wrong network | - Check the transaction hash on TronScan - Confirm you're using the correct testnet or mainnet URL |
Unfreezing
Symptom | Possible Cause | Suggested Action |
---|---|---|
NO_FROZEN_BALANCE | The account has no staked TRX for the specified resource | - Double-check the resource type: BANDWIDTH vs ENERGY - Use /wallet/getaccountresource to inspect staked balances |
UNFREEZE_NOT_READY | Attempting to unfreeze before the mandatory 3-day lock period | - Wait at least 72 hours after freezing TRX before unfreezing |
Broadcast succeeds but no TRX is unlocked | Unfreeze transaction is not confirmed on-chain | - Check transaction status on TronScan - Ensure the transaction is signed and broadcast correctly |
Important Note on Troubleshooting
Tatum is a non-custodial platform. We do not store or manage private keys, nor do we intervene in transactions that require signing, including freezing or unfreezing TRX. As a result, we are unable to provide direct troubleshooting support for transaction signing or broadcasting issues related to TRX freezing or unfreezing.
Please ensure you are using the correct signing tools (e.g., TronWeb) and that your private key management is handled securely on your side.
For any issues related to raw transaction signing, broadcast, or account state, we recommend using Tronโs official developer tools and public block explorers like TronScan.
Updated about 17 hours ago