> ## 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.

# getSlot

> Düğümün mevcut slotunu döndürür

## Parametreler

<ResponseField name="config" type="object" optional>
  <Expandable title="config fields">
    <ResponseField name="commitment" type="string" optional>
      Onay seviyesi (processed, confirmed, finalized)
    </ResponseField>
  </Expandable>
</ResponseField>

## Yanıt

<ResponseField name="result" type="number">
  Mevcut slot numarası
</ResponseField>

## Kod Örnekleri

### Temel İstek

```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": "getSlot",
  "params": []
}'
```

### Onay Seviyesiyle İstek

```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": "getSlot",
  "params": [
    {
      "commitment": "confirmed"
    }
  ]
}'
```

### web3.js Kullanımı

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

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

// Get current slot
const slot = await connection.getSlot();
console.log('Current slot:', slot);

// Get slot with commitment
async function getSlotWithCommitment(
  commitment: 'processed' | 'confirmed' | 'finalized' = 'confirmed'
) {
  const slot = await connection.getSlot(commitment);
  return {
    slot,
    commitment,
    timestamp: Date.now()
  };
}
```

## Notlar

1. Düğümün mevcut slotunu döndürür
2. Slot numarası yeni bloklar üretildikçe artar
3. Farklı onay seviyeleri belirtilebilir
4. Mevcut durumdan okuduğu için yanıt anında gelir
5. Slot numarası çeşitli zamana dayalı işlemler için kullanılır

## En İyi Uygulamalar

1. Uygun olduğunda slot numarasını önbelleğe alın
2. Gerçek zamanlı güncellemeler için WebSocket aboneliği kullanmayı düşünün
3. Ağ hatalarını yönetin ve gerektiğinde yeniden deneyin
4. İhtiyacınıza göre uygun onay seviyesini kullanın
5. Zamana duyarlı işlemler için slot ilerlemesini izleyin

## Yaygın Hatalar

| Kod    | Mesaj                        | Çözüm                                                |
| ------ | ---------------------------- | ---------------------------------------------------- |
| -32601 | Method not found             | Bir Solana RPC düğümüne bağlı olduğunuzu doğrulayın  |
| -32602 | Invalid params               | Yapılandırma parametrelerini kontrol edin            |
| -32007 | Slot information unavailable | Düğüm başlatılıyor veya senkronize ediliyor olabilir |
