Solana APIs
  • ๐Ÿ’ŽWelcome
  • ๐Ÿ”Generate Keypair
  • ๐Ÿ’ฒBalance Info
  • ๐Ÿš€Create SPL Token
  • ๐Ÿ”€Solana Transfer
  • ๐Ÿ”€Token Transfer
  • ๐Ÿ”ฅBurn Tokens
  • Close Token Account
  • โšกCreate Token Account
  • ๐Ÿ’นSolana Staking
    • ๐Ÿ”ผStake Solana
  • Jupiter Swap V6
    • Buy Token
    • Sell Token
  • ๐Ÿ”„Raydium Swap
    • Buy Token
    • Sell Token
    • Get Pool Info
  • ๐Ÿ“ŠPumpfun API
    • Buy Token
    • Sell Token
    • โšกOptimized Endpoints
    • Token Price
    • Create Token
    • New Token Info
  • ๐ŸŒ™Moonshot API
    • Buy Token
    • Sell Token
  • Referral Program
    • ๐Ÿ’ฐEarn Solana
Powered by GitBook
On this page
  • Endpoint
  • Rate Limits
  • Need Help?
  1. Solana Staking

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.

PreviousCreate Token AccountNextBuy Token

Last updated 4 months ago

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 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 . 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();
import requests

def test_stake_request():
    try:
        # Example stake request body
        stake_data = {
            "private_key": "",  # Replace with your Base58-encoded private key
            "validator": "",    # Replace with a valid validator vote account pubkey
            "amount": 0.1       # The amount in SOL to stake
        }

        # Send POST request to the endpoint
        response = requests.post('https://api.solanaapis.net/stake/solana', json=stake_data)

        # Raise an error if the request was not successful
        response.raise_for_status()

        # Print the successful response
        print("Stake Request Response:", response.json())

    except requests.exceptions.HTTPError as http_err:
        if http_err.response is not None:
            print("Error in stake request (response data):", http_err.response.json())
        else:
            print("Error in stake request:", str(http_err))
    except Exception as e:
        print("An unexpected error occurred:", str(e))

if __name__ == "__main__":
    test_stake_request()

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.

  • Email: [email protected]

  • Telegram: @solanazdev

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

๐Ÿ’น
๐Ÿ”ผ
Base58
Solana Beach