Skip to main content
Staking in the Solana network using the Staking API consists of several main steps:
  1. Create a staking request.
  2. Sign and send the transaction to the network.
Get an authentication token to start using Staking API. Request examples are provided using cURL.
1

Create staking request

Send a POST request to /api/v1/solana/{network}/staking/stake.Example request (for testnet network):
  • feePayer — account address that will pay the fee for the transaction.
  • fromPublicKey — account address from which the staking account will be created.
  • amount — amount of tokens to stake in lamports (1 SOL = 10⁹ lamports). The minimum amount is 1002282880.
  • stakeAuthority — account address that can perform staking operations with the staking account. If not specified, rights will be taken from the fromPublicKey parameter.
  • withdrawAuthority — account address that can perform withdrawal operations with the staking account. If not specified, rights will be taken from the fromPublicKey parameter.
Example response:
  • feePayer — account address that will pay the fee for the transaction.
  • fromPublicKey — account address from which the staking account will be created.
  • stakeAccount — account address that stores tokens for staking.
  • stakeAuthority — account address that can perform staking operations with the staking account.
  • withdrawAuthority — account address that can perform withdrawal operations with the staking account.
  • amount — amount of tokens to stake in lamports (1 SOL = 10⁹ lamports). The minimum amount is 1002282880.
  • unsignedTransaction — unsigned transaction in Base64 encrypted 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.
The transaction exists for one minute.
2

Sign and send transaction

Use unsignedTransaction to sign and send the signed transaction to the Solana network.To check the transaction status, send a GET request to /api/v1/solana/{network}/account/staking.Example request (for testnet network):
  • stakeAuthorities — list of account addresses that can perform staking operations with staking accounts.
  • stakeAccounts — list of staking account addresses.
  • withdrawAuthorities — list of account addresses that can perform withdrawal operations with the staking accounts.
  • status — staking account status: active, inactive, activating, deactivating.
Example response:
  • accounts — list of stake accounts.
    • amount — amount of tokens to stake in lamports (1 SOL = 10⁹ lamports).
    • stakeAccount — account address that stores tokens for staking.
    • stakeAuthority — account address that can perform staking operations with the staking account.
    • withdrawAuthority — account address that can perform withdrawal operations with the staking account.
    • voteAccount — vote account address.
    • status — stake account status: active, inactive, activating, deactivating.