legacy staking closed on mainnetThe legacy Use the current staking method instead:
wallet/freezebalance endpoint is disabled on mainnet and returns:wallet/freezebalancev2. The examples below are kept for historical context and may only work on specific networks where legacy staking is still enabled.Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
owner_address— the address that owns the TRX to freeze (hex format)frozen_balance— the amount of TRX to freeze (in sun, where 1 TRX = 1,000,000 sun)frozen_duration— the duration to freeze for (minimum 3 days)resource— the resource type to obtain (“BANDWIDTH” or “ENERGY”)receiver_address— optional address to receive the resources. Omit this field to freeze for yourself. If provided, it must be different fromowner_address.visible— optional boolean to specify address format (default: false for hex format)
Response
visible— boolean indicating address format usedtxID— transaction ID hashraw_data— raw transaction data objectraw_data_hex— hexadecimal representation of raw transaction data
Use case
Thewallet/freezebalance method is used for:
- Staking TRX to obtain bandwidth for free transactions (legacy method).
- Freezing TRX to get energy for smart contract execution (legacy method).
- Supporting older applications that still use the original staking mechanism.
- Migrating from the deprecated staking system to the new
freezebalancev2method.
curl examples
freeze for yourself (omitreceiver_address):
Shell
Shell
if you pass To freeze for yourself, simply omit
receiver_address equal to owner_address, the node returns:receiver_address. For new staking, prefer wallet/freezebalancev2.recommended v2 equivalent
Use the v2 staking endpoint (no duration or receiver in the body):Shell
wallet/unfreezebalancev2 followed by wallet/withdrawexpireunfreeze after the waiting period.Body
application/json
Available options:
BANDWIDTH, ENERGY Optional. Address to receive the resources. Omit to freeze for yourself. Must not equal owner_address.