Overview
Use Case
Stake TRX for energy or bandwidth on Tron gas stations to reduce per-transaction costs. Unstaking is subject to a 14-day unlock period (Tron Stake 2.0).
- Stake TRXPOST/gasstations/:id/stake
- Unstake TRXPOST/gasstations/:id/unstake
- List stakesGET/gasstations/:id/stakes
- Get stake estimateGET/gasstations/:id/stake-estimate
- Delegate resourcesPOST/gasstations/:id/delegate
- Undelegate resourcesPOST/gasstations/:id/undelegate
- List delegationsGET/gasstations/:id/delegations
Stake TRX
Use Case
Stakes TRX for energy or bandwidth resources on Tron. Applies to Tron gas stations only.
Request Body
TRX amount to stake (numeric, > 0).
`ENERGY` (for smart-contract calls / TRC-20 transfers) or `BANDWIDTH` (for native TRX transfers).
Unstake TRX
Use Case
Unstakes TRX. Subject to the 14-day unlock period (Tron Stake 2.0) — the TRX returns to the gas station's liquid balance once the unlock period elapses.
Request Body
TRX amount to unstake (numeric, > 0). Must not exceed the currently staked amount for `resource`.
`ENERGY` or `BANDWIDTH` — matches the resource the original stake was made under.
List Stakes
Use Case
Returns active and unlocking TRX stakes for this gas station.
List Stakes Response
Which resource this stake produces — `ENERGY` or `BANDWIDTH`.
Display amount of TRX locked in this stake.
Estimated energy / bandwidth gain this stake yields at the current network rate.
`active` while the stake is producing resources; `unlocking` after an unstake is initiated.
When the unstake completes and the TRX returns to the gas station's liquid balance. Set only when `status = unlocking`.
Get Stake Estimate
Use Case
Previews the resource gain for a given stake amount before actually staking.
Query Parameters
TRX amount you're considering staking.
`ENERGY` or `BANDWIDTH` — picks which conversion rate the estimate uses.
Stake Estimate Response
Echo of the requested `resource` (`ENERGY` or `BANDWIDTH`).
Echo of the requested TRX amount.
Current conversion rate (e.g., `20 energy/TRX`). Drives the estimate.
Projected resource units this stake would produce.
Lock period before the stake can be reclaimed (14 days for Tron Stake 2.0).
Tron Delegation
Use Case
Delegate staked TRX energy or bandwidth to another Tron account, and reclaim it later.
Delegate Resources
Use Case
Delegates staked TRX energy or bandwidth to another Tron account.
Request Body
Tron address that will be able to spend the delegated energy / bandwidth.
TRX amount (numeric, > 0) being delegated.
`ENERGY` or `BANDWIDTH` — must match a resource you've staked for.
When `true`, the delegation cannot be revoked until `lock_period_days` passes.
Lock period in days (minimum 3). Only used when `lock = true`.
Undelegate Resources
Use Case
Reclaims previously delegated energy or bandwidth back to this gas station's staked balance.
Request Body
Tron address you're reclaiming the delegation from.
TRX amount (numeric, > 0) to reclaim.
`ENERGY` or `BANDWIDTH` — matches the delegation you're undoing.
List Delegations
Use Case
Returns active resource delegations for this gas station.
List Delegations Response
Tron address that currently benefits from the delegated resource.
`ENERGY` or `BANDWIDTH` — which staked resource is being lent out.
Amount of TRX (in staked terms) currently delegated to the receiver.
`true` when the delegation is locked and cannot be revoked yet.
When the lock period ends and the delegation becomes revocable. Empty when `locked = false`.