Staking & reward APIs
Quick-reference table of every HTTP API used in the Staking, voting & rewards chapter — for staking, delegating, unstaking, voting, and reward queries.
Prerequisites
This page is a quick-reference table of every HTTP API used in the Staking, voting & rewards chapter. For walkthroughs and explanation, see the chapter's other pages.
Staking and resource APIs
| API | Description |
|---|---|
freezebalancev2 | Stake TRX (Stake 2.0) |
unfreezebalancev2 | Unstake TRX (Stake 2.0) |
unfreezebalance | Unstake TRX staked under Stake 1.0 |
withdrawexpireunfreeze | Withdraw unstaked TRX after the 14-day pending period |
cancelallunfreezev2 | Cancel all ongoing unstaking operations and re-stake the funds |
getavailableunfreezecount | Query the remaining number of unstake operations the account can submit (max 32) |
getcanwithdrawunfreezeamount | Query the amount of unstaked TRX currently withdrawable |
Delegation APIs
| API | Description |
|---|---|
delegateresource | Delegate Bandwidth or Energy to another account |
undelegateresource | Cancel a resource delegation |
getcandelegatedmaxsize | Query how much of a given resource can still be delegated |
getdelegatedresourcev2 | Query resources delegated from one address to another |
getdelegatedresourceaccountindexv2 | Query the full delegation index of an account (who delegates to it, who it delegates to) |
Account state queries
| API | Description |
|---|---|
getaccount | Query an account's staking status, resource share, unstaking state, and voting state |
getaccountresource | Query the total amount of resources, the amount used, and the amount available |
Voting and SR APIs
| API | Description |
|---|---|
votewitnessaccount | Vote for SRs (cast TRON Power across one or more candidates) |
listwitnesses | List all current SRs and SR Partners |
createwitness | Apply to become an SR candidate |
updatewitness | Edit the URL of an SR's project website |
getnextmaintenancetime | Get the timestamp of the next 6-hour maintenance period (when votes are next counted) |
Reward APIs
| API | Description |
|---|---|
getReward | Query rewards an SR or voter has not yet claimed |
withdrawbalance | Claim accrued rewards into the spendable balance |
getBrokerage | Get the current brokerage ratio of an SR or SR Partner |
updateBrokerage | Update the brokerage ratio (SR or SR Partner only) |
Proposal APIs
These are used by SRs / SR Partners / SR Candidates to participate in network governance via proposals. See Committee & proposals for the full lifecycle, or the Create a Governance Proposal recipe for a TronWeb walkthrough.
| API | Description |
|---|---|
proposalcreate | Create a proposal |
proposalapprove | Approve a proposal (active SRs only) |
proposaldelete | Delete a proposal (creator only, before expiry) |
listproposals | List all proposals |
getproposalbyid | Query a proposal by ID |
Related resources
- Stake 2.0 overview — concept and walkthrough for staking
- Delegating resources — concept and walkthrough for delegation
- Unstaking & cancellation — concept and walkthrough for unstaking
- Voting for Super Representatives — concept and walkthrough for voting
- Reward calculation — how rewards are calculated and distributed
Updated 7 days ago