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

APIDescription
freezebalancev2Stake TRX (Stake 2.0)
unfreezebalancev2Unstake TRX (Stake 2.0)
unfreezebalanceUnstake TRX staked under Stake 1.0
withdrawexpireunfreezeWithdraw unstaked TRX after the 14-day pending period
cancelallunfreezev2Cancel all ongoing unstaking operations and re-stake the funds
getavailableunfreezecountQuery the remaining number of unstake operations the account can submit (max 32)
getcanwithdrawunfreezeamountQuery the amount of unstaked TRX currently withdrawable

Delegation APIs

APIDescription
delegateresourceDelegate Bandwidth or Energy to another account
undelegateresourceCancel a resource delegation
getcandelegatedmaxsizeQuery how much of a given resource can still be delegated
getdelegatedresourcev2Query resources delegated from one address to another
getdelegatedresourceaccountindexv2Query the full delegation index of an account (who delegates to it, who it delegates to)

Account state queries

APIDescription
getaccountQuery an account's staking status, resource share, unstaking state, and voting state
getaccountresourceQuery the total amount of resources, the amount used, and the amount available

Voting and SR APIs

APIDescription
votewitnessaccountVote for SRs (cast TRON Power across one or more candidates)
listwitnessesList all current SRs and SR Partners
createwitnessApply to become an SR candidate
updatewitnessEdit the URL of an SR's project website
getnextmaintenancetimeGet the timestamp of the next 6-hour maintenance period (when votes are next counted)

Reward APIs

APIDescription
getRewardQuery rewards an SR or voter has not yet claimed
withdrawbalanceClaim accrued rewards into the spendable balance
getBrokerageGet the current brokerage ratio of an SR or SR Partner
updateBrokerageUpdate 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.

APIDescription
proposalcreateCreate a proposal
proposalapproveApprove a proposal (active SRs only)
proposaldeleteDelete a proposal (creator only, before expiry)
listproposalsList all proposals
getproposalbyidQuery a proposal by ID

Related resources