Parameters

config
object

Configuration object containing:

commitment
string

Commitment level (processed, confirmed, finalized)

Response

result
number

Minimum stake delegation amount in lamports

Code Examples

Basic Request

curl https://rpc.orbitflare.com -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getStakeMinimumDelegation",
  "params": []
}'

Using web3.js

import { Connection } from '@solana/web3.js';

const connection = new Connection('https://rpc.orbitflare.com');

// Get minimum stake delegation
const minDelegation = await connection.getStakeMinimumDelegation();
console.log('Minimum stake delegation:', minDelegation);

// Get minimum stake delegation with analysis
async function getStakeMinimumDelegationWithAnalysis(
  config?: { commitment?: string }
) {
  const minDelegation = await connection.getStakeMinimumDelegation(config);
  
  return {
    minDelegation,
    analysis: {
      inSOL: minDelegation / 1e9, // Convert lamports to SOL
      metadata: {
        timestamp: Date.now(),
        commitment: config?.commitment
      }
    }
  };
}

Notes

  1. Returns the minimum stake delegation amount in lamports
  2. The minimum delegation amount is set by the network
  3. The response is immediate as it reads from the current state
  4. The minimum delegation amount can change with network upgrades
  5. This value is important for determining valid stake amounts

Best Practices

  1. Use appropriate commitment level based on your needs
  2. Cache results when appropriate to reduce RPC load
  3. Monitor for changes in the minimum delegation amount
  4. Consider using websocket subscription for real-time updates
  5. Handle network errors and retry when appropriate

Common Errors

CodeMessageSolution
-32601Method not foundVerify you’re connected to a Solana RPC node
-32602Invalid paramsCheck configuration parameters
-32007Minimum delegation information unavailableNode may be bootstrapping or syncing

Use Cases

  1. Stake Delegation Analysis

    interface StakeDelegationAnalysis {
      minDelegation: number;
      metrics: {
        inSOL: number;
        recommendedMinimum: number;
      };
      metadata: {
        timestamp: number;
        commitment?: string;
      };
    }
    
    class StakeDelegationAnalyzer {
      private readonly recommendedMultiplier = 1.1; // 10% above minimum
      
      async analyzeStakeDelegation(
        config?: { commitment?: string }
      ): Promise<StakeDelegationAnalysis> {
        const minDelegation = await connection.getStakeMinimumDelegation(config);
        
        return {
          minDelegation,
          metrics: {
            inSOL: minDelegation / 1e9,
            recommendedMinimum: minDelegation * this.recommendedMultiplier
          },
          metadata: {
            timestamp: Date.now(),
            commitment: config?.commitment
          }
        };
      }
    }
    
  2. Stake Delegation Monitoring

    interface StakeDelegationChange {
      previousMinDelegation: number;
      currentMinDelegation: number;
      change: number;
      metadata: {
        timestamp: number;
      };
    }
    
    class StakeDelegationMonitor {
      private previousMinDelegation: number | null = null;
      
      async monitorStakeDelegation(
        config?: { commitment?: string }
      ): Promise<StakeDelegationChange | null> {
        const currentMinDelegation = await connection.getStakeMinimumDelegation(config);
        
        if (this.previousMinDelegation === null) {
          this.previousMinDelegation = currentMinDelegation;
          return null;
        }
        
        if (this.previousMinDelegation !== currentMinDelegation) {
          const change: StakeDelegationChange = {
            previousMinDelegation: this.previousMinDelegation,
            currentMinDelegation,
            change: currentMinDelegation - this.previousMinDelegation,
            metadata: {
              timestamp: Date.now()
            }
          };
          
          this.previousMinDelegation = currentMinDelegation;
          return change;
        }
        
        return null;
      }
    }
    
  3. Stake Delegation Planning

    interface StakeDelegationPlan {
      minDelegation: number;
      recommendations: Array<{
        amount: number;
        description: string;
        inSOL: number;
      }>;
      metadata: {
        timestamp: number;
      };
    }
    
    class StakeDelegationPlanner {
      private readonly tiers = [
        { multiplier: 1.1, description: 'Minimum recommended' },
        { multiplier: 2, description: 'Standard' },
        { multiplier: 5, description: 'Premium' }
      ];
      
      async planStakeDelegation(
        config?: { commitment?: string }
      ): Promise<StakeDelegationPlan> {
        const minDelegation = await connection.getStakeMinimumDelegation(config);
        
        const recommendations = this.tiers.map(tier => ({
          amount: minDelegation * tier.multiplier,
          description: tier.description,
          inSOL: (minDelegation * tier.multiplier) / 1e9
        }));
        
        return {
          minDelegation,
          recommendations,
          metadata: {
            timestamp: Date.now()
          }
        };
      }
    }