- List stakes for your account address.
- Create a withdrawal request.
- Sign and broadcast the transaction.
1
Get list stakes
To identify which stake to withdraw, send a GET request to /api/v1/sui/{network}/transaction/stake-list/{address}.Example request (for
testnet network):network— Sui network:mainnetortestnet.address— staker account address.
-
validatorAddress— validator address. -
stakerAddress— staker account address. -
stakes— detailed information on each stake:stakeId— identifier of the stake, required to perform a withdrawal.amount— amount of tokens to stake in MIST (1 SUI = 10⁹ MIST).status— staking transaction status. You can withdraw at any time while the stake status is eitherpendingoractive.
2
Create withdrawal request
Initiate the withdrawal process by sending a POST request to /api/v1/sui/{network}/staking/withdraw.Example response:
sender— staker account address.gasPrice— price per unit of gas in MIST for processing the Sui transaction.gasBudget— maximum gas limit for the transaction.stakeId— identifier of the stake to withdraw from, obtained through the previous step.
unsignedTransaction— serialized unsigned transaction in the hexadecimal format. Sign the transaction and submit it to the blockchain to perform the called action.
3
Sign and send transaction
Use
unsignedTransaction from the previous step to sign and send the signed transaction to the Sui network. The withdrawal is immediate and processed within seconds.