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

# getMultipleAccounts

> Birden fazla hesap için hesap bilgilerini döndürür

## Parametreler

<ResponseField name="pubkeys" type="array">
  Hesap açık anahtarları dizisi (base-58 kodlu)
</ResponseField>

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

    <ResponseField name="encoding" type="string" optional>
      Hesap verisi için kodlama formatı (base58, base64, jsonParsed)
    </ResponseField>

    <ResponseField name="dataSlice" type="object" optional>
      <ResponseField name="offset" type="number">
        Okumaya başlanacak hesap verisi ofseti
      </ResponseField>

      <ResponseField name="length" type="number">
        Okunacak veri uzunluğu
      </ResponseField>
    </ResponseField>
  </Expandable>
</ResponseField>

## Yanıt

<ResponseField name="result" type="object">
  <Expandable title="result fields">
    <ResponseField name="context" type="object">
      <ResponseField name="slot" type="number">
        İsteğin işlendiği slot
      </ResponseField>
    </ResponseField>

    <ResponseField name="value" type="array">
      Hesap bilgisi nesneleri dizisi veya mevcut olmayan hesaplar için null

      <ResponseField name="data" type="array">
        Belirtilen kodlamada hesap verisi
      </ResponseField>

      <ResponseField name="executable" type="boolean">
        Hesabın çalıştırılabilir olup olmadığı
      </ResponseField>

      <ResponseField name="lamports" type="number">
        Lamport cinsinden hesap bakiyesi
      </ResponseField>

      <ResponseField name="owner" type="string">
        Hesap sahibi (base-58 kodlu)
      </ResponseField>

      <ResponseField name="rentEpoch" type="number">
        Hesabın bir sonraki kira borcunun olacağı dönem
      </ResponseField>
    </ResponseField>
  </Expandable>
</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": "getMultipleAccounts",
  "params": [
    ["ACCOUNT1", "ACCOUNT2", "ACCOUNT3"]
  ]
}'
```

### Kodlamayla İ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": "getMultipleAccounts",
  "params": [
    ["ACCOUNT1", "ACCOUNT2"],
    {
      "encoding": "base64",
      "dataSlice": {
        "offset": 0,
        "length": 100
      }
    }
  ]
}'
```

### web3.js Kullanımı

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

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

// Get multiple accounts
const accounts = await connection.getMultipleAccounts([
  new PublicKey('ACCOUNT1'),
  new PublicKey('ACCOUNT2')
]);
console.log('Accounts:', accounts.value);

// Get account data slices
async function getAccountDataSlices(
  pubkeys: PublicKey[],
  offset: number,
  length: number
) {
  const accounts = await connection.getMultipleAccounts(pubkeys, {
    encoding: 'base64',
    dataSlice: { offset, length }
  });
  
  return accounts.value.map((account, index) => ({
    pubkey: pubkeys[index].toBase58(),
    exists: account !== null,
    data: account?.data[0],
    lamports: account?.lamports
  }));
}
```

## Notlar

1. Tek bir istekte birden fazla hesap için bilgi döndürür
2. Mevcut olmayan hesaplar null olarak döndürülür
3. Yanıt boyutunu azaltmak için hesap verisi dilimlere ayrılabilir
4. Mevcut durumdan okuduğu için yanıt anında gelir
5. Hesap verisi için farklı kodlamalar belirtilebilir

## En İyi Uygulamalar

1. Birden fazla hesabı verimli şekilde almak için bu metodu kullanın
2. Yanıt boyutunu azaltmak için dataSlice kullanmayı düşünün
3. RPC yükünü azaltmak için uygun durumlarda sonuçları önbelleğe alın
4. Mevcut olmayan hesaplar için null değerleri yönetin
5. İhtiyaçlarınıza göre uygun kodlamayı kullanın

## 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                  | Açık anahtarları ve yapılandırma parametrelerini kontrol edin |
| -32007 | Account information unavailable | Düğüm başlatılıyor veya senkronize ediliyor olabilir          |
