Skip to main content

Withdraw Unfreeze $TRX

The unfreeze process in Tron takes 14 days to complete.

It is a two step process:

  1. Unfreeze transaction — This starts the unfreeze of the specified number of Tron tokens.
  2. Withdraw Balance transaction — This withdraw $TRX back into the wallet address once the unfreeze period is complete.

In the following guide we will illustrate how to unfreeze MATIC.

Step 1 - Initiate Flow

Endpoint : flow Method : POST

Request

Body

  • service_code* - string : Service code, use service endpoint to get the service code.
  • flow* - string : The operation to perform unfreeze.
  • callback_url - string : Your callback url endpoint to get update of state from our systems.
Request Sample
{
"service_code": "staking-tron",
"flow": "unfreeze"
}

Response

  • id - string : Flow ID.
  • service_code - string : Current flow service code.
  • flow - string : Current flow name.
  • inquiry_id - string : ID For next Request Step Inquiry.
  • inquiry_identifier - string : Next step identifier name.
  • staking-assign-data : Next you need to assign the staking data.
  • state - string : Current state of your flow.
  • inputs - Array<Object> : Next step inputs.
  • data - Object : Stored data of your flow.
  • created_at - Timestamp RFC3339 : Time when flow created.
  • updated_at - Timestamp RFC3339 : Last flow updated.
  • expired_at - Timestamp RFC3339 : Maximum time you have to finish the process before flow dropped by system, will always increment by your last action + 2 hours.
Success Sample
{
"status": 1,
"status_service": "00",
"status_number": "F000001",
"status_code": "SSSSSS",
"message": "success",
"data": {
"id": "3e8e5a26-2586-4e2c-a131-b50e28e57acc",
"service_code": "staking-tron",
"flow": "unfreeze",
"inquiry_id": "38a7d287-8275-40f9-9316-ba375b8d86e4",
"inquiry_identifier": "create-unfreeze-tx",
"state": "initialized",
"inputs": [
{
"type": "string",
"name": "wallet_address",
"display": "Wallet Address",
"description": "Wallet address",
"validations": [
{
"type": "string",
"options": {}
}
],
"array": 0,
"default_val": null,
"visibility": 1
},
{
"type": "string",
"name": "resource",
"display": "Resource",
"description": "Resource can be bandwidth or energy",
"validations": [
{
"type": "string",
"options": {}
}
],
"array": 0,
"default_val": null,
"visibility": 1
},
{
"type": "decimal",
"name": "amount",
"display": "Amount",
"description": "Amount",
"validations": [
{
"type": "presence",
"options": {}
},
{
"type": "numericality",
"options": {
"greater_than": "0"
}
}
],
"array": 0,
"default_val": null,
"visibility": 1
}
],
"data": {
"amount": "",
"callback_url": "",
"resource": "",
"signed_unfreeze_tx": "",
"unfreeze_tx": "",
"wallet_address": ""
},
"created_at": "2024-04-18T18:18:12Z",
"updated_at": "2024-04-18T18:18:12Z",
"expired_at": "2024-04-19T18:18:12Z"
}
}

Step 2 - Create Unfreeze Transaction

Endpoint : flow/{:id}/next

Method : POST

Request

Body

  • inquiry_id* - string : Your inquiry id from step 1
  • data - object* : Wrapped data object
    • wallet_address* - string : Address which you want to use to freeze.
    • resource - string : The resource to get by freezing $TRX, you can choose between BANDWIDTH or ENERGY.
    • amount* - float64 : Amount of $TRX Token you want to freeze.

Sample Endpoint Request : flow/3e8e5a26-2586-4e2c-a131-b50e28e57acc/next

Request Sample
{
"inquiry_id":"bdf6dd09-8b15-4653-b010-03dded42e788",
"data": {
"wallet_address": "TTB6tPgJRMJ1C37vogtQu9eyKbdrwK1MeR",
"resource": "BANDWIDTH",
"amount": 10
}
}

Response

  • id - string : Flow ID.
  • service_code - string : Current flow service code.
  • flow - string : Current flow name.
  • inquiry_id - string : ID For next Request Step Inquiry.
  • inquiry_identifier - string : Next step identifier name.
    • create-unfreeze-tx : Next will be create unfreeze tx.
  • state - string : Current state of your flow.
  • inputs - Array<Object> : Next step inputs.
  • data - Object : Stored data of your flow.
  • created_at - Timestamp RFC3339 : Time when flow created.
  • updated_at - Timestamp RFC3339 : Last flow updated.
  • expired_at - Timestamp RFC3339 : Maximum time you have to finish the process before flow dropped by system, will always increment by your last action + 2 hours.
Success Sample
{
"status": 1,
"status_service": "00",
"status_number": "F000001",
"status_code": "SSSSSS",
"message": "success create data",
"data": {
"id": "3e8e5a26-2586-4e2c-a131-b50e28e57acc",
"service_code": "staking-tron",
"flow": "unfreeze",
"inquiry_id": "d0512ce0-b858-4a4a-9da5-38ab58e65f02",
"inquiry_identifier": "unfreeze-sign",
"state": "initialized",
"inputs": [
{
"type": "string",
"name": "signed_unfreeze_tx",
"display": "Signed Unfreeze Tx",
"description": "Signed Unfreeze tx",
"validations": [
{
"type": "presence",
"options": {}
},
{
"type": "signed_transaction",
"options": {}
}
],
"array": 0,
"default_val": null,
"visibility": 1
}
],
"data": {
"amount": "10",
"callback_url": "",
"resource": "bandwidth",
"signed_unfreeze_tx": "",
"unfreeze_tx": "d91aa5409b7f82079211f880afae01abbc812a01f65d3ea0b228de4310524db1",
"wallet_address": "TTB6tPgJRMJ1C37vogtQu9eyKbdrwK1MeR"
},
"created_at": "2024-04-18T18:18:12Z",
"updated_at": "2024-04-18T18:18:39Z",
"expired_at": "2024-04-18T18:19:40Z"
}
}

Step 3 - Submit Signed Unfreeze Transaction

Endpoint : flow/{:id}/next

Method : POST

Request

Body

  • inquiry_id* - string : Your inquiry id from step 1
  • data* - object : Wrapped data object
  • signed_unfreeze_tx* - string : Signed transaction payload

Sample Endpoint Request : flow/3e8e5a26-2586-4e2c-a131-b50e28e57acc/next

Request Sample
Request Sample
{
"inquiry_id":"d0512ce0-b858-4a4a-9da5-38ab58e65f02",
"data": {
"signed_unfreeze_tx":"00b10bd440a0e4256a6477dc27e07c8a2caa40991564c652a0464cf9e879b2c633a44f1d29d164ea440b04cc7481ef0d3634b7fd64234238f08ee938012b3f6d00"
}
}

To retry the undelegate signing transaction, just resubmit the inquiry.

Response

  • id - string : Flow ID.
  • service_code - string : Current flow service code.
  • flow - string : Current flow name.
  • state - string : Current state of your flow.
  • data - Object : Stored data of your flow.
  • created_at - Timestamp RFC3339 : Time when flow created.
  • updated_at - Timestamp RFC3339 : Last flow updated.
  • expired_at - Timestamp RFC3339 : Maximum time you have to finish the process before flow dropped by system, will always increment by your last action + 2 hours.
Success Sample
{
"status": 1,
"status_service": "00",
"status_number": "F000001",
"status_code": "SSSSSS",
"message": "success create data",
"data": {
"id": "3e8e5a26-2586-4e2c-a131-b50e28e57acc",
"service_code": "staking-tron",
"flow": "unfreeze",
"state": "initialized",
"data": {
"amount": "10",
"callback_url": "",
"resource": "bandwidth",
"signed_unfreeze_tx": "",
"unfreeze_tx": "d91aa5409b7f82079211f880afae01abbc812a01f65d3ea0b228de4310524db1",
"wallet_address": "TTB6tPgJRMJ1C37vogtQu9eyKbdrwK1MeR"
},
"created_at": "2024-04-18T18:18:12Z",
"updated_at": "2024-04-18T18:18:39Z",
"expired_at": "2024-04-18T18:19:40Z"
}
}