Skip to main content
The withdrawal process in the Sui network using the Staking API can be done following these steps:
  1. List stakes for your account address.
  2. Create a withdrawal request.
  3. Sign and broadcast the transaction.
Request examples are provided using cURL.
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: mainnet or testnet.
  • address — staker account address.
Example response:
  • 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 either pending or active.
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.
Example response:
  • 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.