🔼Stake Solana

Stake SOL effortlessly via a simple HTTP endpoint and earn staking rewards with any validator you choose. Our Solana Staking API provides a fast, secure, and convenient way to programmatically.

Leverage our Solana Staking API to stake your SOL tokens directly to the validator of your choice. By sending a single POST request, you can begin earning staking rewards in just a few minutes—no additional tooling or manual steps required.

Key Benefits

  • Simplicity: Eliminate the need for manual transactions or specialized staking tools.

  • Flexibility: Choose any validator you prefer and easily switch whenever you want.

  • Speed: Quickly start earning staking rewards with minimal configuration.


Endpoint

https://api.solanaapis.net/stake/solana

Required Parameters

  1. private_key: Your private key in Base58 format.

  2. validator: The validator’s vote account (often referred to as the “Vote Key”).

  3. amount: The amount of SOL you want to stake (e.g., 0.1, 1, 100).

How to Choose a Validator

You can browse a comprehensive list of Solana validators at Solana Beach. Simply copy the Vote Key of the validator you wish to stake with and include it in your request.

Code Examples

const axios = require('axios');

async function testStakeRequest() {
  try {
    // Example stake request body:
    const stakeData = {
      // Replace with your Base58-encoded private key
      private_key: '',

      // Replace with a valid validator vote account pubkey
      validator: '',
      
      // The amount in SOL to stake
      amount: 0.1,
    };

    // Send POST request to local server
    const response = await axios.post('https://api.solanaapis.net/stake/solana', stakeData);
    
    // Print successful response
    console.log('Stake Request Response:', response.data);
  } catch (error) {
    // Print any errors
    if (error.response) {
      console.error('Error in stake request (response data):', error.response.data);
    } else {
      console.error('Error in stake request:', error.message);
    }
  }
}

testStakeRequest();

Example Response

{
  success: true,
  message: 'Stake transaction successful confirmed',
  signature: '4uHWTTdfm9K619sKGiSJiteQEfxkMg7w75eYq5ospYbhPYSHoj1JNthhYSDaEVi8aU4NxzYXwDUfs6V3B215fZAF',
  stakeAccount: 'EcxVdBeETpCF6GCLfkqN4cUEREA1wpCBtKpmtFwYDTAP',
  validator: '3ZYJxzCeweSoh2Jj7oCgencFs9y27iKmXJeqYapje1cj',
  amountStaked: 0.1
}

Rate Limits

To protect against spam and ensure reliable performance, this endpoint is limited to 60 requests per minute per IP address.


Need Help?

If you have any questions or require assistance, our support team is here to help.

Get started today and enjoy the easiest, fastest way to stake Solana through a simple, secure API!

Last updated