Skip to main content

Freeze $TRX

Starts freezing TRX to get ENERGY or BANDWIDTH, and Voting Power.

warning

You need to complete signing tx in 1 minute after tx generated

Staking $TRX requires two steps:

  1. Freeze $TRX: This will Freeze your balance to get ENERGY or BANDWIDTH, and Voting Power.
  2. Vote $TRX: This vote $TRX to a specific Super Representative (SR). NOBI's SR address is TXbcmuJ6BMiZeXrWBSFwNvxd2Ggs1Jjrmu.

In the following guide we will illustrate how to stake $TRX.

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 freeze.
  • callback_url - string : Your callback url endpoint to get update of state from our systems.
Request Sample
{
"service_code": "staking-tron",
"flow": "freeze"
}

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-freeze-tx : Next you need to assign the staking data within the tx creation.
  • 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": "e64f2c4c-5a34-4752-9112-b70108269a1e",
"service_code": "staking-tron",
"flow": "freeze",
"inquiry_id": "3314fd6f-96e0-4ca9-abf3-b6706d82cf77",
"inquiry_identifier": "create-freeze-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": "",
"freeze_tx": "",
"resource": "",
"signed_freeze_tx": "",
"wallet_address": ""
},
"created_at": "2024-04-18T15:38:22Z",
"updated_at": "2024-04-18T15:38:22Z",
"expired_at": "2024-04-19T15:38:22Z"
}
}

Step 2 - Create Freeze TX

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/e64f2c4c-5a34-4752-9112-b70108269a1e/next

Request Sample
Request Sample
{
"inquiry_id":"3314fd6f-96e0-4ca9-abf3-b6706d82cf77",
"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.
    • freeze-sign : Signing and broadcast the freeze 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": "e64f2c4c-5a34-4752-9112-b70108269a1e",
"service_code": "staking-tron",
"flow": "freeze",
"inquiry_id": "b9c4a67d-95c3-4b0b-8f2c-9d0a72bc76d5",
"inquiry_identifier": "freeze-sign",
"state": "initialized",
"inputs": [
{
"type": "string",
"name": "signed_freeze_tx",
"display": "Signed Freeze Tx",
"description": "Signed Freeze tx",
"validations": [
{
"type": "presence",
"options": {}
},
{
"type": "signed_transaction",
"options": {}
}
],
"array": 0,
"default_val": null,
"visibility": 1
}
],
"data": {
"amount": "10",
"callback_url": "",
"freeze_tx": "b9988753f798890528fc7ce1140934d4ac9276a79b28b2122ece758a117a44d4",
"resource": "bandwidth",
"signed_freeze_tx": "",
"wallet_address": "TTB6tPgJRMJ1C37vogtQu9eyKbdrwK1MeR"
},
"created_at": "2024-04-18T15:38:22Z",
"updated_at": "2024-04-18T15:38:48Z",
"expired_at": "2024-04-18T15:39:48Z"
}
}

Step 3 - Submit Signed Freeze Transaction

Endpoint : flow/{:id}/next

Method : POST

Request

Body

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

Sample Endpoint Request : flow/d25bf5c7-d307-460d-a0e5-c98b9a8cad2a/next

Request Sample
{
"inquiry_id":"b9c4a67d-95c3-4b0b-8f2c-9d0a72bc76d5",
"data": {
"signed_freeze_tx": "6198f57685082ba537a80946aff1c635e558285ed885319b989a6a0a251ce35e67b7c1317695165299e1b0acef12db7757ed6215ed27cd15732716e79722a0d101"
}
}

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": "e64f2c4c-5a34-4752-9112-b70108269a1e",
"service_code": "staking-tron",
"flow": "freeze",
"state": "initialized",
"data": {
"amount": "10",
"callback_url": "",
"freeze_tx": "b9988753f798890528fc7ce1140934d4ac9276a79b28b2122ece758a117a44d4",
"resource": "bandwidth",
"signed_freeze_tx": "",
"wallet_address": "TTB6tPgJRMJ1C37vogtQu9eyKbdrwK1MeR"
},
"created_at": "2024-04-18T15:38:22Z",
"updated_at": "2024-04-18T15:38:48Z",
"expired_at": "2024-04-18T15:39:48Z"
}
}