Vote $TRX
Starts spending Voting Power to Super Representative (SR) to get Reward.
warning
You need to complete signing tx in 1 minute after tx generated
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 servicecode.flow* -string: The operation to performvote.callback_url-string: Your callback url endpoint to get update ofstatefrom our systems.
Request Sample
{
"service_code": "staking-tron",
"flow": "vote"
}
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-vote-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": "77f61b33-d3e0-49a8-ad11-69c4802bfd52",
"service_code": "staking-tron",
"flow": "vote",
"inquiry_id": "6e819355-2604-4ec4-b328-5bfdc93aa227",
"inquiry_identifier": "create-vote-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": "sr_code",
"display": "SR Code",
"description": "SR code",
"validations": [
{
"type": "string",
"options": {}
}
],
"array": 0,
"default_val": null,
"visibility": 1
}
],
"data": {
"callback_url": "",
"signed_vote_tx": "",
"sr_address": "",
"sr_code": "",
"vote_tx": "",
"wallet_address": ""
},
"created_at": "2024-04-18T18:00:24Z",
"updated_at": "2024-04-18T18:00:24Z",
"expired_at": "2024-04-19T18:00:24Z"
}
}
Step 2 - Create Vote TX
Endpoint : flow/{:id}/next
Method : POST
Request
Body
inquiry_id* -string: Your inquiry id from step 1data-object* : Wrapped data objectwallet_address* -string: Address which you want to use to vote.sr_code-string: The SR Code to Vote
Sample Endpoint Request : flow/77f61b33-d3e0-49a8-ad11-69c4802bfd52/next
Request Sample
Request Sample
{
"inquiry_id":"6e819355-2604-4ec4-b328-5bfdc93aa227",
"data": {
"wallet_address":"TTB6tPgJRMJ1C37vogtQu9eyKbdrwK1MeR",
"sr_code":"NOBIMTR01"
}
}
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.vote-sign: Signing and broadcast the vote 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": "77f61b33-d3e0-49a8-ad11-69c4802bfd52",
"service_code": "staking-tron",
"flow": "vote",
"inquiry_id": "52e54c1c-d30a-4966-a52c-ba1ef57a832d",
"inquiry_identifier": "vote-sign",
"state": "initialized",
"data": {
"callback_url": "",
"signed_vote_tx": "",
"sr_address": "TXbcmuJ6BMiZeXrWBSFwNvxd2Ggs1Jjrmu",
"sr_code": "NOBIMTR01",
"vote_tx": "ffe21f88a95a829e8c5bd11d5053556e1cde4f978248013548f1548116e45146",
"wallet_address": "TTB6tPgJRMJ1C37vogtQu9eyKbdrwK1MeR"
},
"created_at": "2024-04-18T18:00:24Z",
"updated_at": "2024-04-18T18:01:03Z",
"expired_at": "2024-04-18T18:02:04Z"
}
}
Step 3 - Submit Signed Vote Transaction
Endpoint : flow/{:id}/next
Method : POST
Request
Body
inquiry_id* -string: Your inquiry id from step 1data* -object: Wrapped data objectsigned_vote_tx* -string: Signed transaction payload
Sample Endpoint Request : flow/d25bf5c7-d307-460d-a0e5-c98b9a8cad2a/next
Request Sample
{
"inquiry_id":"52e54c1c-d30a-4966-a52c-ba1ef57a832d",
"data": {
"signed_vote_tx":"f3b45d0918977815a4c662276505d75c542fe55c78099f6a286ed5e8d05fa1225539b9b3e028c2b42b70683ace154623734b95248c393c116d0e3deb656694f300"
}
}
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": "77f61b33-d3e0-49a8-ad11-69c4802bfd52",
"service_code": "staking-tron",
"flow": "vote",
"state": "initialized",
"data": {
"callback_url": "",
"signed_vote_tx": "",
"sr_address": "TXbcmuJ6BMiZeXrWBSFwNvxd2Ggs1Jjrmu",
"sr_code": "NOBIMTR01",
"vote_tx": "ffe21f88a95a829e8c5bd11d5053556e1cde4f978248013548f1548116e45146",
"wallet_address": "TTB6tPgJRMJ1C37vogtQu9eyKbdrwK1MeR"
},
"created_at": "2024-04-18T18:00:24Z",
"updated_at": "2024-04-18T18:01:03Z",
"expired_at": "2024-04-18T18:02:04Z"
}
}