Skip to main content
The withdrawal process in the Aptos network using the Staking API can be done in a few steps:
  1. Create an unstaking request.
It takes up to 30 days to unlock tokens on Aptos network. During this waiting period, unlocked tokens continue earning rewards.
  1. Create a withdrawal request.
Get an authentication token to start using Staking API. Request examples are provided using cURL.
1

Create unstaking transaction

  1. Send a POST request to /api/v1/aptos/{network}/staking/delegated/unlock. Example request (for mainnet network):
  • amount — amount of tokens to unlock in Octas.
  • delegatorAddress account address which keeps tokens.
  • gas — optional; computational effort required to execute the transaction, measured in units.
    • unitPrice — price per unit of in Octas for processing the Aptos transaction.
    • maxGasLimit — maximum gas limit for the transaction.
Example response:
  • amount — amount of tokens to unlock in Octas.
  • delegatorAddress account address which keeps tokens.
  • unsignedTransaction — unsigned transaction in hexadecimal format. Sign the transaction and submit it to the blockchain to perform the called action.
  • createdAt — timestamp of the transaction in the ISO 8601 format.
  1. Use unsignedTransaction to sign and send the signed transaction to the Aptos network.
2

Create withdrawal request

  1. After the delegation pool period on Aptos expired, withdraw your tokens by sending a POST request to /api/v1/aptos/{network}/staking/delegated/withdraw. Example request (for mainnet network):
  • amount — amount of tokens to withdraw in Octas.
  • delegatorAddress account address which keeps tokens.
  • gas — optional; computational effort required to execute the transaction, measured in gas units.
    • unitPrice — price per unit of gas in Octas for processing the Aptos transaction.
    • maxGasLimit — maximum gas limit for the transaction.
Example response:
  • amount — amount of tokens to withdraw in Octas.
  • delegatorAddress account address which keeps tokens.
  • unsignedTransaction — unsigned transaction in hexadecimal format. Sign the transaction and submit it to the blockchain to perform the called action.
  • createdAt — timestamp of the transaction in the ISO 8601 format.
  1. Use unsignedTransaction to sign and send the signed transaction to the Aptos network.
To check the transaction status, send a GET request to /api/v1/aptos/{network}/transaction/status/{transactionHash}.Example request (for mainnet network):
  • transactionHash — hash of the transaction.
Example response:
  • createdAt — timestamp of the transaction in the ISO 8601 format.
  • gas — computational effort required to execute the transaction, measured in gas units.
    • unitPrice — price per unit of gas in Octas for processing the Aptos transaction.
    • maxGasLimit — maximum gas limit for the transaction.
    • used — amount of gas spent for the transaction.
  • senderAddress — transaction sender address.
  • sequenceNumber — number of transactions that have been submitted and committed on-chain from the sender account.
  • status — transaction status: pending, success or failed.
  • transactionHash — hash of the transaction.