Common Errors & Troubleshooting

API Request Errors

ErrorCauseSolution
401 UnauthorizedWrong header formatUse Authorization: api_key (not X-API-Key)
400 Bad RequestAmount in SOL instead of lamportsMultiply SOL by 1,000,000,000
400 Bad RequestDecimal in amountUse whole numbers only (lamports)
400 Bad RequestWrong field namesUse stakeAuthorityPubkey and amountToStake

Getting Started Checklist

Ready to start staking? Here's your step-by-step checklist:

  • Prepare Your Wallet

    • Get your Solana wallet public key
    • Ensure you have SOL for staking (minimum 0.01 SOL + fees)
    • Set up transaction signing in your application
  • Test First

  • Start Staking

    • Check current APR with /rewards/summary
    • Stake your desired amount with /delegations/delegate
    • Note your stake account address for future operations
  • Monitor & Manage

    • Wait 1–2 epochs (2–4 days) for activation
    • Check rewards with /rewards/authority/{yourPubkey}
    • Track APR with /rewards/authority/{yourPubkey}/stats
  • Plan Your Exit

    • Remember: unstaking takes 1–2 epochs
    • Keep some SOL liquid for immediate needs
    • Consider using split operations for partial withdrawals

Example

Here's a real working example based on a successful 0.01 SOL staking transaction:

Step 1: Create Transaction via API

curl --request POST      --url https://api.stake.fish/v1/solana/delegations/delegate      --header 'Authorization: YOUR API KEY'      --header 'accept: application/json'      --header 'content-type: application/json'      --data '{
       "stakeAuthorityPubkey": "8EujJJBHSGhquE399QSG2M191Kw61X3chB6cC6NZhpGH",
       "amountToStake": "10000000"
     }'

Response:

{
  "serializedTransaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAgKa5H67aeXGGXD2SZu2nXl7mms4JWuaoJmJPHliKj4mzJCTUfou253UrWbFRlZxoCJAC5jQWSrgDFEbXwEzpAGAQMGRm/lIRcy...",
  "stakeAccountPubkey": "5TpFq4oNqpPDdxeD9DseApNdYvP5NfpBtB6MxLLKig4p",
  "voteAccountPubkey": "7VGU4ZwR1e1AFekqbqv2gvjeg47e1PwMPm4BfLt6rxNk"
}

Step 2: Sign and Send Transaction (@solana/web3.js)

// sign-stake.js
const { Connection, Keypair, Transaction } = require('@solana/web3.js');
const bs58 = require('bs58');

async function signAndSendStake() {
    // Your private key (from wallet export)
    const PRIVATE_KEY = "Your-private-key";
    
    // Response from Step 1
    const serializedTx = "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAgKa5H67aeXGGXD2SZu2nXl7mms4JWuaoJmJPHliKj4mzJCTUfou253UrWbFRlZxoCJAC5jQWSrgDFEbXwEzpAGAQMGRm/lIRcy...";
    
    const keypair = Keypair.fromSecretKey(bs58.default.decode(PRIVATE_KEY));
    const connection = new Connection('https://api.mainnet-beta.solana.com', 'confirmed');
    
    const transaction = Transaction.from(Buffer.from(serializedTx, 'base64'));
    const { blockhash } = await connection.getLatestBlockhash('finalized');
    transaction.recentBlockhash = blockhash;
    transaction.feePayer = keypair.publicKey;
    
    transaction.sign(keypair);
    const signature = await connection.sendRawTransaction(transaction.serialize());
    await connection.confirmTransaction(signature, 'confirmed');
    
    console.log('✅ Staked successfully!');
    console.log('🔍 Transaction:', `https://explorer.solana.com/tx/${signature}`);
    console.log('📊 Stake Account: 5TpFq4oNqpPDdxeD9DseApNdYvP5NfpBtB6MxLLKig4p`);
}

signAndSendStake().catch(console.error);

Step 3: Monitor Your Stake

After 1–2 epochs (2–4 days), check your stake status:

curl https://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json"   -d '{"jsonrpc":"2.0","id":1,"method":"getAccountInfo","params":["5TpFq4oNqpPDdxeD9DseApNdYvP5NfpBtB6MxLLKig4p",{"encoding":"jsonParsed"}]}'

Step 4: Monitor Your Rewards with Stakefish API

After your stake is activated (2–4 days), you can monitor your rewards using the Stakefish API.

Get detailed reward history

curl --request GET      --url https://api.stake.fish/v1/solana/rewards/stake-account/5TpFq4oNqpPDdxeD9DseApNdYvP5NfpBtB6MxLLKig4p      --header 'Authorization: your_api_key_here'      --header 'accept: application/json'

Sample Response:

{
    "totalItems": 5,
    "results": [
        {
            "epoch": {
                "epochNumber": 835,
                "startDate": "2025-08-17T19:14:09.000Z",
                "endDate": "2025-08-19T18:23:39.000Z"
            },
            "stakeAccountPubkey": "5TpFq4oNqpPDdxeD9DseApNdYvP5NfpBtB6MxLLKig4p",
            "inflationRewards": "5407",      // ~0.000005407 SOL
            "mevRewards": "378",             // ~0.000000378 SOL
            "cumulativeInflationRewards": "48942",
            "cumulativeMevRewards": "3786"
        }
    ]
}

Get APR statistics

curl --request POST      --url https://api.stake.fish/v1/solana/rewards/stake-account/stats      --header 'Authorization: your_api_key_here'      --header 'accept: application/json'      --header 'content-type: application/json'      --data '{"stakeAccountPubkeys": ["5TpFq4oNqpPDdxeD9DseApNdYvP5NfpBtB6MxLLKig4p"]}'

Sample APR Response:

{
    "percentageTotal": "6.67",       // Total APR: 6.67%
    "percentageInflation": "6.19",   // Inflation APR: 6.19%
    "percentageMev": "0.48",         // MEV APR: 0.48%
    "aprType": "backward",
    "timeWindow": "7d"
}

Support and Resources