> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbitflare.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getStakeMinimumDelegation

> Returns the minimum stake delegation amount

## Parameters

<ResponseField name="config" type="object" optional>
  Configuration object containing:

  <ResponseField name="commitment" type="string" optional>
    Commitment level (processed, confirmed, finalized)
  </ResponseField>
</ResponseField>

## Response

<ResponseField name="result" type="number">
  Minimum stake delegation amount in lamports
</ResponseField>

## Code Examples

### Basic Request

```bash theme={null}
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getStakeMinimumDelegation",
  "params": []
}'
```

### Using web3.js

```typescript theme={null}
import { Connection } from '@solana/web3.js';

const connection = new Connection('https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY');

// 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

| Code   | Message                                    | Solution                                     |
| ------ | ------------------------------------------ | -------------------------------------------- |
| -32601 | Method not found                           | Verify you're connected to a Solana RPC node |
| -32602 | Invalid params                             | Check configuration parameters               |
| -32007 | Minimum delegation information unavailable | Node may be bootstrapping or syncing         |

## Use Cases

1. **Stake Delegation Analysis**
   ```typescript theme={null}
   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**
   ```typescript theme={null}
   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**
   ```typescript theme={null}
   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()
         }
       };
     }
   }
   ```
