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:

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:

  1. Sign the unfreeze transaction with your PrivateKey
  2. 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

SymptomPossible CauseSuggested Action
INVALID_PARAMETER or CONTRACT_VALIDATE_ERRORIncorrect 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_ERRORTransaction not signed correctly- Double-check that the correct private key was used to sign the transaction
Broadcast returns success but no frozen balance is shownTransaction 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

SymptomPossible CauseSuggested Action
NO_FROZEN_BALANCEThe 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_READYAttempting 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 unlockedUnfreeze 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.