Skip to main content

Claim $TRX Reward

Claiming $TRX rewards is instant with some considerations.

We will collect the address from which TRX is staked

info

The amount of TRX rewards must be greater than 0 TRX before a Claim Rewards transaction is possible using the Staking API. Every Wallet Address can only claim reward once a day.

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

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-claim-rewards-tx : Next you need to create claim rewards tx by giving 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": "c62efd32-5b3a-456d-89d3-47542065e898",
"service_code": "staking-tron",
"flow": "claim-rewards",
"inquiry_id": "39d9b1bb-7b82-4dfe-9925-e0f3b2340740",
"inquiry_identifier": "create-claim-rewards-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
}
],
"data": {
"callback_url": "",
"claim_rewards_tx": "",
"signed_claim_rewards_tx": "",
"wallet_address": ""
},
"created_at": "2024-04-18T18:22:34Z",
"updated_at": "2024-04-18T18:22:34Z",
"expired_at": "2024-04-19T18:22:34Z"
}
}

Step 2 - Create Claim Reward 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 claim-reward.

Sample Endpoint Request : flow/c62efd32-5b3a-456d-89d3-47542065e898/next

Request Sample
{
"inquiry_id":"39d9b1bb-7b82-4dfe-9925-e0f3b2340740",
"data": {
"wallet_address":"TTB6tPgJRMJ1C37vogtQu9eyKbdrwK1MeR"
}
}

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-claim-reward-tx : Next will be claim-reward 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": "c62efd32-5b3a-456d-89d3-47542065e898",
"service_code": "staking-tron",
"flow": "claim-rewards",
"inquiry_id": "03f820b9-08f9-4605-b240-386c50e9b404",
"inquiry_identifier": "claim-rewards-sign",
"state": "initialized",
"inputs": [
{
"type": "string",
"name": "signed_claim_rewards_tx",
"display": "Signed Claim Rewards Tx",
"description": "Signed Claim rewards tx",
"validations": [
{
"type": "presence",
"options": {}
},
{
"type": "signed_transaction",
"options": {}
}
],
"array": 0,
"default_val": null,
"visibility": 1
}
],
"data": {
"callback_url": "",
"claim_rewards_tx": "b9cc773834498f0c01140cc20e76e7b3279e018e46cd689c3587d2bbc526440d",
"signed_claim_rewards_tx": "",
"wallet_address": "TTB6tPgJRMJ1C37vogtQu9eyKbdrwK1MeR"
},
"created_at": "2024-04-18T18:22:34Z",
"updated_at": "2024-04-18T18:26:32Z",
"expired_at": "2024-04-18T18:27:33Z"
}
}

Step 3 - Submit Signed Claim Reward Transaction

Endpoint : flow/{:id}/next

Method : POST

Request

Body

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

Sample Endpoint Request : flow/c62efd32-5b3a-456d-89d3-47542065e898/next

Request Sample
{
"inquiry_id":"03f820b9-08f9-4605-b240-386c50e9b404",
"data": {
"signed_claim_rewards_tx":"3846fb216ff45890cc2b7d715d294444c955555c31751af03c7145ca825a41020e2ac4667b5d3b91cdb09706e9b19e9622cd78eae292ead5dfb0f72133b1cce001"
}
}

To retry the claim-reward 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": "c62efd32-5b3a-456d-89d3-47542065e898",
"service_code": "staking-tron",
"flow": "claim-rewards",
"state": "initialized",
"data": {
"callback_url": "",
"claim_rewards_tx": "b9cc773834498f0c01140cc20e76e7b3279e018e46cd689c3587d2bbc526440d",
"signed_claim_rewards_tx": "",
"wallet_address": "TTB6tPgJRMJ1C37vogtQu9eyKbdrwK1MeR"
},
"created_at": "2024-04-18T18:22:34Z",
"updated_at": "2024-04-18T18:26:32Z",
"expired_at": "2024-04-18T18:27:33Z"
}
}